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

Translation from BDD to ADD and vice versa and transfer between different managers. More...

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

Functions

DdNodeCudd_addBddThreshold (DdManager *dd, DdNode *f, CUDD_VALUE_TYPE value)
 Converts an ADD to a BDD. More...
 
DdNodeCudd_addBddStrictThreshold (DdManager *dd, DdNode *f, CUDD_VALUE_TYPE value)
 Converts an ADD to a BDD. More...
 
DdNodeCudd_addBddInterval (DdManager *dd, DdNode *f, CUDD_VALUE_TYPE lower, CUDD_VALUE_TYPE upper)
 Converts an ADD to a BDD. More...
 
DdNodeCudd_addBddIthBit (DdManager *dd, DdNode *f, int bit)
 Converts an ADD to a BDD by extracting the i-th bit from the leaves. More...
 
DdNodeCudd_BddToAdd (DdManager *dd, DdNode *B)
 Converts a BDD to a 0-1 ADD. More...
 
DdNodeCudd_addBddPattern (DdManager *dd, DdNode *f)
 Converts an ADD to a BDD. More...
 
DdNodeCudd_bddTransfer (DdManager *ddSource, DdManager *ddDestination, DdNode *f)
 Convert a BDD from a manager to another one. More...
 
DdNodecuddBddTransfer (DdManager *ddS, DdManager *ddD, DdNode *f)
 Convert a BDD from a manager to another one. More...
 
DdNodecuddAddBddDoPattern (DdManager *dd, DdNode *f)
 Performs the recursive step for Cudd_addBddPattern. More...
 
static DdNodeaddBddDoThreshold (DdManager *dd, DdNode *f, DdNode *val)
 Performs the recursive step for Cudd_addBddThreshold. More...
 
static DdNodeaddBddDoStrictThreshold (DdManager *dd, DdNode *f, DdNode *val)
 Performs the recursive step for Cudd_addBddStrictThreshold. More...
 
static DdNodeaddBddDoInterval (DdManager *dd, DdNode *f, DdNode *l, DdNode *u)
 Performs the recursive step for Cudd_addBddInterval. More...
 
static DdNodeaddBddDoIthBit (DdManager *dd, DdNode *f, DdNode *index)
 Performs the recursive step for Cudd_addBddIthBit. More...
 
static DdNodeddBddToAddRecur (DdManager *dd, DdNode *B)
 Performs the recursive step for Cudd_BddToAdd. More...
 
static DdNodecuddBddTransferRecur (DdManager *ddS, DdManager *ddD, DdNode *f, st_table *table)
 Performs the recursive step of Cudd_bddTransfer. More...
 

Detailed Description

Translation from BDD to ADD and vice versa and transfer between different managers.

Author
Fabio Somenzi

Function Documentation

◆ addBddDoInterval()

static DdNode* addBddDoInterval ( DdManager dd,
DdNode f,
DdNode l,
DdNode u 
)
static

Performs the recursive step for Cudd_addBddInterval.

Returns
a pointer to the BDD if successful; NULL otherwise.
Side effects None
See also
addBddDoThreshold addBddDoStrictThreshold

◆ addBddDoIthBit()

static DdNode* addBddDoIthBit ( DdManager dd,
DdNode f,
DdNode index 
)
static

Performs the recursive step for Cudd_addBddIthBit.

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

◆ addBddDoStrictThreshold()

static DdNode* addBddDoStrictThreshold ( DdManager dd,
DdNode f,
DdNode val 
)
static

Performs the recursive step for Cudd_addBddStrictThreshold.

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

◆ addBddDoThreshold()

static DdNode* addBddDoThreshold ( DdManager dd,
DdNode f,
DdNode val 
)
static

Performs the recursive step for Cudd_addBddThreshold.

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

◆ Cudd_addBddInterval()

DdNode* Cudd_addBddInterval ( DdManager dd,
DdNode f,
CUDD_VALUE_TYPE  lower,
CUDD_VALUE_TYPE  upper 
)

Converts an ADD to a BDD.

Replaces all discriminants greater than or equal to lower and less than or equal to upper with 1, and all other discriminants with 0.

Returns
a pointer to the resulting BDD if successful; NULL otherwise.
Side effects None
See also
Cudd_addBddThreshold Cudd_addBddStrictThreshold Cudd_addBddPattern Cudd_BddToAdd

◆ Cudd_addBddIthBit()

DdNode* Cudd_addBddIthBit ( DdManager dd,
DdNode f,
int  bit 
)

Converts an ADD to a BDD by extracting the i-th bit from the leaves.

Converts an ADD to a BDD by replacing all discriminants whose i-th bit is equal to 1 with 1, and all other discriminants with 0. The i-th bit refers to the integer representation of the leaf value. If the value has a fractional part, it is ignored. Repeated calls to this procedure allow one to transform an integer-valued ADD into an array of BDDs, one for each bit of the leaf values.

Returns
a pointer to the resulting BDD if successful; NULL otherwise.
Side effects None
See also
Cudd_addBddInterval Cudd_addBddPattern Cudd_BddToAdd

◆ Cudd_addBddPattern()

DdNode* Cudd_addBddPattern ( DdManager dd,
DdNode f 
)

Converts an ADD to a BDD.

Replaces all discriminants different from 0 with 1.

Returns
a pointer to the resulting BDD if successful; NULL otherwise.
Side effects None
See also
Cudd_BddToAdd Cudd_addBddThreshold Cudd_addBddInterval Cudd_addBddStrictThreshold

◆ Cudd_addBddStrictThreshold()

DdNode* Cudd_addBddStrictThreshold ( DdManager dd,
DdNode f,
CUDD_VALUE_TYPE  value 
)

Converts an ADD to a BDD.

Replaces all discriminants STRICTLY greater than value with 1, and all other discriminants with 0.

Returns
a pointer to the resulting BDD if successful; NULL otherwise.
Side effects None
See also
Cudd_addBddInterval Cudd_addBddPattern Cudd_BddToAdd Cudd_addBddThreshold

◆ Cudd_addBddThreshold()

DdNode* Cudd_addBddThreshold ( DdManager dd,
DdNode f,
CUDD_VALUE_TYPE  value 
)

Converts an ADD to a BDD.

Replaces all discriminants greater than or equal to value with 1, and all other discriminants with 0.

Returns
a pointer to the resulting BDD if successful; NULL otherwise.
Side effects None
See also
Cudd_addBddInterval Cudd_addBddPattern Cudd_BddToAdd Cudd_addBddStrictThreshold

◆ Cudd_BddToAdd()

DdNode* Cudd_BddToAdd ( DdManager dd,
DdNode B 
)

Converts a BDD to a 0-1 ADD.

Returns
a pointer to the resulting ADD if successful; NULL otherwise.
Side effects None
See also
Cudd_addBddPattern Cudd_addBddThreshold Cudd_addBddInterval Cudd_addBddStrictThreshold

◆ Cudd_bddTransfer()

DdNode* Cudd_bddTransfer ( DdManager ddSource,
DdManager ddDestination,
DdNode f 
)

Convert a BDD from a manager to another one.

The orders of the variables in the two managers may be different.

Returns
a pointer to the BDD in the destination manager if successful; NULL otherwise.
Side effects None

◆ cuddAddBddDoPattern()

DdNode* cuddAddBddDoPattern ( DdManager dd,
DdNode f 
)

Performs the recursive step for Cudd_addBddPattern.

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

◆ cuddBddTransfer()

DdNode* cuddBddTransfer ( DdManager ddS,
DdManager ddD,
DdNode f 
)

Convert a BDD from a manager to another one.

Returns
a pointer to the BDD in the destination manager if successful; NULL otherwise.
Side effects None
See also
Cudd_bddTransfer

◆ cuddBddTransferRecur()

static DdNode* cuddBddTransferRecur ( DdManager ddS,
DdManager ddD,
DdNode f,
st_table table 
)
static

Performs the recursive step of Cudd_bddTransfer.

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

◆ ddBddToAddRecur()

static DdNode* ddBddToAddRecur ( DdManager dd,
DdNode B 
)
static

Performs the recursive step for Cudd_BddToAdd.

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