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

DdNode * Cudd_zddIte (DdManager *dd, DdNode *f, DdNode *g, DdNode *h)
 Computes the ITE of three ZDDs. More...
 
DdNode * Cudd_zddUnion (DdManager *dd, DdNode *P, DdNode *Q)
 Computes the union of two ZDDs. More...
 
DdNode * Cudd_zddIntersect (DdManager *dd, DdNode *P, DdNode *Q)
 Computes the intersection of two ZDDs. More...
 
DdNode * Cudd_zddDiff (DdManager *dd, DdNode *P, DdNode *Q)
 Computes the difference of two ZDDs. More...
 
DdNode * Cudd_zddDiffConst (DdManager *zdd, DdNode *P, DdNode *Q)
 Performs the inclusion test for ZDDs (P implies Q). More...
 
DdNode * Cudd_zddSubset1 (DdManager *dd, DdNode *P, int var)
 Computes the positive cofactor of a ZDD w.r.t. a variable. More...
 
DdNode * Cudd_zddSubset0 (DdManager *dd, DdNode *P, int var)
 Computes the negative cofactor of a ZDD w.r.t. a variable. More...
 
DdNode * Cudd_zddChange (DdManager *dd, DdNode *P, int var)
 Substitutes a variable with its complement in a ZDD. More...
 
DdNode * cuddZddIte (DdManager *dd, DdNode *f, DdNode *g, DdNode *h)
 Performs the recursive step of Cudd_zddIte. More...
 
DdNode * cuddZddUnion (DdManager *zdd, DdNode *P, DdNode *Q)
 Performs the recursive step of Cudd_zddUnion. More...
 
DdNode * cuddZddIntersect (DdManager *zdd, DdNode *P, DdNode *Q)
 Performs the recursive step of Cudd_zddIntersect. More...
 
DdNode * cuddZddDiff (DdManager *zdd, DdNode *P, DdNode *Q)
 Performs the recursive step of Cudd_zddDiff. More...
 
DdNode * cuddZddChangeAux (DdManager *zdd, DdNode *P, DdNode *zvar)
 Performs the recursive step of Cudd_zddChange. More...
 
DdNode * cuddZddSubset1 (DdManager *dd, DdNode *P, int var)
 Computes the positive cofactor of a ZDD w.r.t. a variable. More...
 
DdNode * cuddZddSubset0 (DdManager *dd, DdNode *P, int var)
 Computes the negative cofactor of a ZDD w.r.t. a variable. More...
 
DdNode * cuddZddChange (DdManager *dd, DdNode *P, int var)
 Substitutes a variable with its complement in a ZDD. More...
 
static DdNode * zdd_subset1_aux (DdManager *zdd, DdNode *P, DdNode *zvar)
 Performs the recursive step of Cudd_zddSubset1. More...
 
static DdNode * zdd_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

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
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
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
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
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
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
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
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
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
DdNode* cuddZddChangeAux ( DdManager *  zdd,
DdNode *  P,
DdNode *  zvar 
)

Performs the recursive step of Cudd_zddChange.

Side effects
None
DdNode* cuddZddDiff ( DdManager *  zdd,
DdNode *  P,
DdNode *  Q 
)

Performs the recursive step of Cudd_zddDiff.

Side effects
None
DdNode* cuddZddIntersect ( DdManager *  zdd,
DdNode *  P,
DdNode *  Q 
)

Performs the recursive step of Cudd_zddIntersect.

Side effects
None
DdNode* cuddZddIte ( DdManager *  dd,
DdNode *  f,
DdNode *  g,
DdNode *  h 
)

Performs the recursive step of Cudd_zddIte.

Side effects
None
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
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
DdNode* cuddZddUnion ( DdManager *  zdd,
DdNode *  P,
DdNode *  Q 
)

Performs the recursive step of Cudd_zddUnion.

Side effects
None
static DdNode* zdd_subset0_aux ( DdManager *  zdd,
DdNode *  P,
DdNode *  zvar 
)
static

Performs the recursive step of Cudd_zddSubset0.

Side effects
None
static DdNode* zdd_subset1_aux ( DdManager *  zdd,
DdNode *  P,
DdNode *  zvar 
)
static

Performs the recursive step of Cudd_zddSubset1.

Side effects
None
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