cudd  3.0.0
The University of Colorado Decision Diagram Package
Functions
cuddZddSetop.c File Reference

Set operations on ZDDs. More...

#include "util.h"
#include "cuddInt.h"
Include dependency graph for cuddZddSetop.c:

Functions

DdNodeCudd_zddIte (DdManager *dd, DdNode *f, DdNode *g, DdNode *h)
 Computes the ITE of three ZDDs. More...
 
DdNodeCudd_zddUnion (DdManager *dd, DdNode *P, DdNode *Q)
 Computes the union of two ZDDs. More...
 
DdNodeCudd_zddIntersect (DdManager *dd, DdNode *P, DdNode *Q)
 Computes the intersection of two ZDDs. More...
 
DdNodeCudd_zddDiff (DdManager *dd, DdNode *P, DdNode *Q)
 Computes the difference of two ZDDs. More...
 
DdNodeCudd_zddDiffConst (DdManager *zdd, DdNode *P, DdNode *Q)
 Performs the inclusion test for ZDDs (P implies Q). More...
 
DdNodeCudd_zddSubset1 (DdManager *dd, DdNode *P, int var)
 Computes the positive cofactor of a ZDD w.r.t. a variable. More...
 
DdNodeCudd_zddSubset0 (DdManager *dd, DdNode *P, int var)
 Computes the negative cofactor of a ZDD w.r.t. a variable. More...
 
DdNodeCudd_zddChange (DdManager *dd, DdNode *P, int var)
 Substitutes a variable with its complement in a ZDD. More...
 
DdNodecuddZddIte (DdManager *dd, DdNode *f, DdNode *g, DdNode *h)
 Performs the recursive step of Cudd_zddIte. More...
 
DdNodecuddZddUnion (DdManager *zdd, DdNode *P, DdNode *Q)
 Performs the recursive step of Cudd_zddUnion. More...
 
DdNodecuddZddIntersect (DdManager *zdd, DdNode *P, DdNode *Q)
 Performs the recursive step of Cudd_zddIntersect. More...
 
DdNodecuddZddDiff (DdManager *zdd, DdNode *P, DdNode *Q)
 Performs the recursive step of Cudd_zddDiff. More...
 
DdNodecuddZddChangeAux (DdManager *zdd, DdNode *P, DdNode *zvar)
 Performs the recursive step of Cudd_zddChange. More...
 
DdNodecuddZddSubset1 (DdManager *dd, DdNode *P, int var)
 Computes the positive cofactor of a ZDD w.r.t. a variable. More...
 
DdNodecuddZddSubset0 (DdManager *dd, DdNode *P, int var)
 Computes the negative cofactor of a ZDD w.r.t. a variable. More...
 
DdNodecuddZddChange (DdManager *dd, DdNode *P, int var)
 Substitutes a variable with its complement in a ZDD. More...
 
static DdNodezdd_subset1_aux (DdManager *zdd, DdNode *P, DdNode *zvar)
 Performs the recursive step of Cudd_zddSubset1. More...
 
static DdNodezdd_subset0_aux (DdManager *zdd, DdNode *P, DdNode *zvar)
 Performs the recursive step of Cudd_zddSubset0. More...
 
static void zddVarToConst (DdNode *f, DdNode **gp, DdNode **hp, DdNode *base, DdNode *empty)
 Replaces variables with constants if possible (part of canonical form). More...
 

Detailed Description

Set operations on ZDDs.

Author
Hyong-Kyoon Shin, In-Ho Moon

Function Documentation

◆ Cudd_zddChange()

DdNode* Cudd_zddChange ( DdManager dd,
DdNode P,
int  var 
)

Substitutes a variable with its complement in a ZDD.

Returns
a pointer to the result if successful; NULL otherwise.
Side effects None

◆ Cudd_zddDiff()

DdNode* Cudd_zddDiff ( DdManager dd,
DdNode P,
DdNode Q 
)

Computes the difference of two ZDDs.

Returns
a pointer to the result if successful; NULL otherwise.
Side effects None

◆ Cudd_zddDiffConst()

DdNode* Cudd_zddDiffConst ( DdManager zdd,
DdNode P,
DdNode Q 
)

Performs the inclusion test for ZDDs (P implies Q).

No new nodes are generated by this procedure.

Returns
empty if true; a valid pointer different from empty or DD_NON_CONSTANT otherwise.
Side effects None
See also
Cudd_zddDiff

◆ Cudd_zddIntersect()

DdNode* Cudd_zddIntersect ( DdManager dd,
DdNode P,
DdNode Q 
)

Computes the intersection of two ZDDs.

Returns
a pointer to the result if successful; NULL otherwise.
Side effects None

◆ Cudd_zddIte()

DdNode* Cudd_zddIte ( DdManager dd,
DdNode f,
DdNode g,
DdNode h 
)

Computes the ITE of three ZDDs.

Returns
a pointer to the result if successful; NULL otherwise.
Side effects None

◆ Cudd_zddSubset0()

DdNode* Cudd_zddSubset0 ( DdManager dd,
DdNode P,
int  var 
)

Computes the negative cofactor of a ZDD w.r.t. a variable.

In terms of combinations, the result is the set of all combinations in which the variable is negated.

Returns
a pointer to the result if successful; NULL otherwise.
Side effects None
See also
Cudd_zddSubset1

◆ Cudd_zddSubset1()

DdNode* Cudd_zddSubset1 ( DdManager dd,
DdNode P,
int  var 
)

Computes the positive cofactor of a ZDD w.r.t. a variable.

In terms of combinations, the result is the set of all combinations in which the variable is asserted.

Returns
a pointer to the result if successful; NULL otherwise.
Side effects None
See also
Cudd_zddSubset0

◆ Cudd_zddUnion()

DdNode* Cudd_zddUnion ( DdManager dd,
DdNode P,
DdNode Q 
)

Computes the union of two ZDDs.

Returns
a pointer to the result if successful; NULL otherwise.
Side effects None

◆ cuddZddChange()

DdNode* cuddZddChange ( DdManager dd,
DdNode P,
int  var 
)

Substitutes a variable with its complement in a ZDD.

cuddZddChange performs the same function as Cudd_zddChange, but does not restart if reordering has taken place. Therefore it can be called from within a recursive procedure.

Returns
a pointer to the result if successful; NULL otherwise.
Side effects None
See also
Cudd_zddChange

◆ cuddZddChangeAux()

DdNode* cuddZddChangeAux ( DdManager zdd,
DdNode P,
DdNode zvar 
)

Performs the recursive step of Cudd_zddChange.

Side effects None

◆ cuddZddDiff()

DdNode* cuddZddDiff ( DdManager zdd,
DdNode P,
DdNode Q 
)

Performs the recursive step of Cudd_zddDiff.

Side effects None

◆ cuddZddIntersect()

DdNode* cuddZddIntersect ( DdManager zdd,
DdNode P,
DdNode Q 
)

Performs the recursive step of Cudd_zddIntersect.

Side effects None

◆ cuddZddIte()

DdNode* cuddZddIte ( DdManager dd,
DdNode f,
DdNode g,
DdNode h 
)

Performs the recursive step of Cudd_zddIte.

Side effects None

◆ cuddZddSubset0()

DdNode* cuddZddSubset0 ( DdManager dd,
DdNode P,
int  var 
)

Computes the negative cofactor of a ZDD w.r.t. a variable.

In terms of combinations, the result is the set of all combinations in which the variable is negated. cuddZddSubset0 performs the same function as Cudd_zddSubset0, but does not restart if reordering has taken place. Therefore it can be called from within a recursive procedure.

Returns
a pointer to the result if successful; NULL otherwise.
Side effects None
See also
cuddZddSubset1 Cudd_zddSubset0

◆ cuddZddSubset1()

DdNode* cuddZddSubset1 ( DdManager dd,
DdNode P,
int  var 
)

Computes the positive cofactor of a ZDD w.r.t. a variable.

In terms of combinations, the result is the set of all combinations in which the variable is asserted. cuddZddSubset1 performs the same function as Cudd_zddSubset1, but does not restart if reordering has taken place. Therefore it can be called from within a recursive procedure.

Returns
a pointer to the result if successful; NULL otherwise.
Side effects None
See also
cuddZddSubset0 Cudd_zddSubset1

◆ cuddZddUnion()

DdNode* cuddZddUnion ( DdManager zdd,
DdNode P,
DdNode Q 
)

Performs the recursive step of Cudd_zddUnion.

Side effects None

◆ zdd_subset0_aux()

static DdNode* zdd_subset0_aux ( DdManager zdd,
DdNode P,
DdNode zvar 
)
static

Performs the recursive step of Cudd_zddSubset0.

Side effects None

◆ zdd_subset1_aux()

static DdNode* zdd_subset1_aux ( DdManager zdd,
DdNode P,
DdNode zvar 
)
static

Performs the recursive step of Cudd_zddSubset1.

Side effects None

◆ zddVarToConst()

static void zddVarToConst ( DdNode f,
DdNode **  gp,
DdNode **  hp,
DdNode base,
DdNode empty 
)
static

Replaces variables with constants if possible (part of canonical form).

Side effects None