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

ADD ITE function and satellites. More...

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

Functions

DdNodeCudd_addIte (DdManager *dd, DdNode *f, DdNode *g, DdNode *h)
 Implements ITE(f,g,h). More...
 
DdNodeCudd_addIteConstant (DdManager *dd, DdNode *f, DdNode *g, DdNode *h)
 Implements ITEconstant for ADDs. More...
 
DdNodeCudd_addEvalConst (DdManager *dd, DdNode *f, DdNode *g)
 Checks whether ADD g is constant whenever ADD f is 1. More...
 
DdNodeCudd_addCmpl (DdManager *dd, DdNode *f)
 Computes the complement of an ADD a la C language. More...
 
int Cudd_addLeq (DdManager *dd, DdNode *f, DdNode *g)
 Determines whether f is less than or equal to g. More...
 
DdNodecuddAddIteRecur (DdManager *dd, DdNode *f, DdNode *g, DdNode *h)
 Implements the recursive step of Cudd_addIte(f,g,h). More...
 
DdNodecuddAddCmplRecur (DdManager *dd, DdNode *f)
 Performs the recursive step of Cudd_addCmpl. More...
 
static void addVarToConst (DdNode *f, DdNode **gp, DdNode **hp, DdNode *one, DdNode *zero)
 Replaces variables with constants if possible (part of canonical form). More...
 

Detailed Description

ADD ITE function and satellites.

Author
Fabio Somenzi

Function Documentation

◆ addVarToConst()

static void addVarToConst ( DdNode f,
DdNode **  gp,
DdNode **  hp,
DdNode one,
DdNode zero 
)
static

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

Side effects None

◆ Cudd_addCmpl()

DdNode* Cudd_addCmpl ( DdManager dd,
DdNode f 
)

Computes the complement of an ADD a la C language.

The complement of 0 is 1 and the complement of everything else is 0.

Returns
a pointer to the resulting ADD if successful; NULL otherwise.
Side effects None
See also
Cudd_addNegate

◆ Cudd_addEvalConst()

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

Checks whether ADD g is constant whenever ADD f is 1.

f must be a 0-1 ADD. If f is identically 0, the check is assumed to be successful, and the background value is returned. No new nodes are created.

Returns
a pointer to the resulting ADD (which may or may not be constant) or DD_NON_CONSTANT.
Side effects None
See also
Cudd_addIteConstant Cudd_addLeq

◆ Cudd_addIte()

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

Implements ITE(f,g,h).

This procedure assumes that f is a 0-1 ADD.

Returns
a pointer to the resulting ADD if successful; NULL otherwise.
Side effects None
See also
Cudd_bddIte Cudd_addIteConstant Cudd_addApply

◆ Cudd_addIteConstant()

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

Implements ITEconstant for ADDs.

f must be a 0-1 ADD. No new nodes are created. This function can be used, for instance, to check that g has a constant value (specified by h) whenever f is 1. If the constant value is unknown, then one should use Cudd_addEvalConst.

Returns
a pointer to the resulting ADD (which may or may not be constant) or DD_NON_CONSTANT.
Side effects None
See also
Cudd_addIte Cudd_addEvalConst Cudd_bddIteConstant

◆ Cudd_addLeq()

int Cudd_addLeq ( DdManager dd,
DdNode f,
DdNode g 
)

Determines whether f is less than or equal to g.

No new nodes are created. This procedure works for arbitrary ADDs. For 0-1 ADDs Cudd_addEvalConst is more efficient.

Returns
1 if f is less than or equal to g; 0 otherwise.
Side effects None
See also
Cudd_addIteConstant Cudd_addEvalConst Cudd_bddLeq

◆ cuddAddCmplRecur()

DdNode* cuddAddCmplRecur ( DdManager dd,
DdNode f 
)

Performs the recursive step of Cudd_addCmpl.

Returns
a pointer to the resulting ADD if successful; NULL otherwise.
Side effects None
See also
Cudd_addCmpl

◆ cuddAddIteRecur()

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

Implements the recursive step of Cudd_addIte(f,g,h).

Returns
a pointer to the resulting ADD if successful; NULL otherwise.
Side effects None
See also
Cudd_addIte