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

Cofactoring functions. More...

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

Functions

DdNodeCudd_Cofactor (DdManager *dd, DdNode *f, DdNode *g)
 Computes the cofactor of f with respect to g. More...
 
int Cudd_CheckCube (DdManager *dd, DdNode *g)
 Checks whether g is the BDD of a cube. More...
 
int Cudd_VarsAreSymmetric (DdManager *dd, DdNode *f, int index1, int index2)
 Checks whether two variables are symmetric in a BDD. More...
 
void cuddGetBranches (DdNode *g, DdNode **g1, DdNode **g0)
 Computes the children of g. More...
 
DdNodecuddCofactorRecur (DdManager *dd, DdNode *f, DdNode *g)
 Performs the recursive step of Cudd_Cofactor. More...
 
static int ddVarsAreSymmetricBefore (DdManager *dd, DdNode *f, DdNode *var1, DdNode *var2)
 Implements the upper recursive step of Cudd_VarsAreSymmetric(). More...
 
static int ddVarsAreSymmetricBetween (DdManager *dd, DdNode *f1, DdNode *f0, DdNode *var2)
 Implements the lower recursive step of Cudd_VarsAreSymmetric(). More...
 

Detailed Description

Cofactoring functions.

Author
Fabio Somenzi

Function Documentation

◆ Cudd_CheckCube()

int Cudd_CheckCube ( DdManager dd,
DdNode g 
)

Checks whether g is the BDD of a cube.

The constant 1 is a valid cube, but all other constant functions cause cuddCheckCube to return 0.

Returns
1 in case of success; 0 otherwise.
Side effects None

◆ Cudd_Cofactor()

DdNode* Cudd_Cofactor ( DdManager dd,
DdNode f,
DdNode g 
)

Computes the cofactor of f with respect to g.

g must be the BDD or the ADD of a cube.

Returns
a pointer to the cofactor if successful; NULL otherwise.
Side effects None
See also
Cudd_bddConstrain Cudd_bddRestrict

◆ Cudd_VarsAreSymmetric()

int Cudd_VarsAreSymmetric ( DdManager dd,
DdNode f,
int  index1,
int  index2 
)

Checks whether two variables are symmetric in a BDD.

Returns
1 if the variables are symmetric; 0 if they are not.

No nodes are built during the check.

Side effects None
Parameters
ddmanager
fBDD whose variables are tested
index1index of first variable
index2index of second variable

◆ cuddCofactorRecur()

DdNode* cuddCofactorRecur ( DdManager dd,
DdNode f,
DdNode g 
)

Performs the recursive step of Cudd_Cofactor.

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

◆ cuddGetBranches()

void cuddGetBranches ( DdNode g,
DdNode **  g1,
DdNode **  g0 
)

Computes the children of g.

Side effects None

◆ ddVarsAreSymmetricBefore()

static int ddVarsAreSymmetricBefore ( DdManager dd,
DdNode f,
DdNode var1,
DdNode var2 
)
static

Implements the upper recursive step of Cudd_VarsAreSymmetric().

The assumption is made that the level of index1 is less than the level of index2.

Returns
1 if the variables are symmetric for the given function; 0 if they are not.
See also
Cudd_VarsAreSymmetric ddVarsAreSymmetricBetween

◆ ddVarsAreSymmetricBetween()

static int ddVarsAreSymmetricBetween ( DdManager dd,
DdNode f1,
DdNode f0,
DdNode var2 
)
static

Implements the lower recursive step of Cudd_VarsAreSymmetric().

Returns
1 if the negative cofactor of the first argument w.r.t. the variable currently at level2 is the same as the positive cofactor of the second argument; 0 if the two cofactors are not the same.
See also
Cudd_VarsAreSymmetric ddVarsAreSymmetricBefore