static unsigned int
AssessPathLength(
unsigned int * pathLengthArray, array determining number of nodes belonging to the different path lengths
int threshold, threshold to determine maximum allowable nodes in the subset
int numVars, maximum number of variables
unsigned int * excess, number of nodes labeled maxpath required in the subset
FILE * fp where to write messages
)
- Chooses the maximum allowable path length under each node.
The corner cases are when the threshold is larger than the number
of nodes in the BDD iself, in which case 'numVars + 1' is returned.
If all nodes of a particular path length are needed, then the
maxpath returned is the next one with excess nodes = 0;
- Side Effects None
- Defined in
cuddSubsetSP.c
static int
BAapplyBias(
DdManager * dd,
DdNode * f,
DdNode * b,
ApproxInfo * info,
DdHashTable * cache
)
- Finds don't care nodes by traversing f and b in parallel.
Returns the care status of the visited f node if successful; CARE_ERROR
otherwise.
- Side Effects None
- See Also
cuddBiasedUnderApprox
- Defined in
cuddApprox.c
static int
BAmarkNodes(
DdManager * dd, manager
DdNode * f, function to be analyzed
ApproxInfo * info, info on BDD
int threshold, when to stop approximating
double quality1, minimum improvement for accepted changes when b=1
double quality0 minimum improvement for accepted changes when b=0
)
- Marks nodes for remapping. Returns 1 if successful; 0
otherwise.
- Side Effects None
- See Also
cuddRemapUnderApprox
- Defined in
cuddApprox.c
static Conjuncts *
BuildConjuncts(
DdManager * dd,
DdNode * node,
st_table * distanceTable,
st_table * cacheTable,
int approxDistance,
int maxLocalRef,
st_table * ghTable,
st_table * mintermTable
)
- Builds the conjuncts recursively, bottom up. Constants
are returned as (f, f). The cache is checked for previously computed
result. The decomposition points are determined by the local
reference count of this node and the longest distance from the
constant. At the decomposition point, the factors returned are (f,
1). Recur on the two children. The order is determined by the
heavier branch. Combine the factors of the two children and pick the
one that already occurs in the gh table. Occurence in g is indicated
by value 1, occurence in h by 2, occurence in both 3.
- See Also
cuddConjunctsAux
- Defined in
cuddDecomp.c
static DdNode *
BuildSubsetBdd(
DdManager * dd, DD manager
st_table * pathTable, path table with path lengths and computed results
DdNode * node, current node
struct AssortedInfo * info, assorted information structure
st_table * subsetNodeTable table storing computed results
)
- Builds the BDD with nodes labeled with path length
under maxpath and as many nodes labeled maxpath as determined by the
threshold. The procedure uses the path table to determine which nodes
in the original bdd need to be retained. This procedure picks a
shortest path (tie break decided by taking the child with the shortest
distance to the constant) and recurs down the path till it reaches the
constant. the procedure then starts building the subset upward from
the constant. All nodes labeled by path lengths less than the given
maxpath are used to build the subset. However, in the case of nodes
that have label equal to maxpath, as many are chosen as required by
the threshold. This number is stored in the info structure in the
field thresholdReached. This field is decremented whenever a node
labeled maxpath is encountered and the nodes labeled maxpath are
aggregated in a maxpath table. As soon as the thresholdReached count
goes to 0, the shortest path from this node to the constant is found.
The extraction of nodes with the above labeling is based on the fact
that each node, labeled with a path length, P, has at least one child
labeled P or less. So extracting all nodes labeled a given path length
P ensures complete paths between the root and the constant. Extraction
of a partial number of nodes with a given path length may result in
incomplete paths and hence the additional number of nodes are grabbed
to complete the path. Since the Bdd is built bottom-up, other nodes
labeled maxpath do lie on complete paths. The procedure may cause the
subset to have a larger or smaller number of nodes than the specified
threshold. The increase in the number of nodes is caused by the
building of a subset and the reduction by recombination. However in
most cases, the recombination overshadows the increase and the
procedure returns a result with lower number of nodes than specified.
The subsetNodeTable is NIL when there is no hard limit on the number
of nodes. Further efforts towards keeping the subset closer to the
threshold number were abandoned in favour of keeping the procedure
simple and fast.
- Side Effects SubsetNodeTable is changed if it is not NIL.
- Defined in
cuddSubsetSP.c
static DdNode *
BuildSubsetBdd(
DdManager * dd, DD manager
DdNode * node, current node
int * size, current size of the subset
st_table * visitedTable, visited table storing all node data
int threshold,
st_table * storeTable,
st_table * approxTable
)
- The procedure carries out the building of the subset BDD
starting at the root. Using the three different counts labelling each node,
the procedure chooses the heavier branch starting from the root and keeps
track of the number of nodes it discards at each step, thus keeping count
of the size of the subset BDD dynamically. Once the threshold is satisfied,
the procedure then calls ITE to build the BDD.
- Side Effects None
- Defined in
cuddSubsetHB.c
static Conjuncts *
CheckInTables(
DdNode * node,
DdNode * g1,
DdNode * h1,
DdNode * g2,
DdNode * h2,
st_table * ghTable,
st_table * cacheTable,
int * outOfMem
)
- Check if the two pairs exist in the table. If any of
the conjuncts do exist, store in the cache and return the
corresponding pair.
- See Also
ZeroCase
BuildConjuncts
- Defined in
cuddDecomp.c
static Conjuncts *
CheckTablesCacheAndReturn(
DdNode * node,
DdNode * g,
DdNode * h,
st_table * ghTable,
st_table * cacheTable
)
- Check the tables for the existence of pair and return
one combination, cache the result. The assumption is that one of the
conjuncts is already in the tables.
- Side Effects g and h referenced for the cache
- See Also
ZeroCase
- Defined in
cuddDecomp.c
static void
ConjunctsFree(
DdManager * dd,
Conjuncts * factors
)
- Free factors structure
- Side Effects None
- Defined in
cuddDecomp.c
static enum st_retval
CorrelCleanUp(
char * key,
char * value,
char * arg
)
- Frees memory associated with hash table. Returns
ST_CONTINUE.
- Side Effects None
- Defined in
cuddBddCorr.c
static int
CorrelCompare(
const char * key1,
const char * key2
)
- Compares two hash table entries. Returns 0 if they are
identical; 1 otherwise.
- Side Effects None
- Defined in
cuddBddCorr.c
static int
CorrelHash(
char * key,
int modulus
)
- Hashes a hash table entry. It is patterned after
st_strhash. Returns a value between 0 and modulus.
- Side Effects None
- Defined in
cuddBddCorr.c
static double
CountMinterms(
DdNode * node,
double max,
st_table * mintermTable,
FILE * fp
)
- Count the number of minterms of each node ina a BDD and
store it in a hash table.
- Side Effects None
- Defined in
cuddDecomp.c
static NodeStat *
CreateBotDist(
DdNode * node,
st_table * distanceTable
)
- Get longest distance of node from constant. Returns the
distance of the root from the constant if successful; CUDD_OUT_OF_MEM
otherwise.
- Side Effects None
- Defined in
cuddDecomp.c
static int
CreateBotDist(
DdNode * node, current node
st_table * pathTable, path table with path lengths
unsigned int * pathLengthArray, array that stores number of nodes belonging to a particular path length.
FILE * fp where to write messages
)
- Labels each node with the shortest distance from the constant.
This is done in a DFS search of the BDD. Each node has an odd
and even parity distance from the sink (since there exists paths to both
zero and one) which is less than MAXSHORTINT. At each node these distances
are updated using the minimum distance of its children from the constant.
SInce now both the length from the root and child is known, the minimum path
length(length of the shortest path between the root and the constant that
this node lies on) of this node can be calculated and used to update the
pathLengthArray
- Side Effects Updates Path Table and path length array
- See Also
CreatePathTable
CreateTopDist
AssessPathLength
- Defined in
cuddSubsetSP.c
static st_table *
CreatePathTable(
DdNode * node, root of function
unsigned int * pathLengthArray, array of path lengths to store nodes labeled with the various path lengths
FILE * fp where to write messages
)
- The outer procedure to label each node with its shortest
distance from the root and constant. Calls CreateTopDist and CreateBotDist.
The basis for computing the distance between root and constant is that
the distance may be the sum of even distances from the node to the root
and constant or the sum of odd distances from the node to the root and
constant. Both CreateTopDist and CreateBotDist create the odd and
even parity distances from the root and constant respectively.
- Side Effects None
- See Also
CreateTopDist
CreateBotDist
- Defined in
cuddSubsetSP.c
static void
CreateTopDist(
st_table * pathTable, hast table to store path lengths
int parentPage, the pointer to the page on which the first parent in the queue is to be found.
int parentQueueIndex, pointer to the first parent on the page
int topLen, current distance from the root
DdNode ** childPage, pointer to the page on which the first child is to be added.
int childQueueIndex, pointer to the first child
int numParents, number of parents to process in this recursive call
FILE * fp where to write messages
)
- Labels each node with its shortest distance from the root.
This is done in a BFS search of the BDD. The nodes are processed
in a queue implemented as pages(array) to reduce memory fragmentation.
An entry is created for each node visited. The distance from the root
to the node with the corresponding parity is updated. The procedure
is called recursively each recusion level handling nodes at a given
level from the root.
- Side Effects Creates entries in the pathTable
- See Also
CreatePathTable
CreateBotDist
- Defined in
cuddSubsetSP.c
int
Cudd_AddHook(
DdManager * dd,
DD_HFP f,
Cudd_HookType where
)
- Adds a function to a hook. A hook is a list of
application-provided functions called on certain occasions by the
package. Returns 1 if the function is successfully added; 2 if the
function was already in the list; 0 otherwise.
- Side Effects None
- See Also
Cudd_RemoveHook
- Defined in
cuddAPI.c
DdApaDigit
Cudd_ApaAdd(
int digits,
DdApaNumber a,
DdApaNumber b,
DdApaNumber sum
)
- Adds two arbitrary precision integers. Returns the
carry out of the most significant digit.
- Side Effects The result of the sum is stored in parameter
sum
.
- Defined in
cuddApa.c
int
Cudd_ApaCompareRatios(
int digitsFirst,
DdApaNumber firstNum,
unsigned int firstDen,
int digitsSecond,
DdApaNumber secondNum,
unsigned int secondDen
)
- Compares the ratios of two arbitrary precision integers
to two unsigned ints. Returns 1 if the first number is larger; 0 if
they are equal; -1 if the second number is larger.
- Side Effects None
- Defined in
cuddApa.c
int
Cudd_ApaCompare(
int digitsFirst,
DdApaNumber first,
int digitsSecond,
DdApaNumber second
)
- Compares two arbitrary precision integers. Returns 1 if
the first number is larger; 0 if they are equal; -1 if the second
number is larger.
- Side Effects None
- Defined in
cuddApa.c
void
Cudd_ApaCopy(
int digits,
DdApaNumber source,
DdApaNumber dest
)
- Makes a copy of an arbitrary precision integer.
- Side Effects Changes parameter
dest
.
- Defined in
cuddApa.c
DdApaNumber
Cudd_ApaCountMinterm(
DdManager * manager,
DdNode * node,
int nvars,
int * digits
)
- Counts the number of minterms of a DD. The function is
assumed to depend on nvars variables. The minterm count is
represented as an arbitrary precision unsigned integer, to allow for
any number of variables CUDD supports. Returns a pointer to the
array representing the number of minterms of the function rooted at
node if successful; NULL otherwise.
- Side Effects The number of digits of the result is returned in
parameter
digits
.
- See Also
Cudd_CountMinterm
- Defined in
cuddApa.c
unsigned int
Cudd_ApaIntDivision(
int digits,
DdApaNumber dividend,
unsigned int divisor,
DdApaNumber quotient
)
- Divides an arbitrary precision integer by a 32-bit
unsigned integer. Returns the remainder of the division. This
procedure relies on the assumption that the number of bits of a
DdApaDigit plus the number of bits of an unsigned int is less the
number of bits of the mantissa of a double. This guarantees that the
product of a DdApaDigit and an unsigned int can be represented
without loss of precision by a double. On machines where this
assumption is not satisfied, this procedure will malfunction.
- Side Effects The quotient is returned in parameter
quotient
.
- See Also
Cudd_ApaShortDivision
- Defined in
cuddApa.c
int
Cudd_ApaNumberOfDigits(
int binaryDigits
)
- Finds the number of digits for an arbitrary precision
integer given the maximum number of binary digits. The number of
binary digits should be positive. Returns the number of digits if
successful; 0 otherwise.
- Side Effects None
- Defined in
cuddApa.c
void
Cudd_ApaPowerOfTwo(
int digits,
DdApaNumber number,
int power
)
- Sets an arbitrary precision integer to a power of
two. If the power of two is too large to be represented, the number
is set to 0.
- Side Effects The result is returned in parameter
number
.
- Defined in
cuddApa.c
int
Cudd_ApaPrintDecimal(
FILE * fp,
int digits,
DdApaNumber number
)
- Prints an arbitrary precision integer in decimal format.
Returns 1 if successful; 0 otherwise.
- Side Effects None
- See Also
Cudd_ApaPrintHex
Cudd_ApaPrintExponential
- Defined in
cuddApa.c
int
Cudd_ApaPrintDensity(
FILE * fp,
DdManager * dd,
DdNode * node,
int nvars
)
- Prints the density of a BDD or ADD using
arbitrary precision arithmetic. Returns 1 if successful; 0 otherwise.
- Side Effects None
- Defined in
cuddApa.c
int
Cudd_ApaPrintExponential(
FILE * fp,
int digits,
DdApaNumber number,
int precision
)
- Prints an arbitrary precision integer in exponential format.
Returns 1 if successful; 0 otherwise.
- Side Effects None
- See Also
Cudd_ApaPrintHex
Cudd_ApaPrintDecimal
- Defined in
cuddApa.c
int
Cudd_ApaPrintHex(
FILE * fp,
int digits,
DdApaNumber number
)
- Prints an arbitrary precision integer in hexadecimal format.
Returns 1 if successful; 0 otherwise.
- Side Effects None
- See Also
Cudd_ApaPrintDecimal
Cudd_ApaPrintExponential
- Defined in
cuddApa.c
int
Cudd_ApaPrintMintermExp(
FILE * fp,
DdManager * dd,
DdNode * node,
int nvars,
int precision
)
- Prints the number of minterms of a BDD or ADD in
exponential format using arbitrary precision arithmetic. Parameter
precision controls the number of signficant digits printed. Returns
1 if successful; 0 otherwise.
- Side Effects None
- See Also
Cudd_ApaPrintMinterm
- Defined in
cuddApa.c
int
Cudd_ApaPrintMinterm(
FILE * fp,
DdManager * dd,
DdNode * node,
int nvars
)
- Prints the number of minterms of a BDD or ADD using
arbitrary precision arithmetic. Returns 1 if successful; 0 otherwise.
- Side Effects None
- See Also
Cudd_ApaPrintMintermExp
- Defined in
cuddApa.c
void
Cudd_ApaSetToLiteral(
int digits,
DdApaNumber number,
DdApaDigit literal
)
- Sets an arbitrary precision integer to a one-digit literal.
- Side Effects The result is returned in parameter
number
.
- Defined in
cuddApa.c
void
Cudd_ApaShiftRight(
int digits,
DdApaDigit in,
DdApaNumber a,
DdApaNumber b
)
- Shifts right an arbitrary precision integer by one
binary place. The most significant binary digit of the result is
taken from parameter
in
.
- Side Effects The result is returned in parameter
b
.
- Defined in
cuddApa.c
DdApaDigit
Cudd_ApaShortDivision(
int digits,
DdApaNumber dividend,
DdApaDigit divisor,
DdApaNumber quotient
)
- Divides an arbitrary precision integer by a digit.
- Side Effects The quotient is returned in parameter
quotient
.
- Defined in
cuddApa.c
DdApaDigit
Cudd_ApaSubtract(
int digits,
DdApaNumber a,
DdApaNumber b,
DdApaNumber diff
)
- Subtracts two arbitrary precision integers. Returns the
borrow out of the most significant digit.
- Side Effects The result of the subtraction is stored in parameter
diff
.
- Defined in
cuddApa.c
void
Cudd_AutodynDisableZdd(
DdManager * unique
)
- Disables automatic dynamic reordering of ZDDs.
- Side Effects None
- See Also
Cudd_AutodynEnableZdd
Cudd_ReorderingStatusZdd
Cudd_AutodynDisable
- Defined in
cuddAPI.c
void
Cudd_AutodynDisable(
DdManager * unique
)
- Disables automatic dynamic reordering.
- Side Effects None
- See Also
Cudd_AutodynEnable
Cudd_ReorderingStatus
Cudd_AutodynDisableZdd
- Defined in
cuddAPI.c
void
Cudd_AutodynEnableZdd(
DdManager * unique,
Cudd_ReorderingType method
)
- Enables automatic dynamic reordering of ZDDs. Parameter
method is used to determine the method used for reordering ZDDs. If
CUDD_REORDER_SAME is passed, the method is unchanged.
- Side Effects None
- See Also
Cudd_AutodynDisableZdd
Cudd_ReorderingStatusZdd
Cudd_AutodynEnable
- Defined in
cuddAPI.c
void
Cudd_AutodynEnable(
DdManager * unique,
Cudd_ReorderingType method
)
- Enables automatic dynamic reordering of BDDs and
ADDs. Parameter method is used to determine the method used for
reordering. If CUDD_REORDER_SAME is passed, the method is
unchanged.
- Side Effects None
- See Also
Cudd_AutodynDisable
Cudd_ReorderingStatus
Cudd_AutodynEnableZdd
- Defined in
cuddAPI.c
double
Cudd_AverageDistance(
DdManager * dd
)
- Computes the average distance between adjacent nodes in
the manager. Adjacent nodes are node pairs such that the second node
is the then child, else child, or next node in the collision list.
- Side Effects None
- Defined in
cuddUtil.c
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
- Defined in
cuddBridge.c
int
Cudd_BddToCubeArray(
DdManager * dd,
DdNode * cube,
int * array
)
- Builds a positional array from the BDD of a cube.
Array must have one entry for each BDD variable. The positional
array has 1 in i-th position if the variable of index i appears in
true form in the cube; it has 0 in i-th position if the variable of
index i appears in complemented form in the cube; finally, it has 2
in i-th position if the variable of index i does not appear in the
cube. Returns 1 if successful (the BDD is indeed a cube); 0
otherwise.
- Side Effects The result is in the array passed by reference.
- See Also
Cudd_CubeArrayToBdd
- Defined in
cuddUtil.c
DdNode *
Cudd_BiasedOverApprox(
DdManager * dd, manager
DdNode * f, function to be superset
DdNode * b, bias function
int numVars, number of variables in the support of f
int threshold, when to stop approximation
double quality1, minimum improvement for accepted changes when b=1
double quality0 minimum improvement for accepted changes when b=0
)
- Extracts a dense superset from a BDD. The procedure is
identical to the underapproximation procedure except for the fact that it
works on the complement of the given function. Extracting the subset
of the complement function is equivalent to extracting the superset
of the function.
Returns a pointer to the BDD of the superset if successful. NULL if
intermediate result causes the procedure to run out of memory. The
parameter numVars is the maximum number of variables to be used in
minterm calculation. The optimal number
should be as close as possible to the size of the support of f.
However, it is safe to pass the value returned by Cudd_ReadSize for
numVars when the number of variables is under 1023. If numVars is
larger than 1023, it will overflow. If a 0 parameter is passed then
the procedure will compute a value which will avoid overflow but
will cause underflow with 2046 variables or more.
- Side Effects None
- See Also
Cudd_SupersetHeavyBranch
Cudd_SupersetShortPaths
Cudd_RemapOverApprox
Cudd_BiasedUnderApprox
Cudd_ReadSize
- Defined in
cuddApprox.c
DdNode *
Cudd_BiasedUnderApprox(
DdManager * dd, manager
DdNode * f, function to be subset
DdNode * b, bias function
int numVars, number of variables in the support of f
int threshold, when to stop approximation
double quality1, minimum improvement for accepted changes when b=1
double quality0 minimum improvement for accepted changes when b=0
)
- Extracts a dense subset from a BDD. This procedure uses
a biased remapping technique and density as the cost function. The bias
is a function. This procedure tries to approximate where the bias is 0
and preserve the given function where the bias is 1.
Returns a pointer to the BDD of the subset if
successful. NULL if the procedure runs out of memory. The parameter
numVars is the maximum number of variables to be used in minterm
calculation. The optimal number should be as close as possible to
the size of the support of f. However, it is safe to pass the value
returned by Cudd_ReadSize for numVars when the number of variables
is under 1023. If numVars is larger than 1023, it will cause
overflow. If a 0 parameter is passed then the procedure will compute
a value which will avoid overflow but will cause underflow with 2046
variables or more.
- Side Effects None
- See Also
Cudd_SubsetShortPaths
Cudd_SubsetHeavyBranch
Cudd_UnderApprox
Cudd_RemapUnderApprox
Cudd_ReadSize
- Defined in
cuddApprox.c
DdNode *
Cudd_CProjection(
DdManager * dd,
DdNode * R,
DdNode * Y
)
- Computes the compatible projection of relation R with
respect to cube Y. Returns a pointer to the c-projection if
successful; NULL otherwise. For a comparison between Cudd_CProjection
and Cudd_PrioritySelect, see the documentation of the latter.
- Side Effects None
- See Also
Cudd_PrioritySelect
- Defined in
cuddPriority.c
int
Cudd_CheckKeys(
DdManager * table
)
- Checks for the following conditions:
- Wrong sizes of subtables.
- Wrong number of keys found in unique subtable.
- Wrong number of dead found in unique subtable.
- Wrong number of keys found in the constant table
- Wrong number of dead found in the constant table
- Wrong number of total slots found
- Wrong number of maximum keys found
- Wrong number of total dead found
Reports the average length of non-empty lists. Returns the number of
subtables for which the number of keys is wrong.
- Side Effects None
- See Also
Cudd_DebugCheck
- Defined in
cuddCheck.c
int
Cudd_CheckZeroRef(
DdManager * manager
)
- Checks the unique table for nodes with non-zero
reference counts. It is normally called before Cudd_Quit to make sure
that there are no memory leaks due to missing Cudd_RecursiveDeref's.
Takes into account that reference counts may saturate and that the
basic constants and the projection functions are referenced by the
manager. Returns the number of nodes with non-zero reference count.
(Except for the cases mentioned above.)
- Side Effects None
- Defined in
cuddRef.c
int
Cudd_ClassifySupport(
DdManager * dd, manager
DdNode * f, first DD
DdNode * g, second DD
DdNode ** common, cube of shared variables
DdNode ** onlyF, cube of variables only in f
DdNode ** onlyG cube of variables only in g
)
- Classifies the variables in the support of two DDs
f
and g
, depending on whther they appear
in both DDs, only in f
, or only in g
.
Returns 1 if successful; 0 otherwise.
- Side Effects The cubes of the three classes of variables are
returned as side effects.
- See Also
Cudd_Support
Cudd_VectorSupport
- Defined in
cuddUtil.c
void
Cudd_ClearErrorCode(
DdManager * dd
)
- Clear the error code of a manager.
- Side Effects None
- See Also
Cudd_ReadErrorCode
- Defined in
cuddAPI.c
double *
Cudd_CofMinterm(
DdManager * dd,
DdNode * node
)
- Computes the fraction of minterms in the on-set of all
the positive cofactors of DD. Returns the pointer to an array of
doubles if successful; NULL otherwise. The array has as many
positions as there are BDD variables in the manager plus one. The
last position of the array contains the fraction of the minterms in
the ON-set of the function represented by the BDD or ADD. The other
positions of the array hold the variable signatures.
- Side Effects None
- Defined in
cuddSign.c
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
- Defined in
cuddCof.c
int
Cudd_CountLeaves(
DdNode * node
)
- Counts the number of leaves in a DD. Returns the number
of leaves in the DD rooted at node if successful; CUDD_OUT_OF_MEM
otherwise.
- Side Effects None
- See Also
Cudd_PrintDebug
- Defined in
cuddUtil.c
double
Cudd_CountMinterm(
DdManager * manager,
DdNode * node,
int nvars
)
- Counts the number of minterms of a DD. The function is
assumed to depend on nvars variables. The minterm count is
represented as a double, to allow for a larger number of variables.
Returns the number of minterms of the function rooted at node if
successful; (double) CUDD_OUT_OF_MEM otherwise.
- Side Effects None
- See Also
Cudd_PrintDebug
Cudd_CountPath
- Defined in
cuddUtil.c
double
Cudd_CountPathsToNonZero(
DdNode * node
)
- Counts the number of paths to a non-zero terminal of a
DD. The path count is
represented as a double, to allow for a larger number of variables.
Returns the number of paths of the function rooted at node.
- Side Effects None
- See Also
Cudd_CountMinterm
Cudd_CountPath
- Defined in
cuddUtil.c
double
Cudd_CountPath(
DdNode * node
)
- Counts the number of paths of a DD. Paths to all
terminal nodes are counted. The path count is represented as a
double, to allow for a larger number of variables. Returns the
number of paths of the function rooted at node if successful;
(double) CUDD_OUT_OF_MEM otherwise.
- Side Effects None
- See Also
Cudd_CountMinterm
- Defined in
cuddUtil.c
DdNode *
Cudd_CubeArrayToBdd(
DdManager * dd,
int * array
)
- Builds a cube from a positional array. The array must
have one integer entry for each BDD variable. If the i-th entry is
1, the variable of index i appears in true form in the cube; If the
i-th entry is 0, the variable of index i appears complemented in the
cube; otherwise the variable does not appear in the cube. Returns a
pointer to the BDD for the cube if successful; NULL otherwise.
- Side Effects None
- See Also
Cudd_bddComputeCube
Cudd_IndicesToCube
Cudd_BddToCubeArray
- Defined in
cuddUtil.c
int
Cudd_DagSize(
DdNode * node
)
- Counts the number of nodes in a DD. Returns the number
of nodes in the graph rooted at node.
- Side Effects None
- See Also
Cudd_SharingSize
Cudd_PrintDebug
- Defined in
cuddUtil.c
int
Cudd_DeadAreCounted(
DdManager * dd
)
- Tells whether dead nodes are counted towards triggering
reordering. Returns 1 if dead nodes are counted; 0 otherwise.
- Side Effects None
- See Also
Cudd_TurnOnCountDead
Cudd_TurnOffCountDead
- Defined in
cuddAPI.c
int
Cudd_DebugCheck(
DdManager * table
)
- Checks for inconsistencies in the DD heap:
- node has illegal index
- live node has dead children
- node has illegal Then or Else pointers
- BDD/ADD node has identical children
- ZDD node has zero then child
- wrong number of total nodes
- wrong number of dead nodes
- ref count error at node
Returns 0 if no inconsistencies are found; DD_OUT_OF_MEM if there is
not enough memory; 1 otherwise.
- Side Effects None
- See Also
Cudd_CheckKeys
- Defined in
cuddCheck.c
DdNode *
Cudd_Decreasing(
DdManager * dd,
DdNode * f,
int i
)
- Determines whether the function represented by BDD f is
negative unate (monotonic decreasing) in variable i. Returns the
constant one is f is unate and the (logical) constant zero if it is not.
This function does not generate any new nodes.
- Side Effects None
- See Also
Cudd_Increasing
- Defined in
cuddSat.c
void
Cudd_DelayedDerefBdd(
DdManager * table,
DdNode * n
)
- Enqueues node n for later dereferencing. If the queue
is full decreases the reference count of the oldest node N to make
room for n. If N dies, recursively decreases the reference counts of
its children. It is used to dispose of a BDD that is currently not
needed, but may be useful again in the near future. The dereferencing
proper is done as in Cudd_IterDerefBdd.
- Side Effects None
- See Also
Cudd_RecursiveDeref
Cudd_IterDerefBdd
- Defined in
cuddRef.c
double
Cudd_Density(
DdManager * dd, manager
DdNode * f, function whose density is sought
int nvars size of the support of f
)
- Computes the density of a BDD or ADD. The density is
the ratio of the number of minterms to the number of nodes. If 0 is
passed as number of variables, the number of variables existing in
the manager is used. Returns the density if successful; (double)
CUDD_OUT_OF_MEM otherwise.
- Side Effects None
- See Also
Cudd_CountMinterm
Cudd_DagSize
- Defined in
cuddUtil.c
void
Cudd_Deref(
DdNode * node
)
- Decreases the reference count of node. It is primarily
used in recursive procedures to decrease the ref count of a result
node before returning it. This accomplishes the goal of removing the
protection applied by a previous Cudd_Ref.
- Side Effects None
- See Also
Cudd_RecursiveDeref
Cudd_RecursiveDerefZdd
Cudd_Ref
- Defined in
cuddRef.c
void
Cudd_DisableGarbageCollection(
DdManager * dd
)
- Disables garbage collection. Garbage collection is
initially enabled. This function may be called to disable it.
However, garbage collection will still occur when a new node must be
created and no memory is left, or when garbage collection is required
for correctness. (E.g., before reordering.)
- Side Effects None
- See Also
Cudd_EnableGarbageCollection
Cudd_GarbageCollectionEnabled
- Defined in
cuddAPI.c
int
Cudd_DisableReorderingReporting(
DdManager * dd
)
- Disables reporting of reordering stats.
Returns 1 if successful; 0 otherwise.
- Side Effects Removes functions from the pre-reordering and post-reordering
hooks.
- See Also
Cudd_EnableReorderingReporting
Cudd_ReorderingReporting
- Defined in
cuddAPI.c
DdNode *
Cudd_Disequality(
DdManager * dd, DD manager
int N, number of x and y variables
int c, right-hand side constant
DdNode ** x, array of x variables
DdNode ** y array of y variables
)
- This function generates a BDD for the function x -y != c.
Both x and y are N-bit numbers, x[0] x[1] ... x[N-1] and
y[0] y[1] ... y[N-1], with 0 the most significant bit.
The BDD is built bottom-up.
It has a linear number of nodes if the variables are ordered as follows:
x[0] y[0] x[1] y[1] ... x[N-1] y[N-1].
- Side Effects None
- See Also
Cudd_Xgty
- Defined in
cuddPriority.c
int
Cudd_DumpBlifBody(
DdManager * dd, manager
int n, number of output nodes to be dumped
DdNode ** f, array of output nodes to be dumped
char ** inames, array of input names (or NULL)
char ** onames, array of output names (or NULL)
FILE * fp, pointer to the dump file
int mv 0: blif, 1: blif-MV
)
- Writes a blif body representing the argument BDDs as a
network of multiplexers. No header (.model, .inputs, and .outputs) and
footer (.end) are produced by this function. One multiplexer is written
for each BDD node. It returns 1 in case of success; 0 otherwise (e.g.,
out-of-memory, file system full, or an ADD with constants different
from 0 and 1). Cudd_DumpBlifBody does not close the file: This is the
caller responsibility. Cudd_DumpBlifBody uses a minimal unique subset of
the hexadecimal address of a node as name for it. If the argument
inames is non-null, it is assumed to hold the pointers to the names
of the inputs. Similarly for onames. This function prints out only
.names part.
- Side Effects None
- See Also
Cudd_DumpBlif
Cudd_DumpDot
Cudd_PrintDebug
Cudd_DumpDDcal
Cudd_DumpDaVinci
Cudd_DumpFactoredForm
- Defined in
cuddExport.c
int
Cudd_DumpBlif(
DdManager * dd, manager
int n, number of output nodes to be dumped
DdNode ** f, array of output nodes to be dumped
char ** inames, array of input names (or NULL)
char ** onames, array of output names (or NULL)
char * mname, model name (or NULL)
FILE * fp, pointer to the dump file
int mv 0: blif, 1: blif-MV
)
- Writes a blif file representing the argument BDDs as a
network of multiplexers. One multiplexer is written for each BDD
node. It returns 1 in case of success; 0 otherwise (e.g.,
out-of-memory, file system full, or an ADD with constants different
from 0 and 1). Cudd_DumpBlif does not close the file: This is the
caller responsibility. Cudd_DumpBlif uses a minimal unique subset of
the hexadecimal address of a node as name for it. If the argument
inames is non-null, it is assumed to hold the pointers to the names
of the inputs. Similarly for onames.
- Side Effects None
- See Also
Cudd_DumpBlifBody
Cudd_DumpDot
Cudd_PrintDebug
Cudd_DumpDDcal
Cudd_DumpDaVinci
Cudd_DumpFactoredForm
- Defined in
cuddExport.c
int
Cudd_DumpDDcal(
DdManager * dd, manager
int n, number of output nodes to be dumped
DdNode ** f, array of output nodes to be dumped
char ** inames, array of input names (or NULL)
char ** onames, array of output names (or NULL)
FILE * fp pointer to the dump file
)
- Writes a DDcal file representing the argument BDDs.
It returns 1 in case of success; 0 otherwise (e.g., out-of-memory or
file system full). Cudd_DumpDDcal does not close the file: This
is the caller responsibility. Cudd_DumpDDcal uses a minimal unique
subset of the hexadecimal address of a node as name for it. If the
argument inames is non-null, it is assumed to hold the pointers to
the names of the inputs. Similarly for onames.
- Side Effects None
- See Also
Cudd_DumpDot
Cudd_PrintDebug
Cudd_DumpBlif
Cudd_DumpDaVinci
Cudd_DumpFactoredForm
- Defined in
cuddExport.c
int
Cudd_DumpDaVinci(
DdManager * dd, manager
int n, number of output nodes to be dumped
DdNode ** f, array of output nodes to be dumped
char ** inames, array of input names (or NULL)
char ** onames, array of output names (or NULL)
FILE * fp pointer to the dump file
)
- Writes a daVinci file representing the argument BDDs.
It returns 1 in case of success; 0 otherwise (e.g., out-of-memory or
file system full). Cudd_DumpDaVinci does not close the file: This
is the caller responsibility. Cudd_DumpDaVinci uses a minimal unique
subset of the hexadecimal address of a node as name for it. If the
argument inames is non-null, it is assumed to hold the pointers to
the names of the inputs. Similarly for onames.
- Side Effects None
- See Also
Cudd_DumpDot
Cudd_PrintDebug
Cudd_DumpBlif
Cudd_DumpDDcal
Cudd_DumpFactoredForm
- Defined in
cuddExport.c
int
Cudd_DumpDot(
DdManager * dd, manager
int n, number of output nodes to be dumped
DdNode ** f, array of output nodes to be dumped
char ** inames, array of input names (or NULL)
char ** onames, array of output names (or NULL)
FILE * fp pointer to the dump file
)
- Writes a file representing the argument DDs in a format
suitable for the graph drawing program dot.
It returns 1 in case of success; 0 otherwise (e.g., out-of-memory,
file system full).
Cudd_DumpDot does not close the file: This is the caller
responsibility. Cudd_DumpDot uses a minimal unique subset of the
hexadecimal address of a node as name for it.
If the argument inames is non-null, it is assumed to hold the pointers
to the names of the inputs. Similarly for onames.
Cudd_DumpDot uses the following convention to draw arcs:
- solid line: THEN arcs;
- dotted line: complement arcs;
- dashed line: regular ELSE arcs.
The dot options are chosen so that the drawing fits on a letter-size
sheet.
- Side Effects None
- See Also
Cudd_DumpBlif
Cudd_PrintDebug
Cudd_DumpDDcal
Cudd_DumpDaVinci
Cudd_DumpFactoredForm
- Defined in
cuddExport.c
int
Cudd_DumpFactoredForm(
DdManager * dd, manager
int n, number of output nodes to be dumped
DdNode ** f, array of output nodes to be dumped
char ** inames, array of input names (or NULL)
char ** onames, array of output names (or NULL)
FILE * fp pointer to the dump file
)
- Writes factored forms representing the argument BDDs.
The format of the factored form is the one used in the genlib files
for technology mapping in sis. It returns 1 in case of success; 0
otherwise (e.g., file system full). Cudd_DumpFactoredForm does not
close the file: This is the caller responsibility. Caution must be
exercised because a factored form may be exponentially larger than
the argument BDD. If the argument inames is non-null, it is assumed
to hold the pointers to the names of the inputs. Similarly for
onames.
- Side Effects None
- See Also
Cudd_DumpDot
Cudd_PrintDebug
Cudd_DumpBlif
Cudd_DumpDaVinci
Cudd_DumpDDcal
- Defined in
cuddExport.c
DdNode *
Cudd_Dxygtdxz(
DdManager * dd, DD manager
int N, number of x, y, and z variables
DdNode ** x, array of x variables
DdNode ** y, array of y variables
DdNode ** z array of z variables
)
- This function generates a BDD for the function d(x,y)
> d(x,z);
x, y, and z are N-bit numbers, x[0] x[1] ... x[N-1],
y[0] y[1] ... y[N-1], and z[0] z[1] ... z[N-1],
with 0 the most significant bit.
The distance d(x,y) is defined as:
sum_{i=0}^{N-1}(|x_i - y_i| cdot 2^{N-i-1}).
The BDD is built bottom-up.
It has 7*N-3 internal nodes, if the variables are ordered as follows:
x[0] y[0] z[0] x[1] y[1] z[1] ... x[N-1] y[N-1] z[N-1].
- Side Effects None
- See Also
Cudd_PrioritySelect
Cudd_Dxygtdyz
Cudd_Xgty
Cudd_bddAdjPermuteX
- Defined in
cuddPriority.c
DdNode *
Cudd_Dxygtdyz(
DdManager * dd, DD manager
int N, number of x, y, and z variables
DdNode ** x, array of x variables
DdNode ** y, array of y variables
DdNode ** z array of z variables
)
- This function generates a BDD for the function d(x,y)
> d(y,z);
x, y, and z are N-bit numbers, x[0] x[1] ... x[N-1],
y[0] y[1] ... y[N-1], and z[0] z[1] ... z[N-1],
with 0 the most significant bit.
The distance d(x,y) is defined as:
sum_{i=0}^{N-1}(|x_i - y_i| cdot 2^{N-i-1}).
The BDD is built bottom-up.
It has 7*N-3 internal nodes, if the variables are ordered as follows:
x[0] y[0] z[0] x[1] y[1] z[1] ... x[N-1] y[N-1] z[N-1].
- Side Effects None
- See Also
Cudd_PrioritySelect
Cudd_Dxygtdxz
Cudd_Xgty
Cudd_bddAdjPermuteX
- Defined in
cuddPriority.c
void
Cudd_EnableGarbageCollection(
DdManager * dd
)
- Enables garbage collection. Garbage collection is
initially enabled. Therefore it is necessary to call this function
only if garbage collection has been explicitly disabled.
- Side Effects None
- See Also
Cudd_DisableGarbageCollection
Cudd_GarbageCollectionEnabled
- Defined in
cuddAPI.c
int
Cudd_EnableReorderingReporting(
DdManager * dd
)
- Enables reporting of reordering stats.
Returns 1 if successful; 0 otherwise.
- Side Effects Installs functions in the pre-reordering and post-reordering
hooks.
- See Also
Cudd_DisableReorderingReporting
Cudd_ReorderingReporting
- Defined in
cuddAPI.c
int
Cudd_EpdCountMinterm(
DdManager * manager,
DdNode * node,
int nvars,
EpDouble * epd
)
- Counts the number of minterms of a DD with extended precision.
The function is assumed to depend on nvars variables. The minterm count is
represented as an EpDouble, to allow any number of variables.
Returns 0 if successful; CUDD_OUT_OF_MEM otherwise.
- Side Effects None
- See Also
Cudd_PrintDebug
Cudd_CountPath
- Defined in
cuddUtil.c
int
Cudd_EqualSupNorm(
DdManager * dd, manager
DdNode * f, first ADD
DdNode * g, second ADD
CUDD_VALUE_TYPE tolerance, maximum allowed difference
int pr verbosity level
)
- Compares two ADDs for equality within tolerance. Two
ADDs are reported to be equal if the maximum difference between them
(the sup norm of their difference) is less than or equal to the
tolerance parameter. Returns 1 if the two ADDs are equal (within
tolerance); 0 otherwise. If parameter
pr
is positive
the first failure is reported to the standard output.
- Side Effects None
- Defined in
cuddSat.c
int
Cudd_EquivDC(
DdManager * dd,
DdNode * F,
DdNode * G,
DdNode * D
)
- Tells whether F and G are identical wherever D is 0. F
and G are either two ADDs or two BDDs. D is either a 0-1 ADD or a
BDD. The function returns 1 if F and G are equivalent, and 0
otherwise. No new nodes are created.
- Side Effects None
- See Also
Cudd_bddLeqUnless
- Defined in
cuddSat.c
int
Cudd_EstimateCofactorSimple(
DdNode * node,
int i
)
- Estimates the number of nodes in a cofactor of a DD.
Returns an estimate of the number of nodes in the positive cofactor of
the graph rooted at node with respect to the variable whose index is i.
This procedure implements with minor changes the algorithm of Cabodi et al.
(ICCAD96). It does not allocate any memory, it does not change the
state of the manager, and it is fast. However, it has been observed to
overestimate the size of the cofactor by as much as a factor of 2.
- Side Effects None
- See Also
Cudd_DagSize
- Defined in
cuddUtil.c
int
Cudd_EstimateCofactor(
DdManager * dd, manager
DdNode * f, function
int i, index of variable
int phase 1: positive; 0: negative
)
- Estimates the number of nodes in a cofactor of a DD.
Returns an estimate of the number of nodes in a cofactor of
the graph rooted at node with respect to the variable whose index is i.
In case of failure, returns CUDD_OUT_OF_MEM.
This function uses a refinement of the algorithm of Cabodi et al.
(ICCAD96). The refinement allows the procedure to account for part
of the recombination that may occur in the part of the cofactor above
the cofactoring variable. This procedure does no create any new node.
It does keep a small table of results; therefore it may run out of memory.
If this is a concern, one should use Cudd_EstimateCofactorSimple, which
is faster, does not allocate any memory, but is less accurate.
- Side Effects None
- See Also
Cudd_DagSize
Cudd_EstimateCofactorSimple
- Defined in
cuddUtil.c
DdNode *
Cudd_Eval(
DdManager * dd,
DdNode * f,
int * inputs
)
- Finds the value of a DD for a given variable
assignment. The variable assignment is passed in an array of int's,
that should specify a zero or a one for each variable in the support
of the function. Returns a pointer to a constant node. No new nodes
are produced.
- Side Effects None
- See Also
Cudd_bddLeq
Cudd_addEvalConst
- Defined in
cuddSat.c
double
Cudd_ExpectedUsedSlots(
DdManager * dd
)
- Computes the fraction of slots in the unique table that
should be in use. This expected value is based on the assumption
that the hash function distributes the keys randomly; it can be
compared with the result of Cudd_ReadUsedSlots to monitor the
performance of the unique table hash function.
- Side Effects None
- See Also
Cudd_ReadSlots
Cudd_ReadUsedSlots
- Defined in
cuddAPI.c
DdNode *
Cudd_FindEssential(
DdManager * dd,
DdNode * f
)
- Returns the cube of the essential variables. A positive
literal means that the variable must be set to 1 for the function to be
1. A negative literal means that the variable must be set to 0 for the
function to be 1. Returns a pointer to the cube BDD if successful;
NULL otherwise.
- Side Effects None
- See Also
Cudd_bddIsVarEssential
- Defined in
cuddEssent.c
DdTlcInfo *
Cudd_FindTwoLiteralClauses(
DdManager * dd,
DdNode * f
)
- Returns the one- and two-literal clauses of a DD.
Returns a pointer to the structure holding the clauses if
successful; NULL otherwise. For a constant DD, the empty set of clauses
is returned. This is obviously correct for a non-zero constant. For the
constant zero, it is based on the assumption that only those clauses
containing variables in the support of the function are considered. Since
the support of a constant function is empty, no clauses are returned.
- Side Effects None
- See Also
Cudd_FindEssential
- Defined in
cuddEssent.c
DdGen *
Cudd_FirstCube(
DdManager * dd,
DdNode * f,
int ** cube,
CUDD_VALUE_TYPE * value
)
- Defines an iterator on the onset of a decision diagram
and finds its first cube. Returns a generator that contains the
information necessary to continue the enumeration if successful; NULL
otherwise.
A cube is represented as an array of literals, which are integers in
{0, 1, 2}; 0 represents a complemented literal, 1 represents an
uncomplemented literal, and 2 stands for don't care. The enumeration
produces a disjoint cover of the function associated with the diagram.
The size of the array equals the number of variables in the manager at
the time Cudd_FirstCube is called.
For each cube, a value is also returned. This value is always 1 for a
BDD, while it may be different from 1 for an ADD.
For BDDs, the offset is the set of cubes whose value is the logical zero.
For ADDs, the offset is the set of cubes whose value is the
background value. The cubes of the offset are not enumerated.
- Side Effects The first cube and its value are returned as side effects.
- See Also
Cudd_ForeachCube
Cudd_NextCube
Cudd_GenFree
Cudd_IsGenEmpty
Cudd_FirstNode
- Defined in
cuddUtil.c
DdGen *
Cudd_FirstNode(
DdManager * dd,
DdNode * f,
DdNode ** node
)
- Defines an iterator on the nodes of a decision diagram
and finds its first node. Returns a generator that contains the
information necessary to continue the enumeration if successful;
NULL otherwise. The nodes are enumerated in a reverse topological
order, so that a node is always preceded in the enumeration by its
descendants.
- Side Effects The first node is returned as a side effect.
- See Also
Cudd_ForeachNode
Cudd_NextNode
Cudd_GenFree
Cudd_IsGenEmpty
Cudd_FirstCube
- Defined in
cuddUtil.c
DdGen *
Cudd_FirstPrime(
DdManager * dd,
DdNode * l,
DdNode * u,
int ** cube
)
- Defines an iterator on a pair of BDDs describing a
(possibly incompletely specified) Boolean functions and finds the
first cube of a cover of the function. Returns a generator
that contains the information necessary to continue the enumeration
if successful; NULL otherwise.
The two argument BDDs are the lower and upper bounds of an interval.
It is a mistake to call this function with a lower bound that is not
less than or equal to the upper bound.
A cube is represented as an array of literals, which are integers in
{0, 1, 2}; 0 represents a complemented literal, 1 represents an
uncomplemented literal, and 2 stands for don't care. The enumeration
produces a prime and irredundant cover of the function associated
with the two BDDs. The size of the array equals the number of
variables in the manager at the time Cudd_FirstCube is called.
This iterator can only be used on BDDs.
- Side Effects The first cube is returned as side effect.
- See Also
Cudd_ForeachPrime
Cudd_NextPrime
Cudd_GenFree
Cudd_IsGenEmpty
Cudd_FirstCube
Cudd_FirstNode
- Defined in
cuddUtil.c
void
Cudd_FreeTree(
DdManager * dd
)
- Frees the variable group tree of the manager.
- Side Effects None
- See Also
Cudd_SetTree
Cudd_ReadTree
Cudd_FreeZddTree
- Defined in
cuddAPI.c
void
Cudd_FreeZddTree(
DdManager * dd
)
- Frees the variable group tree of the manager.
- Side Effects None
- See Also
Cudd_SetZddTree
Cudd_ReadZddTree
Cudd_FreeTree
- Defined in
cuddAPI.c
int
Cudd_GarbageCollectionEnabled(
DdManager * dd
)
- Returns 1 if garbage collection is enabled; 0 otherwise.
- Side Effects None
- See Also
Cudd_EnableGarbageCollection
Cudd_DisableGarbageCollection
- Defined in
cuddAPI.c
int
Cudd_GenFree(
DdGen * gen
)
- Frees a CUDD generator. Always returns 0, so that it can
be used in mis-like foreach constructs.
- Side Effects None
- See Also
Cudd_ForeachCube
Cudd_ForeachNode
Cudd_FirstCube
Cudd_NextCube
Cudd_FirstNode
Cudd_NextNode
Cudd_IsGenEmpty
- Defined in
cuddUtil.c
DdNode *
Cudd_Increasing(
DdManager * dd,
DdNode * f,
int i
)
- Determines whether the function represented by BDD f is
positive unate (monotonic increasing) in variable i. It is based on
Cudd_Decreasing and the fact that f is monotonic increasing in i if
and only if its complement is monotonic decreasing in i.
- Side Effects None
- See Also
Cudd_Decreasing
- Defined in
cuddSat.c
DdNode *
Cudd_IndicesToCube(
DdManager * dd,
int * array,
int n
)
- Builds a cube of BDD variables from an array of indices.
Returns a pointer to the result if successful; NULL otherwise.
- Side Effects None
- See Also
Cudd_bddComputeCube
Cudd_CubeArrayToBdd
- Defined in
cuddUtil.c
DdNode *
Cudd_Inequality(
DdManager * dd, DD manager
int N, number of x and y variables
int c, right-hand side constant
DdNode ** x, array of x variables
DdNode ** y array of y variables
)
- This function generates a BDD for the function x -y ≥ c.
Both x and y are N-bit numbers, x[0] x[1] ... x[N-1] and
y[0] y[1] ... y[N-1], with 0 the most significant bit.
The BDD is built bottom-up.
It has a linear number of nodes if the variables are ordered as follows:
x[0] y[0] x[1] y[1] ... x[N-1] y[N-1].
- Side Effects None
- See Also
Cudd_Xgty
- Defined in
cuddPriority.c
DdManager *
Cudd_Init(
unsigned int numVars, initial number of BDD variables (i.e., subtables)
unsigned int numVarsZ, initial number of ZDD variables (i.e., subtables)
unsigned int numSlots, initial size of the unique tables
unsigned int cacheSize, initial size of the cache
unsigned long maxMemory target maximum memory occupation
)
- Creates a new DD manager, initializes the table, the
basic constants and the projection functions. If maxMemory is 0,
Cudd_Init decides suitable values for the maximum size of the cache
and for the limit for fast unique table growth based on the available
memory. Returns a pointer to the manager if successful; NULL
otherwise.
- Side Effects None
- See Also
Cudd_Quit
- Defined in
cuddInit.c
int
Cudd_IsGenEmpty(
DdGen * gen
)
- Queries the status of a generator. Returns 1 if the
generator is empty or NULL; 0 otherswise.
- Side Effects None
- See Also
Cudd_ForeachCube
Cudd_ForeachNode
Cudd_FirstCube
Cudd_NextCube
Cudd_FirstNode
Cudd_NextNode
Cudd_GenFree
- Defined in
cuddUtil.c
int
Cudd_IsInHook(
DdManager * dd,
DD_HFP f,
Cudd_HookType where
)
- Checks whether a function is in a hook. A hook is a list of
application-provided functions called on certain occasions by the
package. Returns 1 if the function is found; 0 otherwise.
- Side Effects None
- See Also
Cudd_AddHook
Cudd_RemoveHook
- Defined in
cuddAPI.c
int
Cudd_IsNonConstant(
DdNode * f
)
- Returns 1 if a DD node is not constant. This function is
useful to test the results of Cudd_bddIteConstant, Cudd_addIteConstant,
Cudd_addEvalConst. These results may be a special value signifying
non-constant. In the other cases the macro Cudd_IsConstant can be used.
- Side Effects None
- See Also
Cudd_IsConstant
Cudd_bddIteConstant
Cudd_addIteConstant
Cudd_addEvalConst
- Defined in
cuddAPI.c
void
Cudd_IterDerefBdd(
DdManager * table,
DdNode * n
)
- Decreases the reference count of node n. If n dies,
recursively decreases the reference counts of its children. It is
used to dispose of a BDD that is no longer needed. It is more
efficient than Cudd_RecursiveDeref, but it cannot be used on
ADDs. The greater efficiency comes from being able to assume that no
constant node will ever die as a result of a call to this
procedure.
- Side Effects None
- See Also
Cudd_RecursiveDeref
Cudd_DelayedDerefBdd
- Defined in
cuddRef.c
DdNode *
Cudd_LargestCube(
DdManager * manager,
DdNode * f,
int * length
)
- Finds a largest cube in a DD. f is the DD we want to
get the largest cube for. The problem is translated into the one of
finding a shortest path in f, when both THEN and ELSE arcs are assumed to
have unit length. This yields a largest cube in the disjoint cover
corresponding to the DD. Therefore, it is not necessarily the largest
implicant of f. Returns the largest cube as a BDD.
- Side Effects The number of literals of the cube is returned in length.
- See Also
Cudd_ShortestPath
- Defined in
cuddSat.c
DdNode *
Cudd_MakeBddFromZddCover(
DdManager * dd,
DdNode * node
)
- Converts a ZDD cover to a BDD graph. If successful, it
returns a BDD node, otherwise it returns NULL.
- See Also
cuddMakeBddFromZddCover
- Defined in
cuddZddIsop.c
MtrNode *
Cudd_MakeTreeNode(
DdManager * dd, manager
unsigned int low, index of the first group variable
unsigned int size, number of variables in the group
unsigned int type MTR_DEFAULT or MTR_FIXED
)
- Creates a new variable group. The group starts at
variable and contains size variables. The parameter low is the index
of the first variable. If the variable already exists, its current
position in the order is known to the manager. If the variable does
not exist yet, the position is assumed to be the same as the index.
The group tree is created if it does not exist yet.
Returns a pointer to the group if successful; NULL otherwise.
- Side Effects The variable tree is changed.
- See Also
Cudd_MakeZddTreeNode
- Defined in
cuddGroup.c
MtrNode *
Cudd_MakeZddTreeNode(
DdManager * dd, manager
unsigned int low, index of the first group variable
unsigned int size, number of variables in the group
unsigned int type MTR_DEFAULT or MTR_FIXED
)
- Creates a new ZDD variable group. The group starts at
variable and contains size variables. The parameter low is the index
of the first variable. If the variable already exists, its current
position in the order is known to the manager. If the variable does
not exist yet, the position is assumed to be the same as the index.
The group tree is created if it does not exist yet.
Returns a pointer to the group if successful; NULL otherwise.
- Side Effects The ZDD variable tree is changed.
- See Also
Cudd_MakeTreeNode
- Defined in
cuddZddGroup.c
int
Cudd_MinHammingDist(
DdManager * dd, DD manager
DdNode * f, function to examine
int * minterm, reference minterm
int upperBound distance above which an approximate answer is OK
)
- Returns the minimum Hamming distance between the
minterms of a function f and a reference minterm. The function is
given as a BDD; the minterm is given as an array of integers, one
for each variable in the manager. Returns the minimum distance if
it is less than the upper bound; the upper bound if the minimum
distance is at least as large; CUDD_OUT_OF_MEM in case of failure.
- Side Effects None
- See Also
Cudd_addHamming
Cudd_bddClosestCube
- Defined in
cuddPriority.c
DdApaNumber
Cudd_NewApaNumber(
int digits
)
- Allocates memory for an arbitrary precision
integer. Returns a pointer to the allocated memory if successful;
NULL otherwise.
- Side Effects None
- Defined in
cuddApa.c
int
Cudd_NextCube(
DdGen * gen,
int ** cube,
CUDD_VALUE_TYPE * value
)
- Generates the next cube of a decision diagram onset,
using generator gen. Returns 0 if the enumeration is completed; 1
otherwise.
- Side Effects The cube and its value are returned as side effects. The
generator is modified.
- See Also
Cudd_ForeachCube
Cudd_FirstCube
Cudd_GenFree
Cudd_IsGenEmpty
Cudd_NextNode
- Defined in
cuddUtil.c
int
Cudd_NextNode(
DdGen * gen,
DdNode ** node
)
- Finds the node of a decision diagram, using generator
gen. Returns 0 if the enumeration is completed; 1 otherwise.
- Side Effects The next node is returned as a side effect.
- See Also
Cudd_ForeachNode
Cudd_FirstNode
Cudd_GenFree
Cudd_IsGenEmpty
Cudd_NextCube
- Defined in
cuddUtil.c
int
Cudd_NextPrime(
DdGen * gen,
int ** cube
)
- Generates the next cube of a Boolean function,
using generator gen. Returns 0 if the enumeration is completed; 1
otherwise.
- Side Effects The cube and is returned as side effects. The
generator is modified.
- See Also
Cudd_ForeachPrime
Cudd_FirstPrime
Cudd_GenFree
Cudd_IsGenEmpty
Cudd_NextCube
Cudd_NextNode
- Defined in
cuddUtil.c
unsigned int
Cudd_NodeReadIndex(
DdNode * node
)
- Returns the index of the node. The node pointer can be
either regular or complemented.
- Side Effects None
- See Also
Cudd_ReadIndex
- Defined in
cuddAPI.c
void
Cudd_OutOfMem(
long size size of the allocation that failed
)
- Warns that a memory allocation failed.
This function can be used as replacement of MMout_of_memory to prevent
the safe_mem functions of the util package from exiting when malloc
returns NULL. One possible use is in case of discretionary allocations;
for instance, the allocation of memory to enlarge the computed table.
- Side Effects None
- Defined in
cuddUtil.c
DdNode *
Cudd_OverApprox(
DdManager * dd, manager
DdNode * f, function to be superset
int numVars, number of variables in the support of f
int threshold, when to stop approximation
int safe, enforce safe approximation
double quality minimum improvement for accepted changes
)
- Extracts a dense superset from a BDD. The procedure is
identical to the underapproximation procedure except for the fact that it
works on the complement of the given function. Extracting the subset
of the complement function is equivalent to extracting the superset
of the function.
Returns a pointer to the BDD of the superset if successful. NULL if
intermediate result causes the procedure to run out of memory. The
parameter numVars is the maximum number of variables to be used in
minterm calculation. The optimal number
should be as close as possible to the size of the support of f.
However, it is safe to pass the value returned by Cudd_ReadSize for
numVars when the number of variables is under 1023. If numVars is
larger than 1023, it will overflow. If a 0 parameter is passed then
the procedure will compute a value which will avoid overflow but
will cause underflow with 2046 variables or more.
- Side Effects None
- See Also
Cudd_SupersetHeavyBranch
Cudd_SupersetShortPaths
Cudd_ReadSize
- Defined in
cuddApprox.c
unsigned int
Cudd_Prime(
unsigned int p
)
- Returns the next prime >= p.
- Side Effects None
- Defined in
cuddTable.c
int
Cudd_PrintDebug(
DdManager * dd,
DdNode * f,
int n,
int pr
)
- Prints to the standard output a DD and its statistics.
The statistics include the number of nodes, the number of leaves, and
the number of minterms. (The number of minterms is the number of
assignments to the variables that cause the function to be different
from the logical zero (for BDDs) and from the background value (for
ADDs.) The statistics are printed if pr > 0. Specifically:
- pr = 0 : prints nothing
- pr = 1 : prints counts of nodes and minterms
- pr = 2 : prints counts + disjoint sum of product
- pr = 3 : prints counts + list of nodes
- pr > 3 : prints counts + disjoint sum of product + list of nodes
For the purpose of counting the number of minterms, the function is
supposed to depend on n variables. Returns 1 if successful; 0 otherwise.
- Side Effects None
- See Also
Cudd_DagSize
Cudd_CountLeaves
Cudd_CountMinterm
Cudd_PrintMinterm
- Defined in
cuddUtil.c
int
Cudd_PrintInfo(
DdManager * dd,
FILE * fp
)
- Prints out statistics and settings for a CUDD manager.
Returns 1 if successful; 0 otherwise.
- Side Effects None
- Defined in
cuddAPI.c
int
Cudd_PrintLinear(
DdManager * table
)
- Prints the linear transform matrix. Returns 1 in case of
success; 0 otherwise.
- Side Effects none
- Defined in
cuddLinear.c
int
Cudd_PrintMinterm(
DdManager * manager,
DdNode * node
)
- Prints a disjoint sum of product cover for the function
rooted at node. Each product corresponds to a path from node to a
leaf node different from the logical zero, and different from the
background value. Uses the package default output file. Returns 1
if successful; 0 otherwise.
- Side Effects None
- See Also
Cudd_PrintDebug
Cudd_bddPrintCover
- Defined in
cuddUtil.c
int
Cudd_PrintTwoLiteralClauses(
DdManager * dd,
DdNode * f,
char ** names,
FILE * fp
)
- Prints the one- and two-literal clauses. Returns 1 if
successful; 0 otherwise. The argument "names" can be NULL, in which case
the variable indices are printed.
- Side Effects None
- See Also
Cudd_FindTwoLiteralClauses
- Defined in
cuddEssent.c
void
Cudd_PrintVersion(
FILE * fp
)
- Prints the package version number.
- Side Effects None
- Defined in
cuddUtil.c
DdNode *
Cudd_PrioritySelect(
DdManager * dd, manager
DdNode * R, BDD of the relation
DdNode ** x, array of x variables
DdNode ** y, array of y variables
DdNode ** z, array of z variables (optional: may be NULL)
DdNode * Pi, BDD of the priority function (optional: may be NULL)
int n, size of x, y, and z
DD_PRFP Pifunc function used to build Pi if it is NULL
)
- Selects pairs from a relation R(x,y) (given as a BDD)
in such a way that a given x appears in one pair only. Uses a
priority function to determine which y should be paired to a given x.
Cudd_PrioritySelect returns a pointer to
the selected function if successful; NULL otherwise.
Three of the arguments--x, y, and z--are vectors of BDD variables.
The first two are the variables on which R depends. The third vectore
is a vector of auxiliary variables, used during the computation. This
vector is optional. If a NULL value is passed instead,
Cudd_PrioritySelect will create the working variables on the fly.
The sizes of x and y (and z if it is not NULL) should equal n.
The priority function Pi can be passed as a BDD, or can be built by
Cudd_PrioritySelect. If NULL is passed instead of a DdNode *,
parameter Pifunc is used by Cudd_PrioritySelect to build a BDD for the
priority function. (Pifunc is a pointer to a C function.) If Pi is not
NULL, then Pifunc is ignored. Pifunc should have the same interface as
the standard priority functions (e.g., Cudd_Dxygtdxz).
Cudd_PrioritySelect and Cudd_CProjection can sometimes be used
interchangeably. Specifically, calling Cudd_PrioritySelect with
Cudd_Xgty as Pifunc produces the same result as calling
Cudd_CProjection with the all-zero minterm as reference minterm.
However, depending on the application, one or the other may be
preferable:
- When extracting representatives from an equivalence relation,
Cudd_CProjection has the advantage of nor requiring the auxiliary
variables.
- When computing matchings in general bipartite graphs,
Cudd_PrioritySelect normally obtains better results because it can use
more powerful matching schemes (e.g., Cudd_Dxygtdxz).
- Side Effects If called with z == NULL, will create new variables in
the manager.
- See Also
Cudd_Dxygtdxz
Cudd_Dxygtdyz
Cudd_Xgty
Cudd_bddAdjPermuteX
Cudd_CProjection
- Defined in
cuddPriority.c
void
Cudd_Quit(
DdManager * unique
)
- Deletes resources associated with a DD manager and
resets the global statistical counters. (Otherwise, another manaqger
subsequently created would inherit the stats of this one.)
- Side Effects None
- See Also
Cudd_Init
- Defined in
cuddInit.c
long
Cudd_Random(
)
- Portable number generator based on ran2 from "Numerical
Recipes in C." It is a long period (> 2 * 10^18) random number generator
of L'Ecuyer with Bays-Durham shuffle. Returns a long integer uniformly
distributed between 0 and 2147483561 (inclusive of the endpoint values).
The random generator can be explicitly initialized by calling
Cudd_Srandom. If no explicit initialization is performed, then the
seed 1 is assumed.
- Side Effects None
- See Also
Cudd_Srandom
- Defined in
cuddUtil.c
int
Cudd_ReadArcviolation(
DdManager * dd
)
- Returns the current value of the arcviolation
parameter. This parameter is used in group sifting to decide how
many arcs into
y
not coming from x
are
tolerable when checking for aggregation due to extended
symmetry. The value should be between 0 and 100. A small value
causes fewer variables to be aggregated. The default value is 0.
- Side Effects None
- See Also
Cudd_SetArcviolation
- Defined in
cuddAPI.c
DdNode *
Cudd_ReadBackground(
DdManager * dd
)
- Reads the background constant of the manager.
- Side Effects None
- Defined in
cuddAPI.c
double
Cudd_ReadCacheHits(
DdManager * dd
)
- Returns the number of cache hits.
- Side Effects None
- See Also
Cudd_ReadCacheLookUps
- Defined in
cuddAPI.c
double
Cudd_ReadCacheLookUps(
DdManager * dd
)
- Returns the number of cache look-ups.
- Side Effects None
- See Also
Cudd_ReadCacheHits
- Defined in
cuddAPI.c
unsigned int
Cudd_ReadCacheSlots(
DdManager * dd
)
- Reads the number of slots in the cache.
- Side Effects None
- See Also
Cudd_ReadCacheUsedSlots
- Defined in
cuddAPI.c
double
Cudd_ReadCacheUsedSlots(
DdManager * dd
)
- Reads the fraction of used slots in the cache. The unused
slots are those in which no valid data is stored. Garbage collection,
variable reordering, and cache resizing may cause used slots to become
unused.
- Side Effects None
- See Also
Cudd_ReadCacheSlots
- Defined in
cuddAPI.c
unsigned int
Cudd_ReadDead(
DdManager * dd
)
- Returns the number of dead nodes in the unique table.
- Side Effects None
- See Also
Cudd_ReadKeys
- Defined in
cuddAPI.c
CUDD_VALUE_TYPE
Cudd_ReadEpsilon(
DdManager * dd
)
- Reads the epsilon parameter of the manager. The epsilon
parameter control the comparison between floating point numbers.
- Side Effects None
- See Also
Cudd_SetEpsilon
- Defined in
cuddAPI.c
Cudd_ErrorType
Cudd_ReadErrorCode(
DdManager * dd
)
- Returns the code of the last error. The error codes are
defined in cudd.h.
- Side Effects None
- See Also
Cudd_ClearErrorCode
- Defined in
cuddAPI.c
long
Cudd_ReadGarbageCollectionTime(
DdManager * dd
)
- Returns the number of milliseconds spent doing garbage
collection since the manager was initialized.
- Side Effects None
- See Also
Cudd_ReadGarbageCollections
- Defined in
cuddAPI.c
int
Cudd_ReadGarbageCollections(
DdManager * dd
)
- Returns the number of times garbage collection has
occurred in the manager. The number includes both the calls from
reordering procedures and those caused by requests to create new
nodes.
- Side Effects None
- See Also
Cudd_ReadGarbageCollectionTime
- Defined in
cuddAPI.c
Cudd_AggregationType
Cudd_ReadGroupcheck(
DdManager * dd
)
- Reads the groupcheck parameter of the manager. The
groupcheck parameter determines the aggregation criterion in group
sifting.
- Side Effects None
- See Also
Cudd_SetGroupcheck
- Defined in
cuddAPI.c
int
Cudd_ReadInvPermZdd(
DdManager * dd,
int i
)
- Returns the index of the ZDD variable currently in the
i-th position of the order. If the index is CUDD_CONST_INDEX, returns
CUDD_CONST_INDEX; otherwise, if the index is out of bounds returns -1.
- Side Effects None
- See Also
Cudd_ReadPerm
Cudd_ReadInvPermZdd
- Defined in
cuddAPI.c
int
Cudd_ReadInvPerm(
DdManager * dd,
int i
)
- Returns the index of the variable currently in the i-th
position of the order. If the index is CUDD_CONST_INDEX, returns
CUDD_CONST_INDEX; otherwise, if the index is out of bounds returns -1.
- Side Effects None
- See Also
Cudd_ReadPerm
Cudd_ReadInvPermZdd
- Defined in
cuddAPI.c
int
Cudd_ReadIthClause(
DdTlcInfo * tlc,
int i,
DdHalfWord * var1,
DdHalfWord * var2,
int * phase1,
int * phase2
)
- Accesses the i-th clause of a DD given the clause set which
must be already computed. Returns 1 if successful; 0 if i is out of range,
or in case of error.
- Side Effects the four components of a clause are returned as side effects.
- See Also
Cudd_FindTwoLiteralClauses
- Defined in
cuddEssent.c
unsigned int
Cudd_ReadKeys(
DdManager * dd
)
- Returns the total number of nodes currently in the unique
table, including the dead nodes.
- Side Effects None
- See Also
Cudd_ReadDead
- Defined in
cuddAPI.c
int
Cudd_ReadLinear(
DdManager * table, CUDD manager
int x, row index
int y column index
)
- Reads an entry of the linear transform matrix.
- Side Effects none
- Defined in
cuddLinear.c
DdNode *
Cudd_ReadLogicZero(
DdManager * dd
)
- Returns the zero constant of the manager. The logic zero
constant is the complement of the one constant, and is distinct from
the arithmetic zero.
- Side Effects None
- See Also
Cudd_ReadOne
Cudd_ReadZero
- Defined in
cuddAPI.c
unsigned int
Cudd_ReadLooseUpTo(
DdManager * dd
)
- Reads the looseUpTo parameter of the manager.
- Side Effects None
- See Also
Cudd_SetLooseUpTo
Cudd_ReadMinHit
Cudd_ReadMinDead
- Defined in
cuddAPI.c
unsigned int
Cudd_ReadMaxCacheHard(
DdManager * dd
)
- Reads the maxCacheHard parameter of the manager.
- Side Effects None
- See Also
Cudd_SetMaxCacheHard
Cudd_ReadMaxCache
- Defined in
cuddAPI.c
unsigned int
Cudd_ReadMaxCache(
DdManager * dd
)
- Returns the soft limit for the cache size. The soft limit
- Side Effects None
- See Also
Cudd_ReadMaxCache
- Defined in
cuddAPI.c
double
Cudd_ReadMaxGrowthAlternate(
DdManager * dd
)
- Reads the maxGrowthAlt parameter of the manager. This
parameter is analogous to the maxGrowth paramter, and is used every
given number of reorderings instead of maxGrowth. The number of
reorderings is set with Cudd_SetReorderingCycle. If the number of
reorderings is 0 (default) maxGrowthAlt is never used.
- Side Effects None
- See Also
Cudd_ReadMaxGrowth
Cudd_SetMaxGrowthAlternate
Cudd_SetReorderingCycle
Cudd_ReadReorderingCycle
- Defined in
cuddAPI.c
double
Cudd_ReadMaxGrowth(
DdManager * dd
)
- Reads the maxGrowth parameter of the manager. This
parameter determines how much the number of nodes can grow during
sifting of a variable. Overall, sifting never increases the size of
the decision diagrams. This parameter only refers to intermediate
results. A lower value will speed up sifting, possibly at the
expense of quality.
- Side Effects None
- See Also
Cudd_SetMaxGrowth
Cudd_ReadMaxGrowthAlternate
- Defined in
cuddAPI.c
unsigned int
Cudd_ReadMaxLive(
DdManager * dd
)
- Reads the maximum allowed number of live nodes. When this
number is exceeded, the package returns NULL.
- Side Effects none
- See Also
Cudd_SetMaxLive
- Defined in
cuddAPI.c
unsigned long
Cudd_ReadMaxMemory(
DdManager * dd
)
- Reads the maximum allowed memory. When this
number is exceeded, the package returns NULL.
- Side Effects none
- See Also
Cudd_SetMaxMemory
- Defined in
cuddAPI.c
unsigned long
Cudd_ReadMemoryInUse(
DdManager * dd
)
- Returns the memory in use by the manager measured in bytes.
- Side Effects None
- Defined in
cuddAPI.c
unsigned int
Cudd_ReadMinDead(
DdManager * dd
)
- Reads the minDead parameter of the manager. The minDead
parameter is used by the package to decide whether to collect garbage
or resize a subtable of the unique table when the subtable becomes
too full. The application can indirectly control the value of minDead
by setting the looseUpTo parameter.
- Side Effects None
- See Also
Cudd_ReadDead
Cudd_ReadLooseUpTo
Cudd_SetLooseUpTo
- Defined in
cuddAPI.c
unsigned int
Cudd_ReadMinHit(
DdManager * dd
)
- Reads the hit rate that causes resizinig of the computed
table.
- Side Effects None
- See Also
Cudd_SetMinHit
- Defined in
cuddAPI.c
DdNode *
Cudd_ReadMinusInfinity(
DdManager * dd
)
- Reads the minus-infinity constant from the manager.
- Side Effects None
- Defined in
cuddAPI.c
unsigned int
Cudd_ReadNextReordering(
DdManager * dd
)
- Returns the threshold for the next dynamic reordering.
The threshold is in terms of number of nodes and is in effect only
if reordering is enabled. The count does not include the dead nodes,
unless the countDead parameter of the manager has been changed from
its default setting.
- Side Effects None
- See Also
Cudd_SetNextReordering
- Defined in
cuddAPI.c
long
Cudd_ReadNodeCount(
DdManager * dd
)
- Reports the number of live nodes in BDDs and ADDs. This
number does not include the isolated projection functions and the
unused constants. These nodes that are not counted are not part of
the DDs manipulated by the application.
- Side Effects None
- See Also
Cudd_ReadPeakNodeCount
Cudd_zddReadNodeCount
- Defined in
cuddAPI.c
double
Cudd_ReadNodesDropped(
DdManager * dd
)
- Returns the number of nodes killed by dereferencing if the
keeping of this statistic is enabled; -1 otherwise. This statistic is
enabled only if the package is compiled with DD_STATS defined.
- Side Effects None
- See Also
Cudd_ReadNodesFreed
- Defined in
cuddAPI.c
double
Cudd_ReadNodesFreed(
DdManager * dd
)
- Returns the number of nodes returned to the free list if the
keeping of this statistic is enabled; -1 otherwise. This statistic is
enabled only if the package is compiled with DD_STATS defined.
- Side Effects None
- See Also
Cudd_ReadNodesDropped
- Defined in
cuddAPI.c
int
Cudd_ReadNumberXovers(
DdManager * dd
)
- Reads the current number of crossovers used by the
genetic algorithm for variable reordering. A larger number of crossovers will
cause the genetic algorithm to take more time, but will generally
produce better results. The default value is 0, in which case the
package uses three times the number of variables as number of crossovers,
with a maximum of 60.
- Side Effects None
- See Also
Cudd_SetNumberXovers
- Defined in
cuddAPI.c
DdNode *
Cudd_ReadOne(
DdManager * dd
)
- Returns the one constant of the manager. The one
constant is common to ADDs and BDDs.
- Side Effects None
- See Also
Cudd_ReadZero
Cudd_ReadLogicZero
Cudd_ReadZddOne
- Defined in
cuddAPI.c
int
Cudd_ReadPeakLiveNodeCount(
DdManager * dd
)
- Reports the peak number of live nodes. This count is kept
only if CUDD is compiled with DD_STATS defined. If DD_STATS is not
defined, this function returns -1.
- Side Effects None
- See Also
Cudd_ReadNodeCount
Cudd_PrintInfo
Cudd_ReadPeakNodeCount
- Defined in
cuddAPI.c
long
Cudd_ReadPeakNodeCount(
DdManager * dd
)
- Reports the peak number of nodes. This number includes
node on the free list. At the peak, the number of nodes on the free
list is guaranteed to be less than DD_MEM_CHUNK.
- Side Effects None
- See Also
Cudd_ReadNodeCount
Cudd_PrintInfo
- Defined in
cuddAPI.c
int
Cudd_ReadPermZdd(
DdManager * dd,
int i
)
- Returns the current position of the i-th ZDD variable
in the order. If the index is CUDD_CONST_INDEX, returns
CUDD_CONST_INDEX; otherwise, if the index is out of bounds returns
-1.
- Side Effects None
- See Also
Cudd_ReadInvPermZdd
Cudd_ReadPerm
- Defined in
cuddAPI.c
int
Cudd_ReadPerm(
DdManager * dd,
int i
)
- Returns the current position of the i-th variable in
the order. If the index is CUDD_CONST_INDEX, returns
CUDD_CONST_INDEX; otherwise, if the index is out of bounds returns
-1.
- Side Effects None
- See Also
Cudd_ReadInvPerm
Cudd_ReadPermZdd
- Defined in
cuddAPI.c
DdNode *
Cudd_ReadPlusInfinity(
DdManager * dd
)
- Reads the plus-infinity constant from the manager.
- Side Effects None
- Defined in
cuddAPI.c
int
Cudd_ReadPopulationSize(
DdManager * dd
)
- Reads the current size of the population used by the
genetic algorithm for variable reordering. A larger population size will
cause the genetic algorithm to take more time, but will generally
produce better results. The default value is 0, in which case the
package uses three times the number of variables as population size,
with a maximum of 120.
- Side Effects None
- See Also
Cudd_SetPopulationSize
- Defined in
cuddAPI.c
int
Cudd_ReadRecomb(
DdManager * dd
)
- Returns the current value of the recombination
parameter used in group sifting. A larger (positive) value makes the
aggregation of variables due to the second difference criterion more
likely. A smaller (negative) value makes aggregation less likely.
- Side Effects None
- See Also
Cudd_SetRecomb
- Defined in
cuddAPI.c
double
Cudd_ReadRecursiveCalls(
DdManager * dd
)
- Returns the number of recursive calls if the package is
compiled with DD_COUNT defined.
- Side Effects None
- Defined in
cuddAPI.c
int
Cudd_ReadReorderingCycle(
DdManager * dd
)
- Reads the reordCycle parameter of the manager. This
parameter determines how often the alternate threshold on maximum
growth is used in reordering.
- Side Effects None
- See Also
Cudd_ReadMaxGrowthAlternate
Cudd_SetMaxGrowthAlternate
Cudd_SetReorderingCycle
- Defined in
cuddAPI.c
long
Cudd_ReadReorderingTime(
DdManager * dd
)
- Returns the number of milliseconds spent reordering
variables since the manager was initialized. The time spent in collecting
garbage before reordering is included.
- Side Effects None
- See Also
Cudd_ReadReorderings
- Defined in
cuddAPI.c
int
Cudd_ReadReorderings(
DdManager * dd
)
- Returns the number of times reordering has occurred in the
manager. The number includes both the calls to Cudd_ReduceHeap from
the application program and those automatically performed by the
package. However, calls that do not even initiate reordering are not
counted. A call may not initiate reordering if there are fewer than
minsize live nodes in the manager, or if CUDD_REORDER_NONE is specified
as reordering method. The calls to Cudd_ShuffleHeap are not counted.
- Side Effects None
- See Also
Cudd_ReduceHeap
Cudd_ReadReorderingTime
- Defined in
cuddAPI.c
int
Cudd_ReadSiftMaxSwap(
DdManager * dd
)
- Reads the siftMaxSwap parameter of the manager. This
parameter gives the maximum number of swaps that will be attempted
for each invocation of sifting. The real number of swaps may exceed
the set limit because the package will always complete the sifting
of the variable that causes the limit to be reached.
- Side Effects None
- See Also
Cudd_ReadSiftMaxVar
Cudd_SetSiftMaxSwap
- Defined in
cuddAPI.c
int
Cudd_ReadSiftMaxVar(
DdManager * dd
)
- Reads the siftMaxVar parameter of the manager. This
parameter gives the maximum number of variables that will be sifted
for each invocation of sifting.
- Side Effects None
- See Also
Cudd_ReadSiftMaxSwap
Cudd_SetSiftMaxVar
- Defined in
cuddAPI.c
int
Cudd_ReadSize(
DdManager * dd
)
- Returns the number of BDD variables in existance.
- Side Effects None
- See Also
Cudd_ReadZddSize
- Defined in
cuddAPI.c
unsigned int
Cudd_ReadSlots(
DdManager * dd
)
- Returns the total number of slots of the unique table.
This number ismainly for diagnostic purposes.
- Side Effects None
- Defined in
cuddAPI.c
FILE *
Cudd_ReadStderr(
DdManager * dd
)
- Reads the stderr of a manager. This is the file pointer to
which messages normally going to stderr are written. It is initialized
to stderr. Cudd_SetStderr allows the application to redirect it.
- Side Effects None
- See Also
Cudd_SetStderr
Cudd_ReadStdout
- Defined in
cuddAPI.c
FILE *
Cudd_ReadStdout(
DdManager * dd
)
- Reads the stdout of a manager. This is the file pointer to
which messages normally going to stdout are written. It is initialized
to stdout. Cudd_SetStdout allows the application to redirect it.
- Side Effects None
- See Also
Cudd_SetStdout
Cudd_ReadStderr
- Defined in
cuddAPI.c
double
Cudd_ReadSwapSteps(
DdManager * dd
)
- Reads the number of elementary reordering steps.
- Side Effects none
- Defined in
cuddAPI.c
int
Cudd_ReadSymmviolation(
DdManager * dd
)
- Returns the current value of the symmviolation
parameter. This parameter is used in group sifting to decide how
many violations to the symmetry conditions
f10 = f01
or
f11 = f00
are tolerable when checking for aggregation
due to extended symmetry. The value should be between 0 and 100. A
small value causes fewer variables to be aggregated. The default
value is 0.
- Side Effects None
- See Also
Cudd_SetSymmviolation
- Defined in
cuddAPI.c
MtrNode *
Cudd_ReadTree(
DdManager * dd
)
- Returns the variable group tree of the manager.
- Side Effects None
- See Also
Cudd_SetTree
Cudd_FreeTree
Cudd_ReadZddTree
- Defined in
cuddAPI.c
double
Cudd_ReadUniqueLinks(
DdManager * dd
)
- Returns the number of links followed during look-ups in the
unique table if the keeping of this statistic is enabled; -1 otherwise.
If an item is found in the first position of its collision list, the
number of links followed is taken to be 0. If it is in second position,
the number of links is 1, and so on. This statistic is enabled only if
the package is compiled with DD_UNIQUE_PROFILE defined.
- Side Effects None
- See Also
Cudd_ReadUniqueLookUps
- Defined in
cuddAPI.c
double
Cudd_ReadUniqueLookUps(
DdManager * dd
)
- Returns the number of look-ups in the unique table if the
keeping of this statistic is enabled; -1 otherwise. This statistic is
enabled only if the package is compiled with DD_UNIQUE_PROFILE defined.
- Side Effects None
- See Also
Cudd_ReadUniqueLinks
- Defined in
cuddAPI.c
double
Cudd_ReadUsedSlots(
DdManager * dd
)
- Reads the fraction of used slots in the unique
table. The unused slots are those in which no valid data is
stored. Garbage collection, variable reordering, and subtable
resizing may cause used slots to become unused.
- Side Effects None
- See Also
Cudd_ReadSlots
- Defined in
cuddAPI.c
DdNode *
Cudd_ReadVars(
DdManager * dd,
int i
)
- Returns the i-th element of the vars array if it falls
within the array bounds; NULL otherwise. If i is the index of an
existing variable, this function produces the same result as
Cudd_bddIthVar. However, if the i-th var does not exist yet,
Cudd_bddIthVar will create it, whereas Cudd_ReadVars will not.
- Side Effects None
- See Also
Cudd_bddIthVar
- Defined in
cuddAPI.c
DdNode *
Cudd_ReadZddOne(
DdManager * dd,
int i
)
- Returns the ZDD for the constant 1 function.
The representation of the constant 1 function as a ZDD depends on
how many variables it (nominally) depends on. The index of the
topmost variable in the support is given as argument
i
.
- Side Effects None
- See Also
Cudd_ReadOne
- Defined in
cuddAPI.c
int
Cudd_ReadZddSize(
DdManager * dd
)
- Returns the number of ZDD variables in existance.
- Side Effects None
- See Also
Cudd_ReadSize
- Defined in
cuddAPI.c
MtrNode *
Cudd_ReadZddTree(
DdManager * dd
)
- Returns the variable group tree of the manager.
- Side Effects None
- See Also
Cudd_SetZddTree
Cudd_FreeZddTree
Cudd_ReadTree
- Defined in
cuddAPI.c
DdNode *
Cudd_ReadZero(
DdManager * dd
)
- Returns the zero constant of the manager. The zero
constant is the arithmetic zero, rather than the logic zero. The
latter is the complement of the one constant.
- Side Effects None
- See Also
Cudd_ReadOne
Cudd_ReadLogicZero
- Defined in
cuddAPI.c
void
Cudd_RecursiveDerefZdd(
DdManager * table,
DdNode * n
)
- Decreases the reference count of ZDD node n. If n dies,
recursively decreases the reference counts of its children. It is
used to dispose of a ZDD that is no longer needed.
- Side Effects None
- See Also
Cudd_Deref
Cudd_Ref
Cudd_RecursiveDeref
- Defined in
cuddRef.c
void
Cudd_RecursiveDeref(
DdManager * table,
DdNode * n
)
- Decreases the reference count of node n. If n dies,
recursively decreases the reference counts of its children. It is
used to dispose of a DD that is no longer needed.
- Side Effects None
- See Also
Cudd_Deref
Cudd_Ref
Cudd_RecursiveDerefZdd
- Defined in
cuddRef.c
int
Cudd_ReduceHeap(
DdManager * table, DD manager
Cudd_ReorderingType heuristic, method used for reordering
int minsize bound below which no reordering occurs
)
- Main dynamic reordering routine.
Calls one of the possible reordering procedures:
- Swapping
- Sifting
- Symmetric Sifting
- Group Sifting
- Window Permutation
- Simulated Annealing
- Genetic Algorithm
- Dynamic Programming (exact)
For sifting, symmetric sifting, group sifting, and window
permutation it is possible to request reordering to convergence.
The core of all methods is the reordering procedure
cuddSwapInPlace() which swaps two adjacent variables and is based
on Rudell's paper.
Returns 1 in case of success; 0 otherwise. In the case of symmetric
sifting (with and without convergence) returns 1 plus the number of
symmetric variables, in case of success.
- Side Effects Changes the variable order for all diagrams and clears
the cache.
- Defined in
cuddReorder.c
void
Cudd_Ref(
DdNode * n
)
- Increases the reference count of a node, if it is not
saturated.
- Side Effects None
- See Also
Cudd_RecursiveDeref
Cudd_Deref
- Defined in
cuddRef.c
DdNode *
Cudd_RemapOverApprox(
DdManager * dd, manager
DdNode * f, function to be superset
int numVars, number of variables in the support of f
int threshold, when to stop approximation
double quality minimum improvement for accepted changes
)
- Extracts a dense superset from a BDD. The procedure is
identical to the underapproximation procedure except for the fact that it
works on the complement of the given function. Extracting the subset
of the complement function is equivalent to extracting the superset
of the function.
Returns a pointer to the BDD of the superset if successful. NULL if
intermediate result causes the procedure to run out of memory. The
parameter numVars is the maximum number of variables to be used in
minterm calculation. The optimal number
should be as close as possible to the size of the support of f.
However, it is safe to pass the value returned by Cudd_ReadSize for
numVars when the number of variables is under 1023. If numVars is
larger than 1023, it will overflow. If a 0 parameter is passed then
the procedure will compute a value which will avoid overflow but
will cause underflow with 2046 variables or more.
- Side Effects None
- See Also
Cudd_SupersetHeavyBranch
Cudd_SupersetShortPaths
Cudd_ReadSize
- Defined in
cuddApprox.c
DdNode *
Cudd_RemapUnderApprox(
DdManager * dd, manager
DdNode * f, function to be subset
int numVars, number of variables in the support of f
int threshold, when to stop approximation
double quality minimum improvement for accepted changes
)
- Extracts a dense subset from a BDD. This procedure uses
a remapping technique and density as the cost function.
Returns a pointer to the BDD of the subset if
successful. NULL if the procedure runs out of memory. The parameter
numVars is the maximum number of variables to be used in minterm
calculation. The optimal number should be as close as possible to
the size of the support of f. However, it is safe to pass the value
returned by Cudd_ReadSize for numVars when the number of variables
is under 1023. If numVars is larger than 1023, it will cause
overflow. If a 0 parameter is passed then the procedure will compute
a value which will avoid overflow but will cause underflow with 2046
variables or more.
- Side Effects None
- See Also
Cudd_SubsetShortPaths
Cudd_SubsetHeavyBranch
Cudd_UnderApprox
Cudd_ReadSize
- Defined in
cuddApprox.c
int
Cudd_RemoveHook(
DdManager * dd,
DD_HFP f,
Cudd_HookType where
)
- Removes a function from a hook. A hook is a list of
application-provided functions called on certain occasions by the
package. Returns 1 if successful; 0 the function was not in the list.
- Side Effects None
- See Also
Cudd_AddHook
- Defined in
cuddAPI.c
int
Cudd_ReorderingReporting(
DdManager * dd
)
- Returns 1 if reporting of reordering stats is enabled;
0 otherwise.
- Side Effects none
- See Also
Cudd_EnableReorderingReporting
Cudd_DisableReorderingReporting
- Defined in
cuddAPI.c
int
Cudd_ReorderingStatusZdd(
DdManager * unique,
Cudd_ReorderingType * method
)
- Reports the status of automatic dynamic reordering of
ZDDs. Parameter method is set to the ZDD reordering method currently
selected. Returns 1 if automatic reordering is enabled; 0
otherwise.
- Side Effects Parameter method is set to the ZDD reordering method currently
selected.
- See Also
Cudd_AutodynEnableZdd
Cudd_AutodynDisableZdd
Cudd_ReorderingStatus
- Defined in
cuddAPI.c
int
Cudd_ReorderingStatus(
DdManager * unique,
Cudd_ReorderingType * method
)
- Reports the status of automatic dynamic reordering of
BDDs and ADDs. Parameter method is set to the reordering method
currently selected. Returns 1 if automatic reordering is enabled; 0
otherwise.
- Side Effects Parameter method is set to the reordering method currently
selected.
- See Also
Cudd_AutodynEnable
Cudd_AutodynDisable
Cudd_ReorderingStatusZdd
- Defined in
cuddAPI.c
void
Cudd_SetArcviolation(
DdManager * dd,
int arcviolation
)
- Sets the value of the arcviolation
parameter. This parameter is used in group sifting to decide how
many arcs into
y
not coming from x
are
tolerable when checking for aggregation due to extended
symmetry. The value should be between 0 and 100. A small value
causes fewer variables to be aggregated. The default value is 0.
- Side Effects None
- See Also
Cudd_ReadArcviolation
- Defined in
cuddAPI.c
void
Cudd_SetBackground(
DdManager * dd,
DdNode * bck
)
- Sets the background constant of the manager. It assumes
that the DdNode pointer bck is already referenced.
- Side Effects None
- Defined in
cuddAPI.c
void
Cudd_SetEpsilon(
DdManager * dd,
CUDD_VALUE_TYPE ep
)
- Sets the epsilon parameter of the manager to ep. The epsilon
parameter control the comparison between floating point numbers.
- Side Effects None
- See Also
Cudd_ReadEpsilon
- Defined in
cuddAPI.c
void
Cudd_SetGroupcheck(
DdManager * dd,
Cudd_AggregationType gc
)
- Sets the parameter groupcheck of the manager to gc. The
groupcheck parameter determines the aggregation criterion in group
sifting.
- Side Effects None
- See Also
Cudd_ReadGroupCheck
- Defined in
cuddAPI.c
void
Cudd_SetLooseUpTo(
DdManager * dd,
unsigned int lut
)
- Sets the looseUpTo parameter of the manager. This
parameter of the manager controls the threshold beyond which no fast
growth of the unique table is allowed. The threshold is given as a
number of slots. If the value passed to this function is 0, the
function determines a suitable value based on the available memory.
- Side Effects None
- See Also
Cudd_ReadLooseUpTo
Cudd_SetMinHit
- Defined in
cuddAPI.c
void
Cudd_SetMaxCacheHard(
DdManager * dd,
unsigned int mc
)
- Sets the maxCacheHard parameter of the manager. The
cache cannot grow larger than maxCacheHard entries. This parameter
allows an application to control the trade-off of memory versus
speed. If the value passed to this function is 0, the function
determines a suitable maximum cache size based on the available memory.
- Side Effects None
- See Also
Cudd_ReadMaxCacheHard
Cudd_SetMaxCache
- Defined in
cuddAPI.c
void
Cudd_SetMaxGrowthAlternate(
DdManager * dd,
double mg
)
- Sets the maxGrowthAlt parameter of the manager. This
parameter is analogous to the maxGrowth paramter, and is used every
given number of reorderings instead of maxGrowth. The number of
reorderings is set with Cudd_SetReorderingCycle. If the number of
reorderings is 0 (default) maxGrowthAlt is never used.
- Side Effects None
- See Also
Cudd_ReadMaxGrowthAlternate
Cudd_SetMaxGrowth
Cudd_SetReorderingCycle
Cudd_ReadReorderingCycle
- Defined in
cuddAPI.c
void
Cudd_SetMaxGrowth(
DdManager * dd,
double mg
)
- Sets the maxGrowth parameter of the manager. This
parameter determines how much the number of nodes can grow during
sifting of a variable. Overall, sifting never increases the size of
the decision diagrams. This parameter only refers to intermediate
results. A lower value will speed up sifting, possibly at the
expense of quality.
- Side Effects None
- See Also
Cudd_ReadMaxGrowth
Cudd_SetMaxGrowthAlternate
- Defined in
cuddAPI.c
void
Cudd_SetMaxLive(
DdManager * dd,
unsigned int maxLive
)
- Sets the maximum allowed number of live nodes. When this
number is exceeded, the package returns NULL.
- Side Effects none
- See Also
Cudd_ReadMaxLive
- Defined in
cuddAPI.c
void
Cudd_SetMaxMemory(
DdManager * dd,
unsigned long maxMemory
)
- Sets the maximum allowed memory. When this
number is exceeded, the package returns NULL.
- Side Effects none
- See Also
Cudd_ReadMaxMemory
- Defined in
cuddAPI.c
void
Cudd_SetMinHit(
DdManager * dd,
unsigned int hr
)
- Sets the minHit parameter of the manager. This
parameter controls the resizing of the computed table. If the hit
rate is larger than the specified value, and the cache is not
already too large, then its size is doubled.
- Side Effects None
- See Also
Cudd_ReadMinHit
- Defined in
cuddAPI.c
void
Cudd_SetNextReordering(
DdManager * dd,
unsigned int next
)
- Sets the threshold for the next dynamic reordering.
The threshold is in terms of number of nodes and is in effect only
if reordering is enabled. The count does not include the dead nodes,
unless the countDead parameter of the manager has been changed from
its default setting.
- Side Effects None
- See Also
Cudd_ReadNextReordering
- Defined in
cuddAPI.c
void
Cudd_SetNumberXovers(
DdManager * dd,
int numberXovers
)
- Sets the number of crossovers used by the genetic
algorithm for variable reordering. A larger number of crossovers
will cause the genetic algorithm to take more time, but will
generally produce better results. The default value is 0, in which
case the package uses three times the number of variables as number
of crossovers, with a maximum of 60.
- Side Effects None
- See Also
Cudd_ReadNumberXovers
- Defined in
cuddAPI.c
void
Cudd_SetPopulationSize(
DdManager * dd,
int populationSize
)
- Sets the size of the population used by the
genetic algorithm for variable reordering. A larger population size will
cause the genetic algorithm to take more time, but will generally
produce better results. The default value is 0, in which case the
package uses three times the number of variables as population size,
with a maximum of 120.
- Side Effects Changes the manager.
- See Also
Cudd_ReadPopulationSize
- Defined in
cuddAPI.c
void
Cudd_SetRecomb(
DdManager * dd,
int recomb
)
- Sets the value of the recombination parameter used in
group sifting. A larger (positive) value makes the aggregation of
variables due to the second difference criterion more likely. A
smaller (negative) value makes aggregation less likely. The default
value is 0.
- Side Effects Changes the manager.
- See Also
Cudd_ReadRecomb
- Defined in
cuddAPI.c
void
Cudd_SetReorderingCycle(
DdManager * dd,
int cycle
)
- Sets the reordCycle parameter of the manager. This
parameter determines how often the alternate threshold on maximum
growth is used in reordering.
- Side Effects None
- See Also
Cudd_ReadMaxGrowthAlternate
Cudd_SetMaxGrowthAlternate
Cudd_ReadReorderingCycle
- Defined in
cuddAPI.c
void
Cudd_SetSiftMaxSwap(
DdManager * dd,
int sms
)
- Sets the siftMaxSwap parameter of the manager. This
parameter gives the maximum number of swaps that will be attempted
for each invocation of sifting. The real number of swaps may exceed
the set limit because the package will always complete the sifting
of the variable that causes the limit to be reached.
- Side Effects None
- See Also
Cudd_SetSiftMaxVar
Cudd_ReadSiftMaxSwap
- Defined in
cuddAPI.c
void
Cudd_SetSiftMaxVar(
DdManager * dd,
int smv
)
- Sets the siftMaxVar parameter of the manager. This
parameter gives the maximum number of variables that will be sifted
for each invocation of sifting.
- Side Effects None
- See Also
Cudd_SetSiftMaxSwap
Cudd_ReadSiftMaxVar
- Defined in
cuddAPI.c
void
Cudd_SetStderr(
DdManager * dd,
FILE * fp
)
- Sets the stderr of a manager.
- Side Effects None
- See Also
Cudd_ReadStderr
Cudd_SetStdout
- Defined in
cuddAPI.c
void
Cudd_SetStdout(
DdManager * dd,
FILE * fp
)
- Sets the stdout of a manager.
- Side Effects None
- See Also
Cudd_ReadStdout
Cudd_SetStderr
- Defined in
cuddAPI.c
void
Cudd_SetSymmviolation(
DdManager * dd,
int symmviolation
)
- Sets the value of the symmviolation
parameter. This parameter is used in group sifting to decide how
many violations to the symmetry conditions
f10 = f01
or
f11 = f00
are tolerable when checking for aggregation
due to extended symmetry. The value should be between 0 and 100. A
small value causes fewer variables to be aggregated. The default
value is 0.
- Side Effects Changes the manager.
- See Also
Cudd_ReadSymmviolation
- Defined in
cuddAPI.c
void
Cudd_SetTree(
DdManager * dd,
MtrNode * tree
)
- Sets the variable group tree of the manager.
- Side Effects None
- See Also
Cudd_FreeTree
Cudd_ReadTree
Cudd_SetZddTree
- Defined in
cuddAPI.c
int
Cudd_SetVarMap(
DdManager * manager, DD manager
DdNode ** x, first array of variables
DdNode ** y, second array of variables
int n length of both arrays
)
- Registers with the manager a variable mapping described
by two sets of variables. This variable mapping is then used by
functions like Cudd_bddVarMap. This function is convenient for
those applications that perform the same mapping several times.
However, if several different permutations are used, it may be more
efficient not to rely on the registered mapping, because changing
mapping causes the cache to be cleared. (The initial setting,
however, does not clear the cache.) The two sets of variables (x and
y) must have the same size (x and y). The size is given by n. The
two sets of variables are normally disjoint, but this restriction is
not imposeded by the function. When new variables are created, the
map is automatically extended (each new variable maps to
itself). The typical use, however, is to wait until all variables
are created, and then create the map. Returns 1 if the mapping is
successfully registered with the manager; 0 otherwise.
- Side Effects Modifies the manager. May clear the cache.
- See Also
Cudd_bddVarMap
Cudd_bddPermute
Cudd_bddSwapVariables
- Defined in
cuddCompose.c
void
Cudd_SetZddTree(
DdManager * dd,
MtrNode * tree
)
- Sets the ZDD variable group tree of the manager.
- Side Effects None
- See Also
Cudd_FreeZddTree
Cudd_ReadZddTree
Cudd_SetTree
- Defined in
cuddAPI.c
int
Cudd_SharingSize(
DdNode ** nodeArray,
int n
)
- Counts the number of nodes in an array of DDs. Shared
nodes are counted only once. Returns the total number of nodes.
- Side Effects None
- See Also
Cudd_DagSize
- Defined in
cuddUtil.c
int
Cudd_ShortestLength(
DdManager * manager,
DdNode * f,
int * weight
)
- Find the length of the shortest path(s) in a DD. f is
the DD we want to get the shortest path for; weight[i] is the
weight of the THEN edge coming from the node whose index is i. All
ELSE edges have 0 weight. Returns the length of the shortest
path(s) if such a path is found; a large number if the function is
identically 0, and CUDD_OUT_OF_MEM in case of failure.
- Side Effects None
- See Also
Cudd_ShortestPath
- Defined in
cuddSat.c
DdNode *
Cudd_ShortestPath(
DdManager * manager,
DdNode * f,
int * weight,
int * support,
int * length
)
- Finds a shortest path in a DD. f is the DD we want to
get the shortest path for; weight[i] is the weight of the THEN arc
coming from the node whose index is i. If weight is NULL, then unit
weights are assumed for all THEN arcs. All ELSE arcs have 0 weight.
If non-NULL, both weight and support should point to arrays with at
least as many entries as there are variables in the manager.
Returns the shortest path as the BDD of a cube.
- Side Effects support contains on return the true support of f.
If support is NULL on entry, then Cudd_ShortestPath does not compute
the true support info. length contains the length of the path.
- See Also
Cudd_ShortestLength
Cudd_LargestCube
- Defined in
cuddSat.c
int
Cudd_ShuffleHeap(
DdManager * table, DD manager
int * permutation required variable permutation
)
- Reorders variables according to given permutation.
The i-th entry of the permutation array contains the index of the variable
that should be brought to the i-th level. The size of the array should be
equal or greater to the number of variables currently in use.
Returns 1 in case of success; 0 otherwise.
- Side Effects Changes the variable order for all diagrams and clears
the cache.
- See Also
Cudd_ReduceHeap
- Defined in
cuddReorder.c
DdNode *
Cudd_SolveEqn(
DdManager * bdd,
DdNode * F, the left-hand side of the equation
DdNode * Y, the cube of the y variables
DdNode ** G, the array of solutions (return parameter)
int ** yIndex, index of y variables
int n numbers of unknowns
)
- Implements the solution for F(x,y) = 0. The return
value is the consistency condition. The y variables are the unknowns
and the remaining variables are the parameters. Returns the
consistency condition if successful; NULL otherwise. Cudd_SolveEqn
allocates an array and fills it with the indices of the
unknowns. This array is used by Cudd_VerifySol.
- Side Effects The solution is returned in G; the indices of the y
variables are returned in yIndex.
- See Also
Cudd_VerifySol
- Defined in
cuddSolve.c
DdNode *
Cudd_SplitSet(
DdManager * manager,
DdNode * S,
DdNode ** xVars,
int n,
double m
)
- Returns
m
minterms from a BDD whose
support has n
variables at most. The procedure tries
to create as few extra nodes as possible. The function represented
by S
depends on at most n
of the variables
in xVars
. Returns a BDD with m
minterms
of the on-set of S if successful; NULL otherwise.
- Side Effects None
- Defined in
cuddSplit.c
void
Cudd_Srandom(
long seed
)
- Initializer for the portable number generator based on
ran2 in "Numerical Recipes in C." The input is the seed for the
generator. If it is negative, its absolute value is taken as seed.
If it is 0, then 1 is taken as seed. The initialized sets up the two
recurrences used to generate a long-period stream, and sets up the
shuffle table.
- Side Effects None
- See Also
Cudd_Random
- Defined in
cuddUtil.c
int
Cudd_StdPostReordHook(
DdManager * dd,
const char * str,
void * data
)
- Sample hook function to call after reordering.
Prints on the manager's stdout final size and reordering time.
Returns 1 if successful; 0 otherwise.
- Side Effects None
- See Also
Cudd_StdPreReordHook
- Defined in
cuddAPI.c
int
Cudd_StdPreReordHook(
DdManager * dd,
const char * str,
void * data
)
- Sample hook function to call before reordering.
Prints on the manager's stdout reordering method and initial size.
Returns 1 if successful; 0 otherwise.
- Side Effects None
- See Also
Cudd_StdPostReordHook
- Defined in
cuddAPI.c
DdNode *
Cudd_SubsetCompress(
DdManager * dd, manager
DdNode * f, BDD whose subset is sought
int nvars, number of variables in the support of f
int threshold maximum number of nodes in the subset
)
- Finds a dense subset of BDD
f
. Density is
the ratio of number of minterms to number of nodes. Uses several
techniques in series. It is more expensive than other subsetting
procedures, but often produces better results. See
Cudd_SubsetShortPaths for a description of the threshold and nvars
parameters. Returns a pointer to the result if successful; NULL
otherwise.
- Side Effects None
- See Also
Cudd_SubsetRemap
Cudd_SubsetShortPaths
Cudd_SubsetHeavyBranch
Cudd_bddSqueeze
- Defined in
cuddGenCof.c
DdNode *
Cudd_SubsetHeavyBranch(
DdManager * dd, manager
DdNode * f, function to be subset
int numVars, number of variables in the support of f
int threshold maximum number of nodes in the subset
)
- Extracts a dense subset from a BDD. This procedure
builds a subset by throwing away one of the children of each node,
starting from the root, until the result is small enough. The child
that is eliminated from the result is the one that contributes the
fewer minterms. Returns a pointer to the BDD of the subset if
successful. NULL if the procedure runs out of memory. The parameter
numVars is the maximum number of variables to be used in minterm
calculation and node count calculation. The optimal number should
be as close as possible to the size of the support of f. However,
it is safe to pass the value returned by Cudd_ReadSize for numVars
when the number of variables is under 1023. If numVars is larger
than 1023, it will overflow. If a 0 parameter is passed then the
procedure will compute a value which will avoid overflow but will
cause underflow with 2046 variables or more.
- Side Effects None
- See Also
Cudd_SubsetShortPaths
Cudd_SupersetHeavyBranch
Cudd_ReadSize
- Defined in
cuddSubsetHB.c
DdNode *
Cudd_SubsetShortPaths(
DdManager * dd, manager
DdNode * f, function to be subset
int numVars, number of variables in the support of f
int threshold, maximum number of nodes in the subset
int hardlimit flag: 1 if threshold is a hard limit
)
- Extracts a dense subset from a BDD. This procedure
tries to preserve the shortest paths of the input BDD, because they
give many minterms and contribute few nodes. This procedure may
increase the number of nodes in trying to create the subset or
reduce the number of nodes due to recombination as compared to the
original BDD. Hence the threshold may not be strictly adhered to. In
practice, recombination overshadows the increase in the number of
nodes and results in small BDDs as compared to the threshold. The
hardlimit specifies whether threshold needs to be strictly adhered
to. If it is set to 1, the procedure ensures that result is never
larger than the specified limit but may be considerably less than
the threshold. Returns a pointer to the BDD for the subset if
successful; NULL otherwise. The value for numVars should be as
close as possible to the size of the support of f for better
efficiency. However, it is safe to pass the value returned by
Cudd_ReadSize for numVars. If 0 is passed, then the value returned
by Cudd_ReadSize is used.
- Side Effects None
- See Also
Cudd_SupersetShortPaths
Cudd_SubsetHeavyBranch
Cudd_ReadSize
- Defined in
cuddSubsetSP.c
DdNode *
Cudd_SubsetWithMaskVars(
DdManager * dd, manager
DdNode * f, function from which to pick a cube
DdNode ** vars, array of variables
int nvars, size of vars
DdNode ** maskVars, array of variables
int mvars size of maskVars
)
- Extracts a subset from a BDD in the following procedure.
1. Compute the weight for each mask variable by counting the number of
minterms for both positive and negative cofactors of the BDD with
respect to each mask variable. (weight = #positive - #negative)
2. Find a representative cube of the BDD by using the weight. From the
top variable of the BDD, for each variable, if the weight is greater
than 0.0, choose THEN branch, othereise ELSE branch, until meeting
the constant 1.
3. Quantify out the variables not in maskVars from the representative
cube and if a variable in maskVars is don't care, replace the
variable with a constant(1 or 0) depending on the weight.
4. Make a subset of the BDD by multiplying with the modified cube.
- Side Effects None
- Defined in
cuddUtil.c
DdNode *
Cudd_SupersetCompress(
DdManager * dd, manager
DdNode * f, BDD whose superset is sought
int nvars, number of variables in the support of f
int threshold maximum number of nodes in the superset
)
- Finds a dense superset of BDD
f
. Density is
the ratio of number of minterms to number of nodes. Uses several
techniques in series. It is more expensive than other supersetting
procedures, but often produces better results. See
Cudd_SupersetShortPaths for a description of the threshold and nvars
parameters. Returns a pointer to the result if successful; NULL
otherwise.
- Side Effects None
- See Also
Cudd_SubsetCompress
Cudd_SupersetRemap
Cudd_SupersetShortPaths
Cudd_SupersetHeavyBranch
Cudd_bddSqueeze
- Defined in
cuddGenCof.c
DdNode *
Cudd_SupersetHeavyBranch(
DdManager * dd, manager
DdNode * f, function to be superset
int numVars, number of variables in the support of f
int threshold maximum number of nodes in the superset
)
- Extracts a dense superset from a BDD. The procedure is
identical to the subset procedure except for the fact that it
receives the complement of the given function. Extracting the subset
of the complement function is equivalent to extracting the superset
of the function. This procedure builds a superset by throwing away
one of the children of each node starting from the root of the
complement function, until the result is small enough. The child
that is eliminated from the result is the one that contributes the
fewer minterms.
Returns a pointer to the BDD of the superset if successful. NULL if
intermediate result causes the procedure to run out of memory. The
parameter numVars is the maximum number of variables to be used in
minterm calculation and node count calculation. The optimal number
should be as close as possible to the size of the support of f.
However, it is safe to pass the value returned by Cudd_ReadSize for
numVars when the number of variables is under 1023. If numVars is
larger than 1023, it will overflow. If a 0 parameter is passed then
the procedure will compute a value which will avoid overflow but
will cause underflow with 2046 variables or more.
- Side Effects None
- See Also
Cudd_SubsetHeavyBranch
Cudd_SupersetShortPaths
Cudd_ReadSize
- Defined in
cuddSubsetHB.c
DdNode *
Cudd_SupersetShortPaths(
DdManager * dd, manager
DdNode * f, function to be superset
int numVars, number of variables in the support of f
int threshold, maximum number of nodes in the subset
int hardlimit flag: 1 if threshold is a hard limit
)
- Extracts a dense superset from a BDD. The procedure is
identical to the subset procedure except for the fact that it
receives the complement of the given function. Extracting the subset
of the complement function is equivalent to extracting the superset
of the function. This procedure tries to preserve the shortest
paths of the complement BDD, because they give many minterms and
contribute few nodes. This procedure may increase the number of
nodes in trying to create the superset or reduce the number of nodes
due to recombination as compared to the original BDD. Hence the
threshold may not be strictly adhered to. In practice, recombination
overshadows the increase in the number of nodes and results in small
BDDs as compared to the threshold. The hardlimit specifies whether
threshold needs to be strictly adhered to. If it is set to 1, the
procedure ensures that result is never larger than the specified
limit but may be considerably less than the threshold. Returns a
pointer to the BDD for the superset if successful; NULL
otherwise. The value for numVars should be as close as possible to
the size of the support of f for better efficiency. However, it is
safe to pass the value returned by Cudd_ReadSize for numVar. If 0
is passed, then the value returned by Cudd_ReadSize is used.
- Side Effects None
- See Also
Cudd_SubsetShortPaths
Cudd_SupersetHeavyBranch
Cudd_ReadSize
- Defined in
cuddSubsetSP.c
int *
Cudd_SupportIndex(
DdManager * dd, manager
DdNode * f DD whose support is sought
)
- Finds the variables on which a DD depends. Returns an
index array of the variables if successful; NULL otherwise. The
size of the array equals the number of variables in the manager.
Each entry of the array is 1 if the corresponding variable is in the
support of the DD and 0 otherwise.
- Side Effects None
- See Also
Cudd_Support
Cudd_VectorSupport
Cudd_ClassifySupport
- Defined in
cuddUtil.c
int
Cudd_SupportSize(
DdManager * dd, manager
DdNode * f DD whose support size is sought
)
- Counts the variables on which a DD depends.
Returns the number of the variables if successful; CUDD_OUT_OF_MEM
otherwise.
- Side Effects None
- See Also
Cudd_Support
- Defined in
cuddUtil.c
DdNode *
Cudd_Support(
DdManager * dd, manager
DdNode * f DD whose support is sought
)
- Finds the variables on which a DD depends.
Returns a BDD consisting of the product of the variables if
successful; NULL otherwise.
- Side Effects None
- See Also
Cudd_VectorSupport
Cudd_ClassifySupport
- Defined in
cuddUtil.c
void
Cudd_SymmProfile(
DdManager * table,
int lower,
int upper
)
- Prints statistics on symmetric variables.
- Side Effects None
- Defined in
cuddSymmetry.c
void
Cudd_TurnOffCountDead(
DdManager * dd
)
- Causes the dead nodes not to be counted towards
triggering reordering. This causes less frequent reorderings. By
default dead nodes are not counted. Therefore there is no need to
call this function unless Cudd_TurnOnCountDead has been previously
called.
- Side Effects Changes the manager.
- See Also
Cudd_TurnOnCountDead
Cudd_DeadAreCounted
- Defined in
cuddAPI.c
void
Cudd_TurnOnCountDead(
DdManager * dd
)
- Causes the dead nodes to be counted towards triggering
reordering. This causes more frequent reorderings. By default dead
nodes are not counted.
- Side Effects Changes the manager.
- See Also
Cudd_TurnOffCountDead
Cudd_DeadAreCounted
- Defined in
cuddAPI.c
DdNode *
Cudd_UnderApprox(
DdManager * dd, manager
DdNode * f, function to be subset
int numVars, number of variables in the support of f
int threshold, when to stop approximation
int safe, enforce safe approximation
double quality minimum improvement for accepted changes
)
- Extracts a dense subset from a BDD. This procedure uses
a variant of Tom Shiple's underapproximation method. The main
difference from the original method is that density is used as cost
function. Returns a pointer to the BDD of the subset if
successful. NULL if the procedure runs out of memory. The parameter
numVars is the maximum number of variables to be used in minterm
calculation. The optimal number should be as close as possible to
the size of the support of f. However, it is safe to pass the value
returned by Cudd_ReadSize for numVars when the number of variables
is under 1023. If numVars is larger than 1023, it will cause
overflow. If a 0 parameter is passed then the procedure will compute
a value which will avoid overflow but will cause underflow with 2046
variables or more.
- Side Effects None
- See Also
Cudd_SubsetShortPaths
Cudd_SubsetHeavyBranch
Cudd_ReadSize
- Defined in
cuddApprox.c
int *
Cudd_VectorSupportIndex(
DdManager * dd, manager
DdNode ** F, array of DDs whose support is sought
int n size of the array
)
- Finds the variables on which a set of DDs depends.
The set must contain either BDDs and ADDs, or ZDDs.
Returns an index array of the variables if successful; NULL otherwise.
- Side Effects None
- See Also
Cudd_SupportIndex
Cudd_VectorSupport
Cudd_ClassifySupport
- Defined in
cuddUtil.c
int
Cudd_VectorSupportSize(
DdManager * dd, manager
DdNode ** F, array of DDs whose support is sought
int n size of the array
)
- Counts the variables on which a set of DDs depends.
The set must contain either BDDs and ADDs, or ZDDs.
Returns the number of the variables if successful; CUDD_OUT_OF_MEM
otherwise.
- Side Effects None
- See Also
Cudd_VectorSupport
Cudd_SupportSize
- Defined in
cuddUtil.c
DdNode *
Cudd_VectorSupport(
DdManager * dd, manager
DdNode ** F, array of DDs whose support is sought
int n size of the array
)
- Finds the variables on which a set of DDs depends.
The set must contain either BDDs and ADDs, or ZDDs.
Returns a BDD consisting of the product of the variables if
successful; NULL otherwise.
- Side Effects None
- See Also
Cudd_Support
Cudd_ClassifySupport
- Defined in
cuddUtil.c
DdNode *
Cudd_VerifySol(
DdManager * bdd,
DdNode * F, the left-hand side of the equation
DdNode ** G, the array of solutions
int * yIndex, index of y variables
int n numbers of unknowns
)
- Checks the solution of F(x,y) = 0. This procedure
substitutes the solution components for the unknowns of F and returns
the resulting BDD for F.
- Side Effects Frees the memory pointed by yIndex.
- See Also
Cudd_SolveEqn
- Defined in
cuddSolve.c
DdNode *
Cudd_Xeqy(
DdManager * dd, DD manager
int N, number of x and y variables
DdNode ** x, array of x variables
DdNode ** y array of y variables
)
- This function generates a BDD for the function x==y.
Both x and y are N-bit numbers, x[0] x[1] ... x[N-1] and
y[0] y[1] ... y[N-1], with 0 the most significant bit.
The BDD is built bottom-up.
It has 3*N-1 internal nodes, if the variables are ordered as follows:
x[0] y[0] x[1] y[1] ... x[N-1] y[N-1].
- Side Effects None
- See Also
Cudd_addXeqy
- Defined in
cuddPriority.c
DdNode *
Cudd_Xgty(
DdManager * dd, DD manager
int N, number of x and y variables
DdNode ** z, array of z variables: unused
DdNode ** x, array of x variables
DdNode ** y array of y variables
)
- This function generates a BDD for the function x > y.
Both x and y are N-bit numbers, x[0] x[1] ... x[N-1] and
y[0] y[1] ... y[N-1], with 0 the most significant bit.
The BDD is built bottom-up.
It has 3*N-1 internal nodes, if the variables are ordered as follows:
x[0] y[0] x[1] y[1] ... x[N-1] y[N-1].
Argument z is not used by Cudd_Xgty: it is included to make it
call-compatible to Cudd_Dxygtdxz and Cudd_Dxygtdyz.
- Side Effects None
- See Also
Cudd_PrioritySelect
Cudd_Dxygtdxz
Cudd_Dxygtdyz
- Defined in
cuddPriority.c
DdNode *
Cudd_addAgreement(
DdManager * dd,
DdNode ** f,
DdNode ** g
)
- Returns NULL if not a terminal case; f op g otherwise,
where f op g is f if f==g; background if f!=g.
- Side Effects None
- See Also
Cudd_addApply
- Defined in
cuddAddApply.c
DdNode *
Cudd_addApply(
DdManager * dd,
DD_AOP op,
DdNode * f,
DdNode * g
)
- Applies op to the corresponding discriminants of f and g.
Returns a pointer to the result if succssful; NULL otherwise.
- Side Effects None
- See Also
Cudd_addMonadicApply
Cudd_addPlus
Cudd_addTimes
Cudd_addThreshold
Cudd_addSetNZ
Cudd_addDivide
Cudd_addMinus
Cudd_addMinimum
Cudd_addMaximum
Cudd_addOneZeroMaximum
Cudd_addDiff
Cudd_addAgreement
Cudd_addOr
Cudd_addNand
Cudd_addNor
Cudd_addXor
Cudd_addXnor
- Defined in
cuddAddApply.c
DdNode *
Cudd_addBddInterval(
DdManager * dd,
DdNode * f,
CUDD_VALUE_TYPE lower,
CUDD_VALUE_TYPE upper
)
- Converts an ADD to a BDD by replacing 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
- Defined in
cuddBridge.c
DdNode *
Cudd_addBddIthBit(
DdManager * dd,
DdNode * f,
int bit
)
- 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 is 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
- Defined in
cuddBridge.c
DdNode *
Cudd_addBddPattern(
DdManager * dd,
DdNode * f
)
- Converts an ADD to a BDD by replacing 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
- Defined in
cuddBridge.c
DdNode *
Cudd_addBddStrictThreshold(
DdManager * dd,
DdNode * f,
CUDD_VALUE_TYPE value
)
- Converts an ADD to a BDD by replacing 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
- Defined in
cuddBridge.c
DdNode *
Cudd_addBddThreshold(
DdManager * dd,
DdNode * f,
CUDD_VALUE_TYPE value
)
- Converts an ADD to a BDD by replacing 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
- Defined in
cuddBridge.c
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
- Defined in
cuddAddIte.c
DdNode *
Cudd_addCompose(
DdManager * dd,
DdNode * f,
DdNode * g,
int v
)
- Substitutes g for x_v in the ADD for f. v is the index of the
variable to be substituted. g must be a 0-1 ADD. Cudd_bddCompose passes
the corresponding projection function to the recursive procedure, so
that the cache may be used. Returns the composed ADD if successful;
NULL otherwise.
- Side Effects None
- See Also
Cudd_bddCompose
- Defined in
cuddCompose.c
DdNode *
Cudd_addComputeCube(
DdManager * dd,
DdNode ** vars,
int * phase,
int n
)
- Computes the cube of an array of ADD variables. If
non-null, the phase argument indicates which literal of each
variable should appear in the cube. If phase[i] is nonzero, then the
positive literal is used. If phase is NULL, the cube is positive unate.
Returns a pointer to the result if successful; NULL otherwise.
- Side Effects none
- See Also
Cudd_bddComputeCube
- Defined in
cuddUtil.c
DdNode *
Cudd_addConstrain(
DdManager * dd,
DdNode * f,
DdNode * c
)
- Computes f constrain c (f @ c), for f an ADD and c a 0-1
ADD. List of special cases:
- F @ 0 = 0
- F @ 1 = F
- 0 @ c = 0
- 1 @ c = 1
- F @ F = 1
Returns a pointer to the result if successful; NULL otherwise.
- Side Effects None
- See Also
Cudd_bddConstrain
- Defined in
cuddGenCof.c
DdNode *
Cudd_addConst(
DdManager * dd,
CUDD_VALUE_TYPE c
)
- Retrieves the ADD for constant c if it already
exists, or creates a new ADD. Returns a pointer to the
ADD if successful; NULL otherwise.
- Side Effects None
- See Also
Cudd_addNewVar
Cudd_addIthVar
- Defined in
cuddAPI.c
DdNode *
Cudd_addDiff(
DdManager * dd,
DdNode ** f,
DdNode ** g
)
- Returns NULL if not a terminal case; f op g otherwise,
where f op g is plusinfinity if f=g; min(f,g) if f!=g.
- Side Effects None
- See Also
Cudd_addApply
- Defined in
cuddAddApply.c
DdNode *
Cudd_addDivide(
DdManager * dd,
DdNode ** f,
DdNode ** g
)
- Integer and floating point division. Returns NULL if not
a terminal case; f / g otherwise.
- Side Effects None
- See Also
Cudd_addApply
- Defined in
cuddAddApply.c
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. Returns a pointer to the resulting ADD (which may
or may not be constant) or DD_NON_CONSTANT. If f is identically 0,
the check is assumed to be successful, and the background value is
returned. No new nodes are created.
- Side Effects None
- See Also
Cudd_addIteConstant
Cudd_addLeq
- Defined in
cuddAddIte.c
DdNode *
Cudd_addExistAbstract(
DdManager * manager,
DdNode * f,
DdNode * cube
)
- Abstracts all the variables in cube from f by summing
over all possible values taken by the variables. Returns the
abstracted ADD.
- Side Effects None
- See Also
Cudd_addUnivAbstract
Cudd_bddExistAbstract
Cudd_addOrAbstract
- Defined in
cuddAddAbs.c
DdNode *
Cudd_addFindMax(
DdManager * dd,
DdNode * f
)
- Returns a pointer to a constant ADD.
- Side Effects None
- Defined in
cuddAddFind.c
DdNode *
Cudd_addFindMin(
DdManager * dd,
DdNode * f
)
- Returns a pointer to a constant ADD.
- Side Effects None
- Defined in
cuddAddFind.c
DdNode *
Cudd_addGeneralVectorCompose(
DdManager * dd,
DdNode * f,
DdNode ** vectorOn,
DdNode ** vectorOff
)
- Given a vector of ADDs, creates a new ADD by substituting the
ADDs for the variables of the ADD f. vectorOn contains ADDs to be substituted
for the x_v and vectorOff the ADDs to be substituted for x_v'. There should
be an entry in vector for each variable in the manager. If no substitution
is sought for a given variable, the corresponding projection function should
be specified in the vector. This function implements simultaneous
composition. Returns a pointer to the resulting ADD if successful; NULL
otherwise.
- Side Effects None
- See Also
Cudd_addVectorCompose
Cudd_addNonSimCompose
Cudd_addPermute
Cudd_addCompose
Cudd_bddVectorCompose
- Defined in
cuddCompose.c
DdNode *
Cudd_addHamming(
DdManager * dd,
DdNode ** xVars,
DdNode ** yVars,
int nVars
)
- Computes the Hamming distance ADD. Returns an ADD that
gives the Hamming distance between its two arguments if successful;
NULL otherwise. The two vectors xVars and yVars identify the variables
that form the two arguments.
- Side Effects None
- Defined in
cuddPriority.c
int
Cudd_addHarwell(
FILE * fp, pointer to the input file
DdManager * dd, DD manager
DdNode ** E, characteristic function of the graph
DdNode *** x, array of row variables
DdNode *** y, array of column variables
DdNode *** xn, array of complemented row variables
DdNode *** yn_, array of complemented column variables
int * nx, number or row variables
int * ny, number or column variables
int * m, number of rows
int * n, number of columns
int bx, first index of row variables
int sx, step of row variables
int by, first index of column variables
int sy, step of column variables
int pr verbosity level
)
- Reads in a matrix in the format of the Harwell-Boeing
benchmark suite. The variables are ordered as follows:
x[0] y[0] x[1] y[1] ...
0 is the most significant bit. On input, nx and ny hold the numbers
of row and column variables already in existence. On output, they
hold the numbers of row and column variables actually used by the
matrix. m and n are set to the numbers of rows and columns of the
matrix. Their values on input are immaterial. Returns 1 on
success; 0 otherwise. The ADD for the sparse matrix is returned in
E, and its reference count is > 0.
- Side Effects None
- See Also
Cudd_addRead
Cudd_bddRead
- Defined in
cuddHarwell.c
DdNode *
Cudd_addIteConstant(
DdManager * dd,
DdNode * f,
DdNode * g,
DdNode * h
)
- Implements ITEconstant for ADDs. f must be a 0-1 ADD.
Returns a pointer to the resulting ADD (which may or may not be
constant) or DD_NON_CONSTANT. 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.
- Side Effects None
- See Also
Cudd_addIte
Cudd_addEvalConst
Cudd_bddIteConstant
- Defined in
cuddAddIte.c
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
- Defined in
cuddAddIte.c
DdNode *
Cudd_addIthBit(
DdManager * dd,
DdNode * f,
int bit
)
- Produces an ADD from another ADD 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 is has a fractional
part, it is ignored. Repeated calls to this procedure allow one to
transform an integer-valued ADD into an array of ADDs, one for each
bit of the leaf values. Returns a pointer to the resulting ADD if
successful; NULL otherwise.
- Side Effects None
- See Also
Cudd_addBddIthBit
- Defined in
cuddAddFind.c
DdNode *
Cudd_addIthVar(
DdManager * dd,
int i
)
- Retrieves the ADD variable with index i if it already
exists, or creates a new ADD variable. Returns a pointer to the
variable if successful; NULL otherwise. An ADD variable differs from
a BDD variable because it points to the arithmetic zero, instead of
having a complement pointer to 1.
- Side Effects None
- See Also
Cudd_addNewVar
Cudd_bddIthVar
Cudd_addConst
Cudd_addNewVarAtLevel
- Defined in
cuddAPI.c
int
Cudd_addLeq(
DdManager * dd,
DdNode * f,
DdNode * g
)
- Returns 1 if f is less than or equal to g; 0 otherwise.
No new nodes are created. This procedure works for arbitrary ADDs.
For 0-1 ADDs Cudd_addEvalConst is more efficient.
- Side Effects None
- See Also
Cudd_addIteConstant
Cudd_addEvalConst
Cudd_bddLeq
- Defined in
cuddAddIte.c
DdNode *
Cudd_addLog(
DdManager * dd,
DdNode * f
)
- Natural logarithm of an ADDs. Returns NULL
if not a terminal case; log(f) otherwise. The discriminants of f must
be positive double's.
- Side Effects None
- See Also
Cudd_addMonadicApply
- Defined in
cuddAddApply.c
DdNode *
Cudd_addMatrixMultiply(
DdManager * dd,
DdNode * A,
DdNode * B,
DdNode ** z,
int nz
)
- Calculates the product of two matrices, A and B,
represented as ADDs. This procedure implements the quasiring multiplication
algorithm. A is assumed to depend on variables x (rows) and z
(columns). B is assumed to depend on variables z (rows) and y
(columns). The product of A and B then depends on x (rows) and y
(columns). Only the z variables have to be explicitly identified;
they are the "summation" variables. Returns a pointer to the
result if successful; NULL otherwise.
- Side Effects None
- See Also
Cudd_addTimesPlus
Cudd_addTriangle
Cudd_bddAndAbstract
- Defined in
cuddMatMult.c
DdNode *
Cudd_addMaximum(
DdManager * dd,
DdNode ** f,
DdNode ** g
)
- Integer and floating point max for Cudd_addApply.
Returns NULL if not a terminal case; max(f,g) otherwise.
- Side Effects None
- See Also
Cudd_addApply
- Defined in
cuddAddApply.c
DdNode *
Cudd_addMinimum(
DdManager * dd,
DdNode ** f,
DdNode ** g
)
- Integer and floating point min for Cudd_addApply.
Returns NULL if not a terminal case; min(f,g) otherwise.
- Side Effects None
- See Also
Cudd_addApply
- Defined in
cuddAddApply.c
DdNode *
Cudd_addMinus(
DdManager * dd,
DdNode ** f,
DdNode ** g
)
- Integer and floating point subtraction. Returns NULL if
not a terminal case; f - g otherwise.
- Side Effects None
- See Also
Cudd_addApply
- Defined in
cuddAddApply.c
DdNode *
Cudd_addMonadicApply(
DdManager * dd,
DD_MAOP op,
DdNode * f
)
- Applies op to the discriminants of f.
Returns a pointer to the result if succssful; NULL otherwise.
- Side Effects None
- See Also
Cudd_addApply
Cudd_addLog
- Defined in
cuddAddApply.c
DdNode *
Cudd_addNand(
DdManager * dd,
DdNode ** f,
DdNode ** g
)
- NAND of two 0-1 ADDs. Returns NULL
if not a terminal case; f NAND g otherwise.
- Side Effects None
- See Also
Cudd_addApply
- Defined in
cuddAddApply.c
DdNode *
Cudd_addNegate(
DdManager * dd,
DdNode * f
)
- Computes the additive inverse of an ADD. Returns a pointer
to the result if successful; NULL otherwise.
- Side Effects None
- See Also
Cudd_addCmpl
- Defined in
cuddAddNeg.c
DdNode *
Cudd_addNewVarAtLevel(
DdManager * dd,
int level
)
- Creates a new ADD variable. The new variable has an
index equal to the largest previous index plus 1 and is positioned at
the specified level in the order. Returns a pointer to the new
variable if successful; NULL otherwise.
- Side Effects None
- See Also
Cudd_addNewVar
Cudd_addIthVar
Cudd_bddNewVarAtLevel
- Defined in
cuddAPI.c
DdNode *
Cudd_addNewVar(
DdManager * dd
)
- Creates a new ADD variable. The new variable has an
index equal to the largest previous index plus 1. Returns a
pointer to the new variable if successful; NULL otherwise.
An ADD variable differs from a BDD variable because it points to the
arithmetic zero, instead of having a complement pointer to 1.
- Side Effects None
- See Also
Cudd_bddNewVar
Cudd_addIthVar
Cudd_addConst
Cudd_addNewVarAtLevel
- Defined in
cuddAPI.c
DdNode *
Cudd_addNonSimCompose(
DdManager * dd,
DdNode * f,
DdNode ** vector
)
- Given a vector of 0-1 ADDs, creates a new ADD by
substituting the 0-1 ADDs for the variables of the ADD f. There
should be an entry in vector for each variable in the manager.
This function implements non-simultaneous composition. If any of the
functions being composed depends on any of the variables being
substituted, then the result depends on the order of composition,
which in turn depends on the variable order: The variables farther from
the roots in the order are substituted first.
Returns a pointer to the resulting ADD if successful; NULL
otherwise.
- Side Effects None
- See Also
Cudd_addVectorCompose
Cudd_addPermute
Cudd_addCompose
- Defined in
cuddCompose.c
DdNode *
Cudd_addNor(
DdManager * dd,
DdNode ** f,
DdNode ** g
)
- NOR of two 0-1 ADDs. Returns NULL
if not a terminal case; f NOR g otherwise.
- Side Effects None
- See Also
Cudd_addApply
- Defined in
cuddAddApply.c
DdNode *
Cudd_addOneZeroMaximum(
DdManager * dd,
DdNode ** f,
DdNode ** g
)
- Returns 1 if f > g and 0 otherwise. Used in
conjunction with Cudd_addApply. Returns NULL if not a terminal
case.
- Side Effects None
- See Also
Cudd_addApply
- Defined in
cuddAddApply.c
DdNode *
Cudd_addOrAbstract(
DdManager * manager,
DdNode * f,
DdNode * cube
)
- Abstracts all the variables in cube from the 0-1 ADD f
by taking the disjunction over all possible values taken by the
variables. Returns the abstracted ADD if successful; NULL
otherwise.
- Side Effects None
- See Also
Cudd_addUnivAbstract
Cudd_addExistAbstract
- Defined in
cuddAddAbs.c
DdNode *
Cudd_addOr(
DdManager * dd,
DdNode ** f,
DdNode ** g
)
- Disjunction of two 0-1 ADDs. Returns NULL
if not a terminal case; f OR g otherwise.
- Side Effects None
- See Also
Cudd_addApply
- Defined in
cuddAddApply.c
DdNode *
Cudd_addOuterSum(
DdManager * dd,
DdNode * M,
DdNode * r,
DdNode * c
)
- Takes the pointwise minimum of a matrix and the outer
sum of two vectors. This procedure is used in the Floyd-Warshall
all-pair shortest path algorithm. Returns a pointer to the result if
successful; NULL otherwise.
- Side Effects None
- Defined in
cuddMatMult.c
DdNode *
Cudd_addPermute(
DdManager * manager,
DdNode * node,
int * permut
)
- Given a permutation in array permut, creates a new ADD
with permuted variables. There should be an entry in array permut
for each variable in the manager. The i-th entry of permut holds the
index of the variable that is to substitute the i-th
variable. Returns a pointer to the resulting ADD if successful; NULL
otherwise.
- Side Effects None
- See Also
Cudd_bddPermute
Cudd_addSwapVariables
- Defined in
cuddCompose.c
DdNode *
Cudd_addPlus(
DdManager * dd,
DdNode ** f,
DdNode ** g
)
- Integer and floating point addition. Returns NULL if not
a terminal case; f+g otherwise.
- Side Effects None
- See Also
Cudd_addApply
- Defined in
cuddAddApply.c
int
Cudd_addRead(
FILE * fp, input file pointer
DdManager * dd, DD manager
DdNode ** E, characteristic function of the graph
DdNode *** x, array of row variables
DdNode *** y, array of column variables
DdNode *** xn, array of complemented row variables
DdNode *** yn_, array of complemented column variables
int * nx, number or row variables
int * ny, number or column variables
int * m, number of rows
int * n, number of columns
int bx, first index of row variables
int sx, step of row variables
int by, first index of column variables
int sy step of column variables
)
- Reads in a sparse matrix specified in a simple format.
The first line of the input contains the numbers of rows and columns.
The remaining lines contain the elements of the matrix, one per line.
Given a background value
(specified by the background field of the manager), only the values
different from it are explicitly listed. Each foreground element is
described by two integers, i.e., the row and column number, and a
real number, i.e., the value.
Cudd_addRead produces an ADD that depends on two sets of variables: x
and y. The x variables (x[0] ... x[nx-1]) encode the row index and
the y variables (y[0] ... y[ny-1]) encode the column index.
x[0] and y[0] are the most significant bits in the indices.
The variables may already exist or may be created by the function.
The index of x[i] is bx+i*sx, and the index of y[i] is by+i*sy.
On input, nx and ny hold the numbers
of row and column variables already in existence. On output, they
hold the numbers of row and column variables actually used by the
matrix. When Cudd_addRead creates the variable arrays,
the index of x[i] is bx+i*sx, and the index of y[i] is by+i*sy.
When some variables already exist Cudd_addRead expects the indices
of the existing x variables to be bx+i*sx, and the indices of the
existing y variables to be by+i*sy.
m and n are set to the numbers of rows and columns of the
matrix. Their values on input are immaterial.
The ADD for the
sparse matrix is returned in E, and its reference count is > 0.
Cudd_addRead returns 1 in case of success; 0 otherwise.
- Side Effects nx and ny are set to the numbers of row and column
variables. m and n are set to the numbers of rows and columns. x and y
are possibly extended to represent the array of row and column
variables. Similarly for xn and yn_, which hold on return from
Cudd_addRead the complements of the row and column variables.
- See Also
Cudd_addHarwell
Cudd_bddRead
- Defined in
cuddRead.c
DdNode *
Cudd_addResidue(
DdManager * dd, manager
int n, number of bits
int m, modulus
int options, options
int top index of top variable
)
- Builds an ADD for the residue modulo m of an n-bit
number. The modulus must be at least 2, and the number of bits at
least 1. Parameter options specifies whether the MSB should be on top
or the LSB; and whther the number whose residue is computed is in
two's complement notation or not. The macro CUDD_RESIDUE_DEFAULT
specifies LSB on top and unsigned number. The macro CUDD_RESIDUE_MSB
specifies MSB on top, and the macro CUDD_RESIDUE_TC specifies two's
complement residue. To request MSB on top and two's complement residue
simultaneously, one can OR the two macros:
CUDD_RESIDUE_MSB | CUDD_RESIDUE_TC.
Cudd_addResidue returns a pointer to the resulting ADD if successful;
NULL otherwise.
- Side Effects None
- Defined in
cuddAddWalsh.c
DdNode *
Cudd_addRestrict(
DdManager * dd,
DdNode * f,
DdNode * c
)
- ADD restrict according to Coudert and Madre's algorithm
(ICCAD90). Returns the restricted ADD if successful; otherwise NULL.
If application of restrict results in an ADD larger than the input
ADD, the input ADD is returned.
- Side Effects None
- See Also
Cudd_addConstrain
Cudd_bddRestrict
- Defined in
cuddGenCof.c
DdNode *
Cudd_addRoundOff(
DdManager * dd,
DdNode * f,
int N
)
- Rounds off the discriminants of an ADD. The discriminants are
rounded off to N digits after the decimal. Returns a pointer to the result
ADD if successful; NULL otherwise.
- Side Effects None
- Defined in
cuddAddNeg.c
DdNode *
Cudd_addScalarInverse(
DdManager * dd,
DdNode * f,
DdNode * epsilon
)
- Computes an n ADD where the discriminants are the
multiplicative inverses of the corresponding discriminants of the
argument ADD. Returns a pointer to the resulting ADD in case of
success. Returns NULL if any discriminants smaller than epsilon is
encountered.
- Side Effects None
- Defined in
cuddAddInv.c
DdNode *
Cudd_addSetNZ(
DdManager * dd,
DdNode ** f,
DdNode ** g
)
- This operator sets f to the value of g wherever g != 0.
Returns NULL if not a terminal case; f op g otherwise.
- Side Effects None
- See Also
Cudd_addApply
- Defined in
cuddAddApply.c
DdNode *
Cudd_addSwapVariables(
DdManager * dd,
DdNode * f,
DdNode ** x,
DdNode ** y,
int n
)
- Swaps two sets of variables of the same size (x and y) in
the ADD f. The size is given by n. The two sets of variables are
assumed to be disjoint. Returns a pointer to the resulting ADD if
successful; NULL otherwise.
- Side Effects None
- See Also
Cudd_addPermute
Cudd_bddSwapVariables
- Defined in
cuddCompose.c
DdNode *
Cudd_addThreshold(
DdManager * dd,
DdNode ** f,
DdNode ** g
)
- Threshold operator for Apply (f if f >=g; 0 if f<g).
Returns NULL if not a terminal case; f op g otherwise.
- Side Effects None
- See Also
Cudd_addApply
- Defined in
cuddAddApply.c
DdNode *
Cudd_addTimesPlus(
DdManager * dd,
DdNode * A,
DdNode * B,
DdNode ** z,
int nz
)
- Calculates the product of two matrices, A and B,
represented as ADDs, using the CMU matrix by matrix multiplication
procedure by Clarke et al.. Matrix A has x's as row variables and z's
as column variables, while matrix B has z's as row variables and y's
as column variables. Returns the pointer to the result if successful;
NULL otherwise. The resulting matrix has x's as row variables and y's
as column variables.
- Side Effects None
- See Also
Cudd_addMatrixMultiply
- Defined in
cuddMatMult.c
DdNode *
Cudd_addTimes(
DdManager * dd,
DdNode ** f,
DdNode ** g
)
- Integer and floating point multiplication. Returns NULL
if not a terminal case; f * g otherwise. This function can be used also
to take the AND of two 0-1 ADDs.
- Side Effects None
- See Also
Cudd_addApply
- Defined in
cuddAddApply.c
DdNode *
Cudd_addTriangle(
DdManager * dd,
DdNode * f,
DdNode * g,
DdNode ** z,
int nz
)
- Implements the semiring multiplication algorithm used in
the triangulation step for the shortest path computation. f
is assumed to depend on variables x (rows) and z (columns). g is
assumed to depend on variables z (rows) and y (columns). The product
of f and g then depends on x (rows) and y (columns). Only the z
variables have to be explicitly identified; they are the
"abstraction" variables. Returns a pointer to the result if
successful; NULL otherwise.
- Side Effects None
- See Also
Cudd_addMatrixMultiply
Cudd_bddAndAbstract
- Defined in
cuddMatMult.c
DdNode *
Cudd_addUnivAbstract(
DdManager * manager,
DdNode * f,
DdNode * cube
)
- Abstracts all the variables in cube from f by taking
the product over all possible values taken by the variable. Returns
the abstracted ADD if successful; NULL otherwise.
- Side Effects None
- See Also
Cudd_addExistAbstract
Cudd_bddUnivAbstract
Cudd_addOrAbstract
- Defined in
cuddAddAbs.c
DdNode *
Cudd_addVectorCompose(
DdManager * dd,
DdNode * f,
DdNode ** vector
)
- Given a vector of 0-1 ADDs, creates a new ADD by
substituting the 0-1 ADDs for the variables of the ADD f. There
should be an entry in vector for each variable in the manager.
If no substitution is sought for a given variable, the corresponding
projection function should be specified in the vector.
This function implements simultaneous composition.
Returns a pointer to the resulting ADD if successful; NULL
otherwise.
- Side Effects None
- See Also
Cudd_addNonSimCompose
Cudd_addPermute
Cudd_addCompose
Cudd_bddVectorCompose
- Defined in
cuddCompose.c
DdNode *
Cudd_addWalsh(
DdManager * dd,
DdNode ** x,
DdNode ** y,
int n
)
- Generates a Walsh matrix in ADD form. Returns a pointer
to the matrixi if successful; NULL otherwise.
- Side Effects None
- Defined in
cuddAddWalsh.c
DdNode *
Cudd_addXeqy(
DdManager * dd, DD manager
int N, number of x and y variables
DdNode ** x, array of x variables
DdNode ** y array of y variables
)
- This function generates an ADD for the function x==y.
Both x and y are N-bit numbers, x[0] x[1] ... x[N-1] and
y[0] y[1] ... y[N-1], with 0 the most significant bit.
The ADD is built bottom-up.
It has 3*N-1 internal nodes, if the variables are ordered as follows:
x[0] y[0] x[1] y[1] ... x[N-1] y[N-1].
- Side Effects None
- See Also
Cudd_Xeqy
- Defined in
cuddPriority.c
DdNode *
Cudd_addXnor(
DdManager * dd,
DdNode ** f,
DdNode ** g
)
- XNOR of two 0-1 ADDs. Returns NULL
if not a terminal case; f XNOR g otherwise.
- Side Effects None
- See Also
Cudd_addApply
- Defined in
cuddAddApply.c
DdNode *
Cudd_addXor(
DdManager * dd,
DdNode ** f,
DdNode ** g
)
- XOR of two 0-1 ADDs. Returns NULL
if not a terminal case; f XOR g otherwise.
- Side Effects None
- See Also
Cudd_addApply
- Defined in
cuddAddApply.c
DdNode *
Cudd_bddAdjPermuteX(
DdManager * dd,
DdNode * B,
DdNode ** x,
int n
)
- Rearranges a set of variables in the BDD B. The size of
the set is given by n. This procedure is intended for the
`randomization' of the priority functions. Returns a pointer to the
BDD if successful; NULL otherwise.
- Side Effects None
- See Also
Cudd_bddPermute
Cudd_bddSwapVariables
Cudd_Dxygtdxz
Cudd_Dxygtdyz
Cudd_PrioritySelect
- Defined in
cuddCompose.c
DdNode *
Cudd_bddAndAbstractLimit(
DdManager * manager,
DdNode * f,
DdNode * g,
DdNode * cube,
unsigned int limit
)
- Takes the AND of two BDDs and simultaneously abstracts
the variables in cube. The variables are existentially abstracted.
Returns a pointer to the result is successful; NULL otherwise.
In particular, if the number of new nodes created exceeds
limit
, this function returns NULL.
- Side Effects None
- See Also
Cudd_bddAndAbstract
- Defined in
cuddAndAbs.c
DdNode *
Cudd_bddAndAbstract(
DdManager * manager,
DdNode * f,
DdNode * g,
DdNode * cube
)
- Takes the AND of two BDDs and simultaneously abstracts
the variables in cube. The variables are existentially abstracted.
Returns a pointer to the result is successful; NULL otherwise.
Cudd_bddAndAbstract implements the semiring matrix multiplication
algorithm for the boolean semiring.
- Side Effects None
- See Also
Cudd_addMatrixMultiply
Cudd_addTriangle
Cudd_bddAnd
- Defined in
cuddAndAbs.c
DdNode *
Cudd_bddAndLimit(
DdManager * dd,
DdNode * f,
DdNode * g,
unsigned int limit
)
- Computes the conjunction of two BDDs f and g. Returns a
pointer to the resulting BDD if successful; NULL if the intermediate
result blows up or more new nodes than
limit
are
required.
- Side Effects None
- See Also
Cudd_bddAnd
- Defined in
cuddBddIte.c
DdNode *
Cudd_bddAnd(
DdManager * dd,
DdNode * f,
DdNode * g
)
- Computes the conjunction of two BDDs f and g. Returns a
pointer to the resulting BDD if successful; NULL if the intermediate
result blows up.
- Side Effects None
- See Also
Cudd_bddIte
Cudd_addApply
Cudd_bddAndAbstract
Cudd_bddIntersect
Cudd_bddOr
Cudd_bddNand
Cudd_bddNor
Cudd_bddXor
Cudd_bddXnor
- Defined in
cuddBddIte.c
int
Cudd_bddApproxConjDecomp(
DdManager * dd, manager
DdNode * f, function to be decomposed
DdNode *** conjuncts address of the first factor
)
- Performs two-way conjunctive decomposition of a
BDD. This procedure owes its name to the use of supersetting to
obtain an initial factor of the given function. Returns the number
of conjuncts produced, that is, 2 if successful; 1 if no meaningful
decomposition was found; 0 otherwise. The conjuncts produced by this
procedure tend to be imbalanced.
- Side Effects The factors are returned in an array as side effects.
The array is allocated by this function. It is the caller's responsibility
to free it. On successful completion, the conjuncts are already
referenced. If the function returns 0, the array for the conjuncts is
not allocated. If the function returns 1, the only factor equals the
function to be decomposed.
- See Also
Cudd_bddApproxDisjDecomp
Cudd_bddIterConjDecomp
Cudd_bddGenConjDecomp
Cudd_bddVarConjDecomp
Cudd_RemapOverApprox
Cudd_bddSqueeze
Cudd_bddLICompaction
- Defined in
cuddDecomp.c
int
Cudd_bddApproxDisjDecomp(
DdManager * dd, manager
DdNode * f, function to be decomposed
DdNode *** disjuncts address of the array of the disjuncts
)
- Performs two-way disjunctive decomposition of a BDD.
Returns the number of disjuncts produced, that is, 2 if successful;
1 if no meaningful decomposition was found; 0 otherwise. The
disjuncts produced by this procedure tend to be imbalanced.
- Side Effects The two disjuncts are returned in an array as side effects.
The array is allocated by this function. It is the caller's responsibility
to free it. On successful completion, the disjuncts are already
referenced. If the function returns 0, the array for the disjuncts is
not allocated. If the function returns 1, the only factor equals the
function to be decomposed.
- See Also
Cudd_bddApproxConjDecomp
Cudd_bddIterDisjDecomp
Cudd_bddGenDisjDecomp
Cudd_bddVarDisjDecomp
- Defined in
cuddDecomp.c
int
Cudd_bddBindVar(
DdManager * dd, manager
int index variable index
)
- This function sets a flag to prevent sifting of a
variable. Returns 1 if successful; 0 otherwise (i.e., invalid
variable index).
- Side Effects Changes the "bindVar" flag in DdSubtable.
- See Also
Cudd_bddUnbindVar
- Defined in
cuddAPI.c
DdNode *
Cudd_bddBooleanDiff(
DdManager * manager,
DdNode * f,
int x
)
- Computes the boolean difference of f with respect to the
variable with index x. Returns the BDD of the boolean difference if
successful; NULL otherwise.
- Side Effects None
- Defined in
cuddBddAbs.c
DdNode **
Cudd_bddCharToVect(
DdManager * dd,
DdNode * f
)
- Computes a vector of BDDs whose image equals a non-zero
function.
The result depends on the variable order. The i-th component of the vector
depends only on the first i variables in the order. Each BDD in the vector
is not larger than the BDD of the given characteristic function. This
function is based on the description of char-to-vect in "Verification of
Sequential Machines Using Boolean Functional Vectors" by O. Coudert, C.
Berthet and J. C. Madre.
Returns a pointer to an array containing the result if successful; NULL
otherwise. The size of the array equals the number of variables in the
manager. The components of the solution have their reference counts
already incremented (unlike the results of most other functions in
the package).
- Side Effects None
- See Also
Cudd_bddConstrain
- Defined in
cuddGenCof.c
DdNode *
Cudd_bddClippingAndAbstract(
DdManager * dd, manager
DdNode * f, first conjunct
DdNode * g, second conjunct
DdNode * cube, cube of variables to be abstracted
int maxDepth, maximum recursion depth
int direction under (0) or over (1) approximation
)
- Approximates the conjunction of two BDDs f and g and
simultaneously abstracts the variables in cube. The variables are
existentially abstracted. Returns a pointer to the resulting BDD if
successful; NULL if the intermediate result blows up.
- Side Effects None
- See Also
Cudd_bddAndAbstract
Cudd_bddClippingAnd
- Defined in
cuddClip.c
DdNode *
Cudd_bddClippingAnd(
DdManager * dd, manager
DdNode * f, first conjunct
DdNode * g, second conjunct
int maxDepth, maximum recursion depth
int direction under (0) or over (1) approximation
)
- Approximates the conjunction of two BDDs f and g. Returns a
pointer to the resulting BDD if successful; NULL if the intermediate
result blows up.
- Side Effects None
- See Also
Cudd_bddAnd
- Defined in
cuddClip.c
DdNode *
Cudd_bddClosestCube(
DdManager * dd,
DdNode * f,
DdNode * g,
int * distance
)
- Finds a cube of f at minimum Hamming distance from the
minterms of g. All the minterms of the cube are at the minimum
distance. If the distance is 0, the cube belongs to the
intersection of f and g. Returns the cube if successful; NULL
otherwise.
- Side Effects The distance is returned as a side effect.
- See Also
Cudd_MinHammingDist
- Defined in
cuddPriority.c
DdNode *
Cudd_bddCompose(
DdManager * dd,
DdNode * f,
DdNode * g,
int v
)
- Substitutes g for x_v in the BDD for f. v is the index of the
variable to be substituted. Cudd_bddCompose passes the corresponding
projection function to the recursive procedure, so that the cache may
be used. Returns the composed BDD if successful; NULL otherwise.
- Side Effects None
- See Also
Cudd_addCompose
- Defined in
cuddCompose.c
DdNode *
Cudd_bddComputeCube(
DdManager * dd,
DdNode ** vars,
int * phase,
int n
)
- Computes the cube of an array of BDD variables. If
non-null, the phase argument indicates which literal of each
variable should appear in the cube. If phase[i] is nonzero, then the
positive literal is used. If phase is NULL, the cube is positive unate.
Returns a pointer to the result if successful; NULL otherwise.
- Side Effects None
- See Also
Cudd_addComputeCube
Cudd_IndicesToCube
Cudd_CubeArrayToBdd
- Defined in
cuddUtil.c
DdNode **
Cudd_bddConstrainDecomp(
DdManager * dd,
DdNode * f
)
- BDD conjunctive decomposition as in McMillan's CAV96
paper. The decomposition is canonical only for a given variable
order. If canonicity is required, variable ordering must be disabled
after the decomposition has been computed. Returns an array with one
entry for each BDD variable in the manager if successful; otherwise
NULL. The components of the solution have their reference counts
already incremented (unlike the results of most other functions in
the package.
- Side Effects None
- See Also
Cudd_bddConstrain
Cudd_bddExistAbstract
- Defined in
cuddGenCof.c
DdNode *
Cudd_bddConstrain(
DdManager * dd,
DdNode * f,
DdNode * c
)
- Computes f constrain c (f @ c).
Uses a canonical form: (f' @ c) = ( f @ c)'. (Note: this is not true
for c.) List of special cases:
- f @ 0 = 0
- f @ 1 = f
- 0 @ c = 0
- 1 @ c = 1
- f @ f = 1
- f @ f'= 0
Returns a pointer to the result if successful; NULL otherwise. Note that if
F=(f1,...,fn) and reordering takes place while computing F @ c, then the
image restriction property (Img(F,c) = Img(F @ c)) is lost.
- Side Effects None
- See Also
Cudd_bddRestrict
Cudd_addConstrain
- Defined in
cuddGenCof.c
double
Cudd_bddCorrelationWeights(
DdManager * manager,
DdNode * f,
DdNode * g,
double * prob
)
- Computes the correlation of f and g for given input
probabilities. On input, prob[i] is supposed to contain the
probability of the i-th input variable to be 1.
If f == g, their correlation is 1. If f == g', their
correlation is 0. Returns the probability that f and g have the same
value. If it runs out of memory, returns (double)CUDD_OUT_OF_MEM. The
correlation of f and the constant one gives the probability of f.
- Side Effects None
- See Also
Cudd_bddCorrelation
- Defined in
cuddBddCorr.c
double
Cudd_bddCorrelation(
DdManager * manager,
DdNode * f,
DdNode * g
)
- Computes the correlation of f and g. If f == g, their
correlation is 1. If f == g', their correlation is 0. Returns the
fraction of minterms in the ON-set of the EXNOR of f and g. If it
runs out of memory, returns (double)CUDD_OUT_OF_MEM.
- Side Effects None
- See Also
Cudd_bddCorrelationWeights
- Defined in
cuddBddCorr.c
DdNode *
Cudd_bddExistAbstract(
DdManager * manager,
DdNode * f,
DdNode * cube
)
- Existentially abstracts all the variables in cube from f.
Returns the abstracted BDD if successful; NULL otherwise.
- Side Effects None
- See Also
Cudd_bddUnivAbstract
Cudd_addExistAbstract
- Defined in
cuddBddAbs.c
int
Cudd_bddGenConjDecomp(
DdManager * dd, manager
DdNode * f, function to be decomposed
DdNode *** conjuncts address of the array of conjuncts
)
- Performs two-way conjunctive decomposition of a
BDD. This procedure owes its name to the fact tht it generalizes the
decomposition based on the cofactors with respect to one
variable. Returns the number of conjuncts produced, that is, 2 if
successful; 1 if no meaningful decomposition was found; 0
otherwise. The conjuncts produced by this procedure tend to be
balanced.
- Side Effects The two factors are returned in an array as side effects.
The array is allocated by this function. It is the caller's responsibility
to free it. On successful completion, the conjuncts are already
referenced. If the function returns 0, the array for the conjuncts is
not allocated. If the function returns 1, the only factor equals the
function to be decomposed.
- See Also
Cudd_bddGenDisjDecomp
Cudd_bddApproxConjDecomp
Cudd_bddIterConjDecomp
Cudd_bddVarConjDecomp
- Defined in
cuddDecomp.c
int
Cudd_bddGenDisjDecomp(
DdManager * dd, manager
DdNode * f, function to be decomposed
DdNode *** disjuncts address of the array of the disjuncts
)
- Performs two-way disjunctive decomposition of a BDD.
Returns the number of disjuncts produced, that is, 2 if successful;
1 if no meaningful decomposition was found; 0 otherwise. The
disjuncts produced by this procedure tend to be balanced.
- Side Effects The two disjuncts are returned in an array as side effects.
The array is allocated by this function. It is the caller's responsibility
to free it. On successful completion, the disjuncts are already
referenced. If the function returns 0, the array for the disjuncts is
not allocated. If the function returns 1, the only factor equals the
function to be decomposed.
- See Also
Cudd_bddGenConjDecomp
Cudd_bddApproxDisjDecomp
Cudd_bddIterDisjDecomp
Cudd_bddVarDisjDecomp
- Defined in
cuddDecomp.c
DdNode *
Cudd_bddIntersect(
DdManager * dd, manager
DdNode * f, first operand
DdNode * g second operand
)
- Computes a function included in the intersection of f and
g. (That is, a witness that the intersection is not empty.)
Cudd_bddIntersect tries to build as few new nodes as possible. If the
only result of interest is whether f and g intersect,
Cudd_bddLeq should be used instead.
- Side Effects None
- See Also
Cudd_bddLeq
Cudd_bddIteConstant
- Defined in
cuddBddIte.c
DdNode *
Cudd_bddInterval(
DdManager * dd, DD manager
int N, number of x variables
DdNode ** x, array of x variables
unsigned int lowerB, lower bound
unsigned int upperB upper bound
)
- This function generates a BDD for the function
lowerB ≤ x ≤ upperB, where x is an N-bit number,
x[0] x[1] ... x[N-1], with 0 the most significant bit (important!).
The number of variables N should be sufficient to represent the bounds;
otherwise, the bounds are truncated to their N least significant bits.
Two BDDs are built bottom-up for lowerB ≤ x and x ≤ upperB, and they
are finally conjoined.
- Side Effects None
- See Also
Cudd_Xgty
- Defined in
cuddPriority.c
int
Cudd_bddIsNsVar(
DdManager * dd,
int index
)
- Checks whether a variable is next state. Returns 1 if
the variable's type is present state; 0 if the variable exists but is
not a present state; -1 if the variable does not exist.
- Side Effects none
- See Also
Cudd_bddSetNsVar
Cudd_bddIsPiVar
Cudd_bddIsPsVar
- Defined in
cuddAPI.c
int
Cudd_bddIsPiVar(
DdManager * dd, manager
int index variable index
)
- Checks whether a variable is primary input. Returns 1 if
the variable's type is primary input; 0 if the variable exists but is
not a primary input; -1 if the variable does not exist.
- Side Effects none
- See Also
Cudd_bddSetPiVar
Cudd_bddIsPsVar
Cudd_bddIsNsVar
- Defined in
cuddAPI.c
int
Cudd_bddIsPsVar(
DdManager * dd,
int index
)
- Checks whether a variable is present state. Returns 1 if
the variable's type is present state; 0 if the variable exists but is
not a present state; -1 if the variable does not exist.
- Side Effects none
- See Also
Cudd_bddSetPsVar
Cudd_bddIsPiVar
Cudd_bddIsNsVar
- Defined in
cuddAPI.c
int
Cudd_bddIsVarEssential(
DdManager * manager,
DdNode * f,
int id,
int phase
)
- Determines whether a given variable is essential with a
given phase in a BDD. Uses Cudd_bddIteConstant. Returns 1 if phase == 1
and f-->x_id, or if phase == 0 and f-->x_id'.
- Side Effects None
- See Also
Cudd_FindEssential
- Defined in
cuddEssent.c
int
Cudd_bddIsVarHardGroup(
DdManager * dd,
int index
)
- Checks whether a variable is set to be in a hard group. This
function is used for lazy sifting. Returns 1 if the variable is marked
to be in a hard group; 0 if the variable exists, but it is not marked to be
in a hard group; -1 if the variable does not exist.
- Side Effects none
- See Also
Cudd_bddSetVarHardGroup
- Defined in
cuddAPI.c
int
Cudd_bddIsVarToBeGrouped(
DdManager * dd,
int index
)
- Checks whether a variable is set to be grouped. This
function is used for lazy sifting.
- Side Effects none
- Defined in
cuddAPI.c
int
Cudd_bddIsVarToBeUngrouped(
DdManager * dd,
int index
)
- Checks whether a variable is set to be ungrouped. This
function is used for lazy sifting. Returns 1 if the variable is marked
to be ungrouped; 0 if the variable exists, but it is not marked to be
ungrouped; -1 if the variable does not exist.
- Side Effects none
- See Also
Cudd_bddSetVarToBeUngrouped
- Defined in
cuddAPI.c
DdNode *
Cudd_bddIsop(
DdManager * dd,
DdNode * L,
DdNode * U
)
- Computes a BDD in the interval between L and U with a
simple sum-of-produuct cover. This procedure is similar to
Cudd_zddIsop, but it does not return the ZDD for the cover. Returns
a pointer to the BDD if successful; NULL otherwise.
- Side Effects None
- See Also
Cudd_zddIsop
- Defined in
cuddZddIsop.c
DdNode *
Cudd_bddIteConstant(
DdManager * dd,
DdNode * f,
DdNode * g,
DdNode * h
)
- Implements ITEconstant(f,g,h). Returns a pointer to the
resulting BDD (which may or may not be constant) or DD_NON_CONSTANT.
No new nodes are created.
- Side Effects None
- See Also
Cudd_bddIte
Cudd_bddIntersect
Cudd_bddLeq
Cudd_addIteConstant
- Defined in
cuddBddIte.c
int
Cudd_bddIterConjDecomp(
DdManager * dd, manager
DdNode * f, function to be decomposed
DdNode *** conjuncts address of the array of conjuncts
)
- Performs two-way conjunctive decomposition of a
BDD. This procedure owes its name to the iterated use of
supersetting to obtain a factor of the given function. Returns the
number of conjuncts produced, that is, 2 if successful; 1 if no
meaningful decomposition was found; 0 otherwise. The conjuncts
produced by this procedure tend to be imbalanced.
- Side Effects The factors are returned in an array as side effects.
The array is allocated by this function. It is the caller's responsibility
to free it. On successful completion, the conjuncts are already
referenced. If the function returns 0, the array for the conjuncts is
not allocated. If the function returns 1, the only factor equals the
function to be decomposed.
- See Also
Cudd_bddIterDisjDecomp
Cudd_bddApproxConjDecomp
Cudd_bddGenConjDecomp
Cudd_bddVarConjDecomp
Cudd_RemapOverApprox
Cudd_bddSqueeze
Cudd_bddLICompaction
- Defined in
cuddDecomp.c
int
Cudd_bddIterDisjDecomp(
DdManager * dd, manager
DdNode * f, function to be decomposed
DdNode *** disjuncts address of the array of the disjuncts
)
- Performs two-way disjunctive decomposition of a BDD.
Returns the number of disjuncts produced, that is, 2 if successful;
1 if no meaningful decomposition was found; 0 otherwise. The
disjuncts produced by this procedure tend to be imbalanced.
- Side Effects The two disjuncts are returned in an array as side effects.
The array is allocated by this function. It is the caller's responsibility
to free it. On successful completion, the disjuncts are already
referenced. If the function returns 0, the array for the disjuncts is
not allocated. If the function returns 1, the only factor equals the
function to be decomposed.
- See Also
Cudd_bddIterConjDecomp
Cudd_bddApproxDisjDecomp
Cudd_bddGenDisjDecomp
Cudd_bddVarDisjDecomp
- Defined in
cuddDecomp.c
DdNode *
Cudd_bddIte(
DdManager * dd,
DdNode * f,
DdNode * g,
DdNode * h
)
- Implements ITE(f,g,h). Returns a pointer to the
resulting BDD if successful; NULL if the intermediate result blows
up.
- Side Effects None
- See Also
Cudd_addIte
Cudd_bddIteConstant
Cudd_bddIntersect
- Defined in
cuddBddIte.c
DdNode *
Cudd_bddIthVar(
DdManager * dd,
int i
)
- Retrieves the BDD variable with index i if it already
exists, or creates a new BDD variable. Returns a pointer to the
variable if successful; NULL otherwise.
- Side Effects None
- See Also
Cudd_bddNewVar
Cudd_addIthVar
Cudd_bddNewVarAtLevel
Cudd_ReadVars
- Defined in
cuddAPI.c
DdNode *
Cudd_bddLICompaction(
DdManager * dd, manager
DdNode * f, function to be minimized
DdNode * c constraint (care set)
)
- Performs safe minimization of a BDD. Given the BDD
f
of a function to be minimized and a BDD
c
representing the care set, Cudd_bddLICompaction
produces the BDD of a function that agrees with f
wherever c
is 1. Safe minimization means that the size
of the result is guaranteed not to exceed the size of
f
. This function is based on the DAC97 paper by Hong et
al.. Returns a pointer to the result if successful; NULL
otherwise.
- Side Effects None
- See Also
Cudd_bddRestrict
- Defined in
cuddGenCof.c
int
Cudd_bddLeqUnless(
DdManager * dd,
DdNode * f,
DdNode * g,
DdNode * D
)
- Tells whether f is less than of equal to G unless D is
1. f, g, and D are BDDs. The function returns 1 if f is less than
of equal to G, and 0 otherwise. No new nodes are created.
- Side Effects None
- See Also
Cudd_EquivDC
Cudd_bddLeq
Cudd_bddIteConstant
- Defined in
cuddSat.c
int
Cudd_bddLeq(
DdManager * dd,
DdNode * f,
DdNode * g
)
- Returns 1 if f is less than or equal to g; 0 otherwise.
No new nodes are created.
- Side Effects None
- See Also
Cudd_bddIteConstant
Cudd_addEvalConst
- Defined in
cuddBddIte.c
DdNode *
Cudd_bddLiteralSetIntersection(
DdManager * dd,
DdNode * f,
DdNode * g
)
- Computes the intesection of two sets of literals
represented as BDDs. Each set is represented as a cube of the
literals in the set. The empty set is represented by the constant 1.
No variable can be simultaneously present in both phases in a set.
Returns a pointer to the BDD representing the intersected sets, if
successful; NULL otherwise.
- Side Effects None
- Defined in
cuddLiteral.c
DdNode *
Cudd_bddMakePrime(
DdManager * dd, manager
DdNode * cube, cube to be expanded
DdNode * f function of which the cube is to be made a prime
)
- Expands cube to a prime implicant of f. Returns the prime
if successful; NULL otherwise. In particular, NULL is returned if cube
is not a real cube or is not an implicant of f.
- Side Effects None
- Defined in
cuddSat.c
DdNode *
Cudd_bddMinimize(
DdManager * dd,
DdNode * f,
DdNode * c
)
- Finds a small BDD that agrees with
f
over
c
. Returns a pointer to the result if successful; NULL
otherwise.
- Side Effects None
- See Also
Cudd_bddRestrict
Cudd_bddLICompaction
Cudd_bddSqueeze
- Defined in
cuddGenCof.c
DdNode *
Cudd_bddNPAnd(
DdManager * dd,
DdNode * f,
DdNode * g
)
- Computes f non-polluting-and g. The non-polluting AND
of f and g is a hybrid of AND and Restrict. From Restrict, this
operation takes the idea of existentially quantifying the top
variable of the second operand if it does not appear in the first.
Therefore, the variables that appear in the result also appear in f.
For the rest, the function behaves like AND. Since the two operands
play different roles, non-polluting AND is not commutative.
Returns a pointer to the result if successful; NULL otherwise.
- Side Effects None
- See Also
Cudd_bddConstrain
Cudd_bddRestrict
- Defined in
cuddGenCof.c
DdNode *
Cudd_bddNand(
DdManager * dd,
DdNode * f,
DdNode * g
)
- Computes the NAND of two BDDs f and g. Returns a
pointer to the resulting BDD if successful; NULL if the intermediate
result blows up.
- Side Effects None
- See Also
Cudd_bddIte
Cudd_addApply
Cudd_bddAnd
Cudd_bddOr
Cudd_bddNor
Cudd_bddXor
Cudd_bddXnor
- Defined in
cuddBddIte.c
DdNode *
Cudd_bddNewVarAtLevel(
DdManager * dd,
int level
)
- Creates a new BDD variable. The new variable has an
index equal to the largest previous index plus 1 and is positioned at
the specified level in the order. Returns a pointer to the new
variable if successful; NULL otherwise.
- Side Effects None
- See Also
Cudd_bddNewVar
Cudd_bddIthVar
Cudd_addNewVarAtLevel
- Defined in
cuddAPI.c
DdNode *
Cudd_bddNewVar(
DdManager * dd
)
- Creates a new BDD variable. The new variable has an
index equal to the largest previous index plus 1. Returns a
pointer to the new variable if successful; NULL otherwise.
- Side Effects None
- See Also
Cudd_addNewVar
Cudd_bddIthVar
Cudd_bddNewVarAtLevel
- Defined in
cuddAPI.c
DdNode *
Cudd_bddNor(
DdManager * dd,
DdNode * f,
DdNode * g
)
- Computes the NOR of two BDDs f and g. Returns a
pointer to the resulting BDD if successful; NULL if the intermediate
result blows up.
- Side Effects None
- See Also
Cudd_bddIte
Cudd_addApply
Cudd_bddAnd
Cudd_bddOr
Cudd_bddNand
Cudd_bddXor
Cudd_bddXnor
- Defined in
cuddBddIte.c
DdNode *
Cudd_bddOr(
DdManager * dd,
DdNode * f,
DdNode * g
)
- Computes the disjunction of two BDDs f and g. Returns a
pointer to the resulting BDD if successful; NULL if the intermediate
result blows up.
- Side Effects None
- See Also
Cudd_bddIte
Cudd_addApply
Cudd_bddAnd
Cudd_bddNand
Cudd_bddNor
Cudd_bddXor
Cudd_bddXnor
- Defined in
cuddBddIte.c
DdNode *
Cudd_bddPermute(
DdManager * manager,
DdNode * node,
int * permut
)
- Given a permutation in array permut, creates a new BDD
with permuted variables. There should be an entry in array permut
for each variable in the manager. The i-th entry of permut holds the
index of the variable that is to substitute the i-th variable.
Returns a pointer to the resulting BDD if successful; NULL
otherwise.
- Side Effects None
- See Also
Cudd_addPermute
Cudd_bddSwapVariables
- Defined in
cuddCompose.c
DdNode **
Cudd_bddPickArbitraryMinterms(
DdManager * dd, manager
DdNode * f, function from which to pick k minterms
DdNode ** vars, array of variables
int n, size of vars
int k number of minterms to find
)
- Picks k on-set minterms evenly distributed from given DD.
The minterms are in terms of
vars
. The array
vars
should contain at least all variables in the
support of f
; if this condition is not met the minterms
built by this procedure may not be contained in
f
. Builds an array of BDDs for the minterms and returns a
pointer to it if successful; NULL otherwise. There are three reasons
why the procedure may fail:
- It may run out of memory;
- the function
f
may be the constant 0;
- the minterms may not be contained in
f
.
- Side Effects None
- See Also
Cudd_bddPickOneMinterm
Cudd_bddPickOneCube
- Defined in
cuddUtil.c
int
Cudd_bddPickOneCube(
DdManager * ddm,
DdNode * node,
char * string
)
- Picks one on-set cube randomly from the given DD. The
cube is written into an array of characters. The array must have at
least as many entries as there are variables. Returns 1 if
successful; 0 otherwise.
- Side Effects None
- See Also
Cudd_bddPickOneMinterm
- Defined in
cuddUtil.c
DdNode *
Cudd_bddPickOneMinterm(
DdManager * dd, manager
DdNode * f, function from which to pick one minterm
DdNode ** vars, array of variables
int n size of vars
)
- Picks one on-set minterm randomly from the given
DD. The minterm is in terms of
vars
. The array
vars
should contain at least all variables in the
support of f
; if this condition is not met the minterm
built by this procedure may not be contained in
f
. Builds a BDD for the minterm and returns a pointer
to it if successful; NULL otherwise. There are three reasons why the
procedure may fail:
- It may run out of memory;
- the function
f
may be the constant 0;
- the minterm may not be contained in
f
.
- Side Effects None
- See Also
Cudd_bddPickOneCube
- Defined in
cuddUtil.c
int
Cudd_bddPrintCover(
DdManager * dd,
DdNode * l,
DdNode * u
)
- Prints a sum of product cover for an incompletely
specified function given by a lower bound and an upper bound. Each
product is a prime implicant obtained by expanding the product
corresponding to a path from node to the constant one. Uses the
package default output file. Returns 1 if successful; 0 otherwise.
- Side Effects None
- See Also
Cudd_PrintMinterm
- Defined in
cuddUtil.c
int
Cudd_bddReadPairIndex(
DdManager * dd,
int index
)
- Reads a corresponding pair index for a given index.
These pair indices are present and next state variable. Returns the
corresponding variable index if the variable exists; -1 otherwise.
- Side Effects modifies the manager
- See Also
Cudd_bddSetPairIndex
- Defined in
cuddAPI.c
int
Cudd_bddRead(
FILE * fp, input file pointer
DdManager * dd, DD manager
DdNode ** E, characteristic function of the graph
DdNode *** x, array of row variables
DdNode *** y, array of column variables
int * nx, number or row variables
int * ny, number or column variables
int * m, number of rows
int * n, number of columns
int bx, first index of row variables
int sx, step of row variables
int by, first index of column variables
int sy step of column variables
)
- Reads in a graph (without labels) given as an adjacency
matrix. The first line of the input contains the numbers of rows and
columns of the adjacency matrix. The remaining lines contain the arcs
of the graph, one per line. Each arc is described by two integers,
i.e., the row and column number, or the indices of the two endpoints.
Cudd_bddRead produces a BDD that depends on two sets of variables: x
and y. The x variables (x[0] ... x[nx-1]) encode
the row index and the y variables (y[0] ... y[ny-1]) encode the
column index. x[0] and y[0] are the most significant bits in the
indices.
The variables may already exist or may be created by the function.
The index of x[i] is bx+i*sx, and the index of y[i] is by+i*sy.
On input, nx and ny hold the numbers of row and column variables already
in existence. On output, they hold the numbers of row and column
variables actually used by the matrix. When Cudd_bddRead creates the
variable arrays, the index of x[i] is bx+i*sx, and the index of
y[i] is by+i*sy. When some variables already exist, Cudd_bddRead
expects the indices of the existing x variables to be bx+i*sx, and the
indices of the existing y variables to be by+i*sy.
m and n are set to the numbers of rows and columns of the
matrix. Their values on input are immaterial. The BDD for the graph
is returned in E, and its reference count is > 0. Cudd_bddRead returns
1 in case of success; 0 otherwise.
- Side Effects nx and ny are set to the numbers of row and column
variables. m and n are set to the numbers of rows and columns. x and y
are possibly extended to represent the array of row and column
variables.
- See Also
Cudd_addHarwell
Cudd_addRead
- Defined in
cuddRead.c
void
Cudd_bddRealignDisable(
DdManager * unique
)
- Disables realignment of ZDD order to BDD order.
- Side Effects None
- See Also
Cudd_bddRealignEnable
Cudd_bddRealignmentEnabled
Cudd_zddRealignEnable
Cudd_zddRealignmentEnabled
- Defined in
cuddAPI.c
void
Cudd_bddRealignEnable(
DdManager * unique
)
- Enables realignment of the BDD variable order to the
ZDD variable order after the ZDDs have been reordered. The
number of ZDD variables must be a multiple of the number of BDD
variables for realignment to make sense. If this condition is not met,
Cudd_zddReduceHeap will return 0. Let
M
be the
ratio of the two numbers. For the purpose of realignment, the ZDD
variables from M*i
to (M+1)*i-1
are
reagarded as corresponding to BDD variable i
. Realignment
is initially disabled.
- Side Effects None
- See Also
Cudd_zddReduceHeap
Cudd_bddRealignDisable
Cudd_bddRealignmentEnabled
Cudd_zddRealignDisable
Cudd_zddRealignmentEnabled
- Defined in
cuddAPI.c
int
Cudd_bddRealignmentEnabled(
DdManager * unique
)
- Returns 1 if the realignment of BDD order to ZDD order is
enabled; 0 otherwise.
- Side Effects None
- See Also
Cudd_bddRealignEnable
Cudd_bddRealignDisable
Cudd_zddRealignEnable
Cudd_zddRealignDisable
- Defined in
cuddAPI.c
int
Cudd_bddResetVarToBeGrouped(
DdManager * dd,
int index
)
- Resets a variable not to be grouped. This function is
used for lazy sifting. Returns 1 if successful; 0 otherwise.
- Side Effects modifies the manager
- See Also
Cudd_bddSetVarToBeGrouped
Cudd_bddSetVarHardGroup
- Defined in
cuddAPI.c
DdNode *
Cudd_bddRestrict(
DdManager * dd,
DdNode * f,
DdNode * c
)
- BDD restrict according to Coudert and Madre's algorithm
(ICCAD90). Returns the restricted BDD if successful; otherwise NULL.
If application of restrict results in a BDD larger than the input
BDD, the input BDD is returned.
- Side Effects None
- See Also
Cudd_bddConstrain
Cudd_addRestrict
- Defined in
cuddGenCof.c
int
Cudd_bddSetNsVar(
DdManager * dd, manager
int index variable index
)
- Sets a variable type to next state. The variable type is
used by lazy sifting. Returns 1 if successful; 0 otherwise.
- Side Effects modifies the manager
- See Also
Cudd_bddSetPiVar
Cudd_bddSetPsVar
Cudd_bddIsNsVar
- Defined in
cuddAPI.c
int
Cudd_bddSetPairIndex(
DdManager * dd, manager
int index, variable index
int pairIndex corresponding variable index
)
- Sets a corresponding pair index for a given index.
These pair indices are present and next state variable. Returns 1 if
successful; 0 otherwise.
- Side Effects modifies the manager
- See Also
Cudd_bddReadPairIndex
- Defined in
cuddAPI.c
int
Cudd_bddSetPiVar(
DdManager * dd, manager
int index variable index
)
- Sets a variable type to primary input. The variable type is
used by lazy sifting. Returns 1 if successful; 0 otherwise.
- Side Effects modifies the manager
- See Also
Cudd_bddSetPsVar
Cudd_bddSetNsVar
Cudd_bddIsPiVar
- Defined in
cuddAPI.c
int
Cudd_bddSetPsVar(
DdManager * dd, manager
int index variable index
)
- Sets a variable type to present state. The variable type is
used by lazy sifting. Returns 1 if successful; 0 otherwise.
- Side Effects modifies the manager
- See Also
Cudd_bddSetPiVar
Cudd_bddSetNsVar
Cudd_bddIsPsVar
- Defined in
cuddAPI.c
int
Cudd_bddSetVarHardGroup(
DdManager * dd,
int index
)
- Sets a variable to be a hard group. This function is used
for lazy sifting. Returns 1 if successful; 0 otherwise.
- Side Effects modifies the manager
- See Also
Cudd_bddSetVarToBeGrouped
Cudd_bddResetVarToBeGrouped
Cudd_bddIsVarHardGroup
- Defined in
cuddAPI.c
int
Cudd_bddSetVarToBeGrouped(
DdManager * dd,
int index
)
- Sets a variable to be grouped. This function is used for
lazy sifting. Returns 1 if successful; 0 otherwise.
- Side Effects modifies the manager
- See Also
Cudd_bddSetVarHardGroup
Cudd_bddResetVarToBeGrouped
- Defined in
cuddAPI.c
int
Cudd_bddSetVarToBeUngrouped(
DdManager * dd,
int index
)
- Sets a variable to be ungrouped. This function is used
for lazy sifting. Returns 1 if successful; 0 otherwise.
- Side Effects modifies the manager
- See Also
Cudd_bddIsVarToBeUngrouped
- Defined in
cuddAPI.c
DdNode *
Cudd_bddSqueeze(
DdManager * dd, manager
DdNode * l, lower bound
DdNode * u upper bound
)
- Finds a small BDD in a function interval. Given BDDs
l
and u
, representing the lower bound and
upper bound of a function interval, Cudd_bddSqueeze produces the BDD
of a function within the interval with a small BDD. Returns a
pointer to the result if successful; NULL otherwise.
- Side Effects None
- See Also
Cudd_bddRestrict
Cudd_bddLICompaction
- Defined in
cuddGenCof.c
DdNode *
Cudd_bddSwapVariables(
DdManager * dd,
DdNode * f,
DdNode ** x,
DdNode ** y,
int n
)
- Swaps two sets of variables of the same size (x and y)
in the BDD f. The size is given by n. The two sets of variables are
assumed to be disjoint. Returns a pointer to the resulting BDD if
successful; NULL otherwise.
- Side Effects None
- See Also
Cudd_bddPermute
Cudd_addSwapVariables
- Defined in
cuddCompose.c
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
- Defined in
cuddBridge.c
int
Cudd_bddUnbindVar(
DdManager * dd, manager
int index variable index
)
- This function resets the flag that prevents the sifting
of a variable. In successive variable reorderings, the variable will
NOT be skipped, that is, sifted. Initially all variables can be
sifted. It is necessary to call this function only to re-enable
sifting after a call to Cudd_bddBindVar. Returns 1 if successful; 0
otherwise (i.e., invalid variable index).
- Side Effects Changes the "bindVar" flag in DdSubtable.
- See Also
Cudd_bddBindVar
- Defined in
cuddAPI.c
DdNode *
Cudd_bddUnivAbstract(
DdManager * manager,
DdNode * f,
DdNode * cube
)
- Universally abstracts all the variables in cube from f.
Returns the abstracted BDD if successful; NULL otherwise.
- Side Effects None
- See Also
Cudd_bddExistAbstract
Cudd_addUnivAbstract
- Defined in
cuddBddAbs.c
int
Cudd_bddVarConjDecomp(
DdManager * dd, manager
DdNode * f, function to be decomposed
DdNode *** conjuncts address of the array of conjuncts
)
- Conjunctively decomposes one BDD according to a
variable. If
f
is the function of the BDD and
x
is the variable, the decomposition is
(f+x)(f+x')
. The variable is chosen so as to balance
the sizes of the two conjuncts and to keep them small. Returns the
number of conjuncts produced, that is, 2 if successful; 1 if no
meaningful decomposition was found; 0 otherwise.
- Side Effects The two factors are returned in an array as side effects.
The array is allocated by this function. It is the caller's responsibility
to free it. On successful completion, the conjuncts are already
referenced. If the function returns 0, the array for the conjuncts is
not allocated. If the function returns 1, the only factor equals the
function to be decomposed.
- See Also
Cudd_bddVarDisjDecomp
Cudd_bddGenConjDecomp
Cudd_bddApproxConjDecomp
Cudd_bddIterConjDecomp
- Defined in
cuddDecomp.c
int
Cudd_bddVarDisjDecomp(
DdManager * dd, manager
DdNode * f, function to be decomposed
DdNode *** disjuncts address of the array of the disjuncts
)
- Performs two-way disjunctive decomposition of a BDD
according to a variable. If
f
is the function of the
BDD and x
is the variable, the decomposition is
f*x + f*x'
. The variable is chosen so as to balance
the sizes of the two disjuncts and to keep them small. Returns the
number of disjuncts produced, that is, 2 if successful; 1 if no
meaningful decomposition was found; 0 otherwise.
- Side Effects The two disjuncts are returned in an array as side effects.
The array is allocated by this function. It is the caller's responsibility
to free it. On successful completion, the disjuncts are already
referenced. If the function returns 0, the array for the disjuncts is
not allocated. If the function returns 1, the only factor equals the
function to be decomposed.
- See Also
Cudd_bddVarConjDecomp
Cudd_bddApproxDisjDecomp
Cudd_bddIterDisjDecomp
Cudd_bddGenDisjDecomp
- Defined in
cuddDecomp.c
int
Cudd_bddVarIsBound(
DdManager * dd, manager
int index variable index
)
- This function returns 1 if a variable is enabled for
sifting. Initially all variables can be sifted. This function returns
0 only if there has been a previous call to Cudd_bddBindVar for that
variable not followed by a call to Cudd_bddUnbindVar. The function returns
0 also in the case in which the index of the variable is out of bounds.
- Side Effects none
- See Also
Cudd_bddBindVar
Cudd_bddUnbindVar
- Defined in
cuddAPI.c
int
Cudd_bddVarIsDependent(
DdManager * dd,
DdNode * f,
DdNode * var variable
)
- Checks whether a variable is dependent on others in a
function. Returns 1 if the variable is dependent; 0 otherwise. No
new nodes are created.
- Side Effects None
- Defined in
cuddBddAbs.c
DdNode *
Cudd_bddVarMap(
DdManager * manager, DD manager
DdNode * f function in which to remap variables
)
- Remaps the variables of a BDD using the default
variable map. A typical use of this function is to swap two sets of
variables. The variable map must be registered with Cudd_SetVarMap.
Returns a pointer to the resulting BDD if successful; NULL
otherwise.
- Side Effects None
- See Also
Cudd_bddPermute
Cudd_bddSwapVariables
Cudd_SetVarMap
- Defined in
cuddCompose.c
DdNode *
Cudd_bddVectorCompose(
DdManager * dd,
DdNode * f,
DdNode ** vector
)
- Given a vector of BDDs, creates a new BDD by
substituting the BDDs for the variables of the BDD f. There
should be an entry in vector for each variable in the manager.
If no substitution is sought for a given variable, the corresponding
projection function should be specified in the vector.
This function implements simultaneous composition.
Returns a pointer to the resulting BDD if successful; NULL
otherwise.
- Side Effects None
- See Also
Cudd_bddPermute
Cudd_bddCompose
Cudd_addVectorCompose
- Defined in
cuddCompose.c
DdNode *
Cudd_bddXnor(
DdManager * dd,
DdNode * f,
DdNode * g
)
- Computes the exclusive NOR of two BDDs f and g. Returns a
pointer to the resulting BDD if successful; NULL if the intermediate
result blows up.
- Side Effects None
- See Also
Cudd_bddIte
Cudd_addApply
Cudd_bddAnd
Cudd_bddOr
Cudd_bddNand
Cudd_bddNor
Cudd_bddXor
- Defined in
cuddBddIte.c
DdNode *
Cudd_bddXorExistAbstract(
DdManager * manager,
DdNode * f,
DdNode * g,
DdNode * cube
)
- Takes the exclusive OR of two BDDs and simultaneously abstracts
the variables in cube. The variables are existentially abstracted. Returns a
pointer to the result is successful; NULL otherwise.
- Side Effects None
- See Also
Cudd_bddUnivAbstract
Cudd_bddExistAbstract
Cudd_bddAndAbstract
- Defined in
cuddBddAbs.c
DdNode *
Cudd_bddXor(
DdManager * dd,
DdNode * f,
DdNode * g
)
- Computes the exclusive OR of two BDDs f and g. Returns a
pointer to the resulting BDD if successful; NULL if the intermediate
result blows up.
- Side Effects None
- See Also
Cudd_bddIte
Cudd_addApply
Cudd_bddAnd
Cudd_bddOr
Cudd_bddNand
Cudd_bddNor
Cudd_bddXnor
- Defined in
cuddBddIte.c
void
Cudd_tlcInfoFree(
DdTlcInfo * t
)
- Frees a DdTlcInfo Structure as well as the memory pointed
by it.
- Side Effects None
- Defined in
cuddEssent.c
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
- Defined in
cuddZddSetop.c
DdNode *
Cudd_zddComplement(
DdManager * dd,
DdNode * node
)
- Computes a complement cover for a ZDD node. For lack of a
better method, we first extract the function BDD from the ZDD cover,
then make the complement of the ZDD cover from the complement of the
BDD node by using ISOP. Returns a pointer to the resulting cover if
successful; NULL otherwise. The result depends on current variable
order.
- Side Effects The result depends on current variable order.
- Defined in
cuddZddFuncs.c
double
Cudd_zddCountDouble(
DdManager * zdd,
DdNode * P
)
- Counts the number of minterms of a ZDD. The result is
returned as a double. If the procedure runs out of memory, it
returns (double) CUDD_OUT_OF_MEM. This procedure is used in
Cudd_zddCountMinterm.
- Side Effects None
- See Also
Cudd_zddCountMinterm
Cudd_zddCount
- Defined in
cuddZddCount.c
double
Cudd_zddCountMinterm(
DdManager * zdd,
DdNode * node,
int path
)
- Counts the number of minterms of the ZDD rooted at
node
. This procedure takes a parameter
path
that specifies how many variables are in the
support of the function. If the procedure runs out of memory, it
returns (double) CUDD_OUT_OF_MEM.
- Side Effects None
- See Also
Cudd_zddCountDouble
- Defined in
cuddZddMisc.c
int
Cudd_zddCount(
DdManager * zdd,
DdNode * P
)
- Returns an integer representing the number of minterms
in a ZDD.
- Side Effects None
- See Also
Cudd_zddCountDouble
- Defined in
cuddZddCount.c
char *
Cudd_zddCoverPathToString(
DdManager * zdd, DD manager
int * path, path of ZDD representing a cover
char * str pointer to string to use if != NULL
)
- Converts a path of a ZDD representing a cover to a
string. The string represents an implicant of the cover. The path
is typically produced by Cudd_zddForeachPath. Returns a pointer to
the string if successful; NULL otherwise. If the str input is NULL,
it allocates a new string. The string passed to this function must
have enough room for all variables and for the terminator.
- Side Effects None
- See Also
Cudd_zddForeachPath
- Defined in
cuddZddUtil.c
int
Cudd_zddDagSize(
DdNode * p_node
)
- Counts the number of nodes in a ZDD. This function
duplicates Cudd_DagSize and is only retained for compatibility.
- Side Effects None
- See Also
Cudd_DagSize
- Defined in
cuddZddMisc.c
DdNode *
Cudd_zddDiffConst(
DdManager * zdd,
DdNode * P,
DdNode * Q
)
- 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
- Defined in
cuddZddSetop.c
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
- See Also
Cudd_zddDiffConst
- Defined in
cuddZddSetop.c
DdNode *
Cudd_zddDivideF(
DdManager * dd,
DdNode * f,
DdNode * g
)
- Modified version of Cudd_zddDivide. This function may
disappear in future releases.
- Side Effects None
- Defined in
cuddZddFuncs.c
DdNode *
Cudd_zddDivide(
DdManager * dd,
DdNode * f,
DdNode * g
)
- Computes the quotient of two unate covers represented
by ZDDs. Unate covers use one ZDD variable for each BDD
variable. Returns a pointer to the resulting ZDD if successful; NULL
otherwise.
- Side Effects None
- See Also
Cudd_zddWeakDiv
- Defined in
cuddZddFuncs.c
int
Cudd_zddDumpDot(
DdManager * dd, manager
int n, number of output nodes to be dumped
DdNode ** f, array of output nodes to be dumped
char ** inames, array of input names (or NULL)
char ** onames, array of output names (or NULL)
FILE * fp pointer to the dump file
)
- Writes a file representing the argument ZDDs in a format
suitable for the graph drawing program dot.
It returns 1 in case of success; 0 otherwise (e.g., out-of-memory,
file system full).
Cudd_zddDumpDot does not close the file: This is the caller
responsibility. Cudd_zddDumpDot uses a minimal unique subset of the
hexadecimal address of a node as name for it.
If the argument inames is non-null, it is assumed to hold the pointers
to the names of the inputs. Similarly for onames.
Cudd_zddDumpDot uses the following convention to draw arcs:
- solid line: THEN arcs;
- dashed line: ELSE arcs.
The dot options are chosen so that the drawing fits on a letter-size
sheet.
- Side Effects None
- See Also
Cudd_DumpDot
Cudd_zddPrintDebug
- Defined in
cuddZddUtil.c
DdGen *
Cudd_zddFirstPath(
DdManager * zdd,
DdNode * f,
int ** path
)
- Defines an iterator on the paths of a ZDD
and finds its first path. Returns a generator that contains the
information necessary to continue the enumeration if successful; NULL
otherwise.
A path is represented as an array of literals, which are integers in
{0, 1, 2}; 0 represents an else arc out of a node, 1 represents a then arc
out of a node, and 2 stands for the absence of a node.
The size of the array equals the number of variables in the manager at
the time Cudd_zddFirstCube is called.
The paths that end in the empty terminal are not enumerated.
- Side Effects The first path is returned as a side effect.
- See Also
Cudd_zddForeachPath
Cudd_zddNextPath
Cudd_GenFree
Cudd_IsGenEmpty
- Defined in
cuddZddUtil.c
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
- Defined in
cuddZddSetop.c
DdNode *
Cudd_zddIsop(
DdManager * dd,
DdNode * L,
DdNode * U,
DdNode ** zdd_I
)
- Computes an irredundant sum of products (ISOP) in ZDD
form from BDDs. The two BDDs L and U represent the lower bound and
the upper bound, respectively, of the function. The ISOP uses two
ZDD variables for each BDD variable: One for the positive literal,
and one for the negative literal. These two variables should be
adjacent in the ZDD order. The two ZDD variables corresponding to
BDD variable
i
should have indices 2i
and
2i+1
. The result of this procedure depends on the
variable order. If successful, Cudd_zddIsop returns the BDD for
the function chosen from the interval. The ZDD representing the
irredundant cover is returned as a side effect in zdd_I. In case of
failure, NULL is returned.
- Side Effects zdd_I holds the pointer to the ZDD for the ISOP on
successful return.
- See Also
Cudd_bddIsop
Cudd_zddVarsFromBddVars
- Defined in
cuddZddIsop.c
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
- Defined in
cuddZddSetop.c
DdNode *
Cudd_zddIthVar(
DdManager * dd,
int i
)
- Retrieves the ZDD variable with index i if it already
exists, or creates a new ZDD variable. Returns a pointer to the
variable if successful; NULL otherwise.
- Side Effects None
- See Also
Cudd_bddIthVar
Cudd_addIthVar
- Defined in
cuddAPI.c
int
Cudd_zddNextPath(
DdGen * gen,
int ** path
)
- Generates the next path of a ZDD onset,
using generator gen. Returns 0 if the enumeration is completed; 1
otherwise.
- Side Effects The path is returned as a side effect. The
generator is modified.
- See Also
Cudd_zddForeachPath
Cudd_zddFirstPath
Cudd_GenFree
Cudd_IsGenEmpty
- Defined in
cuddZddUtil.c
DdNode *
Cudd_zddPortFromBdd(
DdManager * dd,
DdNode * B
)
- Converts a BDD into a ZDD. This function assumes that
there is a one-to-one correspondence between the BDD variables and the
ZDD variables, and that the variable order is the same for both types
of variables. These conditions are established if the ZDD variables
are created by one call to Cudd_zddVarsFromBddVars with multiplicity =
1. Returns a pointer to the resulting ZDD if successful; NULL otherwise.
- Side Effects None
- See Also
Cudd_zddVarsFromBddVars
- Defined in
cuddZddPort.c
DdNode *
Cudd_zddPortToBdd(
DdManager * dd,
DdNode * f
)
- Converts a ZDD into a BDD. Returns a pointer to the resulting
ZDD if successful; NULL otherwise.
- Side Effects None
- See Also
Cudd_zddPortFromBdd
- Defined in
cuddZddPort.c
int
Cudd_zddPrintCover(
DdManager * zdd,
DdNode * node
)
- Prints a sum of products from a ZDD representing a cover.
Returns 1 if successful; 0 otherwise.
- Side Effects None
- See Also
Cudd_zddPrintMinterm
- Defined in
cuddZddUtil.c
int
Cudd_zddPrintDebug(
DdManager * zdd,
DdNode * f,
int n,
int pr
)
- Prints to the standard output a DD and its statistics.
The statistics include the number of nodes and the number of minterms.
(The number of minterms is also the number of combinations in the set.)
The statistics are printed if pr > 0. Specifically:
- pr = 0 : prints nothing
- pr = 1 : prints counts of nodes and minterms
- pr = 2 : prints counts + disjoint sum of products
- pr = 3 : prints counts + list of nodes
- pr > 3 : prints counts + disjoint sum of products + list of nodes
Returns 1 if successful; 0 otherwise.
- Side Effects None
- Defined in
cuddZddUtil.c
int
Cudd_zddPrintMinterm(
DdManager * zdd,
DdNode * node
)
- Prints a disjoint sum of product form for a ZDD. Returns 1
if successful; 0 otherwise.
- Side Effects None
- See Also
Cudd_zddPrintDebug
Cudd_zddPrintCover
- Defined in
cuddZddUtil.c
void
Cudd_zddPrintSubtable(
DdManager * table
)
- Prints the ZDD table for debugging purposes.
- Side Effects None
- Defined in
cuddZddMisc.c
DdNode *
Cudd_zddProduct(
DdManager * dd,
DdNode * f,
DdNode * g
)
- Computes the product of two covers represented by
ZDDs. The result is also a ZDD. Returns a pointer to the result if
successful; NULL otherwise. The covers on which Cudd_zddProduct
operates use two ZDD variables for each function variable (one ZDD
variable for each literal of the variable). Those two ZDD variables
should be adjacent in the order.
- Side Effects None
- See Also
Cudd_zddUnateProduct
- Defined in
cuddZddFuncs.c
long
Cudd_zddReadNodeCount(
DdManager * dd
)
- Reports the number of nodes in ZDDs. This
number always includes the two constants 1 and 0.
- Side Effects None
- See Also
Cudd_ReadPeakNodeCount
Cudd_ReadNodeCount
- Defined in
cuddAPI.c
void
Cudd_zddRealignDisable(
DdManager * unique
)
- Disables realignment of ZDD order to BDD order.
- Side Effects None
- See Also
Cudd_zddRealignEnable
Cudd_zddRealignmentEnabled
Cudd_bddRealignEnable
Cudd_bddRealignmentEnabled
- Defined in
cuddAPI.c
void
Cudd_zddRealignEnable(
DdManager * unique
)
- Enables realignment of the ZDD variable order to the
BDD variable order after the BDDs and ADDs have been reordered. The
number of ZDD variables must be a multiple of the number of BDD
variables for realignment to make sense. If this condition is not met,
Cudd_ReduceHeap will return 0. Let
M
be the
ratio of the two numbers. For the purpose of realignment, the ZDD
variables from M*i
to (M+1)*i-1
are
reagarded as corresponding to BDD variable i
. Realignment
is initially disabled.
- Side Effects None
- See Also
Cudd_ReduceHeap
Cudd_zddRealignDisable
Cudd_zddRealignmentEnabled
Cudd_bddRealignDisable
Cudd_bddRealignmentEnabled
- Defined in
cuddAPI.c
int
Cudd_zddRealignmentEnabled(
DdManager * unique
)
- Returns 1 if the realignment of ZDD order to BDD order is
enabled; 0 otherwise.
- Side Effects None
- See Also
Cudd_zddRealignEnable
Cudd_zddRealignDisable
Cudd_bddRealignEnable
Cudd_bddRealignDisable
- Defined in
cuddAPI.c
int
Cudd_zddReduceHeap(
DdManager * table, DD manager
Cudd_ReorderingType heuristic, method used for reordering
int minsize bound below which no reordering occurs
)
- Main dynamic reordering routine for ZDDs.
Calls one of the possible reordering procedures:
- Swapping
- Sifting
- Symmetric Sifting
For sifting and symmetric sifting it is possible to request reordering
to convergence.
The core of all methods is the reordering procedure
cuddZddSwapInPlace() which swaps two adjacent variables.
Returns 1 in case of success; 0 otherwise. In the case of symmetric
sifting (with and without convergence) returns 1 plus the number of
symmetric variables, in case of success.
- Side Effects Changes the variable order for all ZDDs and clears
the cache.
- Defined in
cuddZddReord.c
int
Cudd_zddShuffleHeap(
DdManager * table, DD manager
int * permutation required variable permutation
)
- Reorders ZDD variables according to given permutation.
The i-th entry of the permutation array contains the index of the variable
that should be brought to the i-th level. The size of the array should be
equal or greater to the number of variables currently in use.
Returns 1 in case of success; 0 otherwise.
- Side Effects Changes the ZDD variable order for all diagrams and clears
the cache.
- See Also
Cudd_zddReduceHeap
- Defined in
cuddZddReord.c
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
- Defined in
cuddZddSetop.c
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
- Defined in
cuddZddSetop.c
void
Cudd_zddSymmProfile(
DdManager * table,
int lower,
int upper
)
- Prints statistics on symmetric ZDD variables.
- Side Effects None
- Defined in
cuddZddSymm.c
DdNode *
Cudd_zddUnateProduct(
DdManager * dd,
DdNode * f,
DdNode * g
)
- Computes the product of two unate covers represented as
ZDDs. Unate covers use one ZDD variable for each BDD
variable. Returns a pointer to the result if successful; NULL
otherwise.
- Side Effects None
- See Also
Cudd_zddProduct
- Defined in
cuddZddFuncs.c
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
- Defined in
cuddZddSetop.c
int
Cudd_zddVarsFromBddVars(
DdManager * dd, DD manager
int multiplicity how many ZDD variables are created for each BDD variable
)
- Creates one or more ZDD variables for each BDD
variable. If some ZDD variables already exist, only the missing
variables are created. Parameter multiplicity allows the caller to
control how many variables are created for each BDD variable in
existence. For instance, if ZDDs are used to represent covers, two
ZDD variables are required for each BDD variable. The order of the
BDD variables is transferred to the ZDD variables. If a variable
group tree exists for the BDD variables, a corresponding ZDD
variable group tree is created by expanding the BDD variable
tree. In any case, the ZDD variables derived from the same BDD
variable are merged in a ZDD variable group. If a ZDD variable group
tree exists, it is freed. Returns 1 if successful; 0 otherwise.
- Side Effects None
- See Also
Cudd_bddNewVar
Cudd_bddIthVar
Cudd_bddNewVarAtLevel
- Defined in
cuddAPI.c
DdNode *
Cudd_zddWeakDivF(
DdManager * dd,
DdNode * f,
DdNode * g
)
- Modified version of Cudd_zddWeakDiv. This function may
disappear in future releases.
- Side Effects None
- See Also
Cudd_zddWeakDiv
- Defined in
cuddZddFuncs.c
DdNode *
Cudd_zddWeakDiv(
DdManager * dd,
DdNode * f,
DdNode * g
)
- Applies weak division to two ZDDs representing two
covers. Returns a pointer to the ZDD representing the result if
successful; NULL otherwise. The result of weak division depends on
the variable order. The covers on which Cudd_zddWeakDiv operates use
two ZDD variables for each function variable (one ZDD variable for
each literal of the variable). Those two ZDD variables should be
adjacent in the order.
- Side Effects None
- See Also
Cudd_zddDivide
- Defined in
cuddZddFuncs.c
static enum st_retval
MarkCacheCleanUp(
char * key,
char * value,
char * arg
)
- Frees memory associated with computed table of
cuddBddLICMarkEdges. Returns ST_CONTINUE.
- Side Effects None
- See Also
Cudd_bddLICompaction
- Defined in
cuddGenCof.c
static int
MarkCacheCompare(
const char * ptr1,
const char * ptr2
)
- Comparison function for the computed table of
cuddBddLICMarkEdges. Returns 0 if the two nodes of the key are equal; 1
otherwise.
- Side Effects None
- See Also
Cudd_bddLICompaction
- Defined in
cuddGenCof.c
static int
MarkCacheHash(
char * ptr,
int modulus
)
- Hash function for the computed table of
cuddBddLICMarkEdges. Returns the bucket number.
- Side Effects None
- See Also
Cudd_bddLICompaction
- Defined in
cuddGenCof.c
static int
PMX(
int maxvar
)
- Performs the crossover between two randomly chosen
parents, and creates two children, x1 and x2. Uses the Partially
Matched Crossover operator.
- Side Effects None
- Defined in
cuddGenetic.c
static int
PairInTables(
DdNode * g,
DdNode * h,
st_table * ghTable
)
- .Check whether the given pair is in the tables. gTable
and hTable are combined.
absence in both is indicated by 0,
presence in gTable is indicated by 1,
presence in hTable by 2 and
presence in both by 3.
The values returned by this function are PAIR_ST,
PAIR_CR, G_ST, G_CR, H_ST, H_CR, BOTH_G, BOTH_H, NONE.
PAIR_ST implies g in gTable and h in hTable
PAIR_CR implies g in hTable and h in gTable
G_ST implies g in gTable and h not in any table
G_CR implies g in hTable and h not in any table
H_ST implies h in hTable and g not in any table
H_CR implies h in gTable and g not in any table
BOTH_G implies both in gTable
BOTH_H implies both in hTable
NONE implies none in table;
- See Also
CheckTablesCacheAndReturn
CheckInTables
- Defined in
cuddDecomp.c
static Conjuncts *
PickOnePair(
DdNode * node,
DdNode * g1,
DdNode * h1,
DdNode * g2,
DdNode * h2,
st_table * ghTable,
st_table * cacheTable
)
- Check the tables for the existence of pair and return
one combination, store in cache. The pair that has more pointers to
it is picked. An approximation of the number of local pointers is
made by taking the reference count of the pairs sent.
- See Also
ZeroCase
BuildConjuncts
- Defined in
cuddDecomp.c
static DdNode *
RAbuildSubset(
DdManager * dd, DD manager
DdNode * node, current node
ApproxInfo * info node info
)
- Builds the subset BDDfor cuddRemapUnderApprox. Based
on the info table, performs remapping or replacement at selected
nodes. Returns a pointer to the result if successful; NULL
otherwise.
- Side Effects None
- See Also
cuddRemapUnderApprox
- Defined in
cuddApprox.c
static int
RAmarkNodes(
DdManager * dd, manager
DdNode * f, function to be analyzed
ApproxInfo * info, info on BDD
int threshold, when to stop approximating
double quality minimum improvement for accepted changes
)
- Marks nodes for remapping. Returns 1 if successful; 0
otherwise.
- Side Effects None
- See Also
cuddRemapUnderApprox
- Defined in
cuddApprox.c
static void
ResizeCountMintermPages(
)
- Resize the number of pages allocated to store the minterm
counts. The procedure moves the counter to the next page when the
end of the page is reached and allocates new pages when necessary.
- Side Effects Changes the size of minterm pages, page, page index, maximum
number of pages freeing stuff in case of memory out.
- Defined in
cuddSubsetHB.c
static void
ResizeCountNodePages(
)
- Resize the number of pages allocated to store the node counts.
The procedure moves the counter to the next page when the end of
the page is reached and allocates new pages when necessary.
- Side Effects Changes the size of pages, page, page index, maximum
number of pages freeing stuff in case of memory out.
- Defined in
cuddSubsetHB.c
static void
ResizeNodeDataPages(
)
- Resize the number of pages allocated to store the node data
The procedure moves the counter to the next page when the end of
the page is reached and allocates new pages when necessary.
- Side Effects Changes the size of pages, page, page index, maximum
number of pages freeing stuff in case of memory out.
- Defined in
cuddSubsetHB.c
static void
ResizeNodeDistPages(
)
- Resize the number of pages allocated to store the distances
related to each node. The procedure moves the counter to the
next page when the end of the page is reached and allocates new
pages when necessary.
- Side Effects Changes the size of pages, page, page index, maximum
number of pages freeing stuff in case of memory out.
- Defined in
cuddSubsetSP.c
static void
ResizeQueuePages(
)
- Resize the number of pages allocated to store nodes in the BFS
traversal of the Bdd. The procedure moves the counter to the
next page when the end of the page is reached and allocates new
pages when necessary.
- Side Effects Changes the size of pages, page, page index, maximum
number of pages freeing stuff in case of memory out.
- Defined in
cuddSubsetSP.c
static void
StoreNodes(
st_table * storeTable,
DdManager * dd,
DdNode * node
)
- rocedure to recursively store nodes that are retained in the subset.
- Side Effects None
- See Also
StoreNodes
- Defined in
cuddSubsetHB.c
static double
SubsetCountMintermAux(
DdNode * node, function to analyze
double max, number of minterms of constant 1
st_table * table visitedTable table
)
- Recursively counts minterms of each node in the DAG.
Similar to the cuddCountMintermAux which recursively counts the
number of minterms for the dag rooted at each node in terms of the
total number of variables (max). This procedure creates the node
data structure and stores the minterm count as part of the node
data structure.
- Side Effects Creates structures of type node quality and fills the st_table
- See Also
SubsetCountMinterm
- Defined in
cuddSubsetHB.c
static st_table *
SubsetCountMinterm(
DdNode * node, function to be analyzed
int nvars number of variables node depends on
)
- Counts minterms of each node in the DAG. Similar to the
Cudd_CountMinterm procedure except this returns the minterm count for
all the nodes in the bdd in an st_table.
- Side Effects none
- See Also
SubsetCountMintermAux
- Defined in
cuddSubsetHB.c
static int
SubsetCountNodesAux(
DdNode * node, current node
st_table * table, table to update node count, also serves as visited table.
double max maximum number of variables
)
- Recursively counts the number of nodes under the dag.
Also counts the number of nodes under the lighter child of
this node. . Note that the same dag may be the lighter child of two
different nodes and have different counts. As with the minterm counts,
the node counts are stored in pages to be space efficient and the
address for these node counts are stored in an st_table associated
to each node.
- Side Effects Updates the node data table with node counts
- See Also
SubsetCountNodes
- Defined in
cuddSubsetHB.c
static int
SubsetCountNodes(
DdNode * node, function to be analyzed
st_table * table, node quality table
int nvars number of variables node depends on
)
- Counts the nodes under the current node and its lighter
child. Calls a recursive procedure to count the number of nodes of
a DAG rooted at a particular node and the number of nodes taken by its
lighter child.
- Side Effects None
- See Also
SubsetCountNodesAux
- Defined in
cuddSubsetHB.c
static DdNode *
UAbuildSubset(
DdManager * dd, DD manager
DdNode * node, current node
ApproxInfo * info node info
)
- Builds the subset BDD. Based on the info table,
replaces selected nodes by zero. Returns a pointer to the result if
successful; NULL otherwise.
- Side Effects None
- See Also
cuddUnderApprox
- Defined in
cuddApprox.c
static int
UAmarkNodes(
DdManager * dd, manager
DdNode * f, function to be analyzed
ApproxInfo * info, info on BDD
int threshold, when to stop approximating
int safe, enforce safe approximation
double quality minimum improvement for accepted changes
)
- Marks nodes for replacement by zero. Returns 1 if successful;
0 otherwise.
- Side Effects None
- See Also
cuddUnderApprox
- Defined in
cuddApprox.c
static Conjuncts *
ZeroCase(
DdManager * dd,
DdNode * node,
Conjuncts * factorsNv,
st_table * ghTable,
st_table * cacheTable,
int switched
)
- If one child is zero, do explicitly what Restrict does or better.
First separate a variable and its child in the base case. In case of a cube
times a function, separate the cube and function. As a last resort, look in
tables.
- Side Effects Frees the BDDs in factorsNv. factorsNv itself is not freed
because it is freed above.
- See Also
BuildConjuncts
- Defined in
cuddDecomp.c
static DdNode *
addBddDoInterval(
DdManager * dd,
DdNode * f,
DdNode * l,
DdNode * u
)
- Performs the recursive step for Cudd_addBddInterval.
Returns a pointer to the BDD if successful; NULL otherwise.
- Side Effects None
- See Also
addBddDoThreshold
addBddDoStrictThreshold
- Defined in
cuddBridge.c
static DdNode *
addBddDoIthBit(
DdManager * dd,
DdNode * f,
DdNode * index
)
- Performs the recursive step for Cudd_addBddIthBit.
Returns a pointer to the BDD if successful; NULL otherwise.
- Side Effects None
- Defined in
cuddBridge.c
static DdNode *
addBddDoStrictThreshold(
DdManager * dd,
DdNode * f,
DdNode * val
)
- Performs the recursive step for Cudd_addBddStrictThreshold.
Returns a pointer to the BDD if successful; NULL otherwise.
- Side Effects None
- See Also
addBddDoThreshold
- Defined in
cuddBridge.c
static DdNode *
addBddDoThreshold(
DdManager * dd,
DdNode * f,
DdNode * val
)
- Performs the recursive step for Cudd_addBddThreshold.
Returns a pointer to the BDD if successful; NULL otherwise.
- Side Effects None
- See Also
addBddDoStrictThreshold
- Defined in
cuddBridge.c
static int
addCheckPositiveCube(
DdManager * manager,
DdNode * cube
)
- Checks whether cube is an ADD representing the product of
positive literals. Returns 1 in case of success; 0 otherwise.
- Side Effects None
- Defined in
cuddAddAbs.c
static DdNode *
addDoIthBit(
DdManager * dd,
DdNode * f,
DdNode * index
)
- Performs the recursive step for Cudd_addIthBit.
Returns a pointer to the BDD if successful; NULL otherwise.
- Side Effects None
- Defined in
cuddAddFind.c
static DdNode *
addMMRecur(
DdManager * dd,
DdNode * A,
DdNode * B,
int topP,
int * vars
)
- Performs the recursive step of Cudd_addMatrixMultiply.
Returns a pointer to the result if successful; NULL otherwise.
- Side Effects None
- Defined in
cuddMatMult.c
static int
addMultiplicityGroups(
DdManager * dd, manager
MtrNode * treenode, current tree node
int multiplicity, how many ZDD vars per BDD var
char * vmask, variable pairs for which a group has been already built
char * lmask levels for which a group has already been built
)
- Adds multiplicity groups to a ZDD variable group tree.
Returns 1 if successful; 0 otherwise. This function creates the groups
for set of ZDD variables (whose cardinality is given by parameter
multiplicity) that are created for each BDD variable in
Cudd_zddVarsFromBddVars. The crux of the matter is to determine the index
each new group. (The index of the first variable in the group.)
We first build all the groups for the children of a node, and then deal
with the ZDD variables that are directly attached to the node. The problem
for these is that the tree itself does not provide information on their
position inside the group. While we deal with the children of the node,
therefore, we keep track of all the positions they occupy. The remaining
positions in the tree can be freely used. Also, we keep track of all the
variables placed in the children. All the remaining variables are directly
attached to the group. We can then place any pair of variables not yet
grouped in any pair of available positions in the node.
- Side Effects Changes the variable group tree.
- See Also
Cudd_zddVarsFromBddVars
- Defined in
cuddAPI.c
static DdNode *
addTriangleRecur(
DdManager * dd,
DdNode * f,
DdNode * g,
int * vars,
DdNode * cube
)
- Performs the recursive step of Cudd_addTriangle. Returns
a pointer to the result if successful; NULL otherwise.
- Side Effects None
- Defined in
cuddMatMult.c
static void
addVarToConst(
DdNode * f,
DdNode ** gp,
DdNode ** hp,
DdNode * one,
DdNode * zero
)
- Replaces variables with constants if possible (part of
canonical form).
- Side Effects None
- Defined in
cuddAddIte.c
static DdNode *
addWalshInt(
DdManager * dd,
DdNode ** x,
DdNode ** y,
int n
)
- Generates a Walsh matrix in ADD form. Returns a pointer
to the matrixi if successful; NULL otherwise.
- Side Effects None
- Defined in
cuddAddWalsh.c
static int
array_compare(
const char * array1,
const char * array2
)
- Comparison function for the computed table. Returns 0 if
the two arrays are equal; 1 otherwise.
- Side Effects None
- Defined in
cuddGenetic.c
static int
array_hash(
char * array,
int modulus
)
- Hash function for the computed table. Returns the bucket
number.
- Side Effects None
- Defined in
cuddGenetic.c
static double
bddAnnotateMintermCount(
DdManager * manager,
DdNode * node,
double max,
st_table * table
)
- Annotates every node in the BDD node with its minterm count.
In this function, every node and the minterm count represented by it are
stored in a hash table.
- Side Effects Fills up 'table' with the pair .
- Defined in
cuddSplit.c
static int
bddCheckPositiveCube(
DdManager * manager,
DdNode * cube
)
- Returns 1 in case of success; 0 otherwise.
- Side Effects None
- Defined in
cuddBddAbs.c
static double
bddCorrelationAux(
DdManager * dd,
DdNode * f,
DdNode * g,
st_table * table
)
- Performs the recursive step of Cudd_bddCorrelation.
Returns the fraction of minterms in the ON-set of the EXNOR of f and
g.
- Side Effects None
- See Also
bddCorrelationWeightsAux
- Defined in
cuddBddCorr.c
static double
bddCorrelationWeightsAux(
DdManager * dd,
DdNode * f,
DdNode * g,
double * prob,
st_table * table
)
- Performs the recursive step of Cudd_bddCorrelationWeigths.
- Side Effects None
- See Also
bddCorrelationAux
- Defined in
cuddBddCorr.c
static void
bddFixTree(
DdManager * table,
MtrNode * treenode
)
- Fixes the BDD variable group tree after a
shuffle. Assumes that the order of the variables in a terminal node
has not been changed.
- Side Effects Changes the BDD variable group tree.
- Defined in
cuddReorder.c
static int
bddVarToCanonicalSimple(
DdManager * dd,
DdNode ** fp,
DdNode ** gp,
DdNode ** hp,
unsigned int * topfp,
unsigned int * topgp,
unsigned int * tophp
)
- Makes sure the first two pointers are regular. This
mat require the complementation of the result, which is signaled by
returning 1 instead of 0. This function is simpler than the general
case because it assumes that no two arguments are the same or
complementary, and no argument is constant.
- Side Effects None
- See Also
bddVarToConst
bddVarToCanonical
- Defined in
cuddBddIte.c
static int
bddVarToCanonical(
DdManager * dd,
DdNode ** fp,
DdNode ** gp,
DdNode ** hp,
unsigned int * topfp,
unsigned int * topgp,
unsigned int * tophp
)
- Reduces 2 variable expressions to canonical form.
- Side Effects None
- See Also
bddVarToConst
bddVarToCanonicalSimple
- Defined in
cuddBddIte.c
static void
bddVarToConst(
DdNode * f,
DdNode ** gp,
DdNode ** hp,
DdNode * one
)
- This function performs part of the transformation to
standard form by replacing variables with constants if possible.
- Side Effects None
- See Also
bddVarToCanonical
bddVarToCanonicalSimple
- Defined in
cuddBddIte.c
static int
beforep(
DdHalfWord var1a,
short phase1a,
DdHalfWord var1b,
short phase1b,
DdHalfWord var2a,
short phase2a,
DdHalfWord var2b,
short phase2b
)
- Returns true iff the first argument precedes the second
in the clause order. A clause precedes another if its first lieral
precedes the first literal of the other, or if the first literals
are the same, and its second literal precedes the second literal of
the other clause. A literal precedes another if it has a higher
index, of if it has the same index, but it has lower phase. Phase 0
is the positive phase, and it is lower than Phase 1 (negative
phase).
- Side Effects None
- See Also
equalp
- Defined in
cuddEssent.c
static BitVector *
bitVectorAlloc(
int size
)
- Allocates a bit vector. The parameter size gives the
number of bits. This procedure allocates enough long's to hold the
specified number of bits. Returns a pointer to the allocated vector
if successful; NULL otherwise.
- Side Effects None
- See Also
bitVectorClear
bitVectorFree
- Defined in
cuddEssent.c
static void
bitVectorClear(
BitVector * vector,
int size
)
- Clears a bit vector. The parameter size gives the
number of bits.
- Side Effects None
- See Also
bitVectorAlloc
- Defined in
cuddEssent.c
static void
bitVectorFree(
BitVector * vector
)
- Frees a bit vector.
- Side Effects None
- See Also
bitVectorAlloc
- Defined in
cuddEssent.c
static short
bitVectorRead(
BitVector * vector,
int i
)
- Returns the i-th entry of a bit vector.
- Side Effects None
- See Also
bitVectorSet
- Defined in
cuddEssent.c
static void
bitVectorSet(
BitVector * vector,
int i,
short val
)
- Sets the i-th entry of a bit vector to a value.
- Side Effects None
- See Also
bitVectorRead
- Defined in
cuddEssent.c
static int
build_dd(
DdManager * table,
int num, the index of the individual to be built
int lower,
int upper
)
- Builds a DD from a given order. This procedure also
sifts the final order and inserts into the array the size in nodes
of the result. Returns 1 if successful; 0 otherwise.
- Side Effects None
- Defined in
cuddGenetic.c
static int
checkSymmInfo(
DdManager * table,
DdHalfWord * symmInfo,
int index,
int level
)
- Returns 1 if a variable is the one with the highest index
among those belonging to a symmetry group that are in the top part of
the BDD. The top part is given by level.
- Side Effects None
- See Also
initSymmInfo
- Defined in
cuddExact.c
static DdTlcInfo *
computeClausesWithUniverse(
DdTlcInfo * Cres, list of clauses for child
DdHalfWord label, variable labeling the current node
short phase 0 if E child is zero; 1 if T child is zero
)
- Computes the two-literal clauses for a node with a zero
child, given the clauses for its other child and the label of the
node. Returns a pointer to a TclInfo structure if successful; NULL
otherwise.
- Side Effects None
- See Also
computeClauses
- Defined in
cuddEssent.c
static DdTlcInfo *
computeClauses(
DdTlcInfo * Tres, list of clauses for T child
DdTlcInfo * Eres, list of clauses for E child
DdHalfWord label, variable labeling the current node
int size number of variables in the manager
)
- Computes the two-literal clauses for a node given the
clauses for its children and the label of the node. Returns a
pointer to a TclInfo structure if successful; NULL otherwise.
- Side Effects None
- See Also
computeClausesWithUniverse
- Defined in
cuddEssent.c
static int
computeLB(
DdManager * table, manager
DdHalfWord * order, optimal order for the subset
int roots, roots between lower and upper
int cost, minimum cost for the subset
int lower, lower level to be reordered
int upper, upper level to be reordered
int level offset for the current top bottom var
)
- Computes a lower bound on the size of a BDD from the
following factors:
- size of the lower part of it;
- size of the part of the upper part not subjected to reordering;
- number of roots in the part of the BDD subjected to reordering;
- variable in the support of the roots in the upper part of the
BDD subjected to reordering.
- Side Effects None
- Defined in
cuddExact.c
static int
computeSavings(
DdManager * dd,
DdNode * f,
DdNode * skip,
ApproxInfo * info,
DdLevelQueue * queue
)
- Counts the nodes that would be eliminated if a given
node were replaced by zero. This procedure uses a queue passed by
the caller for efficiency: since the queue is left empty at the
endof the search, it can be reused as is by the next search. Returns
the count (always striclty positive) if successful; 0 otherwise.
- Side Effects None
- See Also
cuddUnderApprox
- Defined in
cuddApprox.c
static void
copyOrder(
DdManager * table,
int * array,
int lower,
int upper
)
- Copies the current variable order to array.
At the same time inverts the permutation.
- Side Effects None
- Defined in
cuddAnneal.c
static DdNode *
createResult(
DdManager * dd,
unsigned int index,
unsigned int phase,
DdNode * cube,
CUDD_VALUE_TYPE distance
)
- Builds a result for cache storage. Returns a pointer
to the resulting ADD if successful; NULL otherwise.
- Side Effects None
- See Also
cuddBddClosestCube
separateCube
- Defined in
cuddPriority.c
DdNode *
cuddAddApplyRecur(
DdManager * dd,
DD_AOP op,
DdNode * f,
DdNode * g
)
- Performs the recursive step of Cudd_addApply. Returns a
pointer to the result if successful; NULL otherwise.
- Side Effects None
- See Also
cuddAddMonadicApplyRecur
- Defined in
cuddAddApply.c
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
- Defined in
cuddBridge.c
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
- Defined in
cuddAddIte.c
DdNode *
cuddAddComposeRecur(
DdManager * dd,
DdNode * f,
DdNode * g,
DdNode * proj
)
- Performs the recursive step of Cudd_addCompose.
Returns the composed BDD if successful; NULL otherwise.
- Side Effects None
- See Also
Cudd_addCompose
- Defined in
cuddCompose.c
DdNode *
cuddAddConstrainRecur(
DdManager * dd,
DdNode * f,
DdNode * c
)
- Performs the recursive step of Cudd_addConstrain.
Returns a pointer to the result if successful; NULL otherwise.
- Side Effects None
- See Also
Cudd_addConstrain
- Defined in
cuddGenCof.c
DdNode *
cuddAddExistAbstractRecur(
DdManager * manager,
DdNode * f,
DdNode * cube
)
- Performs the recursive step of Cudd_addExistAbstract.
Returns the ADD obtained by abstracting the variables of cube from f,
if successful; NULL otherwise.
- Side Effects None
- Defined in
cuddAddAbs.c
static DdNode *
cuddAddGeneralVectorComposeRecur(
DdManager * dd, DD manager
DdHashTable * table, computed table
DdNode * f, ADD in which to compose
DdNode ** vectorOn, functions to substitute for x_i
DdNode ** vectorOff, functions to substitute for x_i'
int deepest depth of deepest substitution
)
- Performs the recursive step of Cudd_addGeneralVectorCompose.
- Side Effects None
- Defined in
cuddCompose.c
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
- Defined in
cuddAddIte.c
DdNode *
cuddAddMonadicApplyRecur(
DdManager * dd,
DD_MAOP op,
DdNode * f
)
- Performs the recursive step of Cudd_addMonadicApply. Returns a
pointer to the result if successful; NULL otherwise.
- Side Effects None
- See Also
cuddAddApplyRecur
- Defined in
cuddAddApply.c
DdNode *
cuddAddNegateRecur(
DdManager * dd,
DdNode * f
)
- Implements the recursive step of Cudd_addNegate.
Returns a pointer to the result.
- Side Effects None
- Defined in
cuddAddNeg.c
static DdNode *
cuddAddNonSimComposeRecur(
DdManager * dd,
DdNode * f,
DdNode ** vector,
DdNode * key,
DdNode * cube,
int lastsub
)
- Performs the recursive step of Cudd_addNonSimCompose.
- Side Effects None
- Defined in
cuddCompose.c
DdNode *
cuddAddOrAbstractRecur(
DdManager * manager,
DdNode * f,
DdNode * cube
)
- Performs the recursive step of Cudd_addOrAbstract.
Returns the ADD obtained by abstracting the variables of cube from f,
if successful; NULL otherwise.
- Side Effects None
- Defined in
cuddAddAbs.c
static DdNode *
cuddAddOuterSumRecur(
DdManager * dd,
DdNode * M,
DdNode * r,
DdNode * c
)
- Performs the recursive step of Cudd_addOuterSum.
Returns a pointer to the result if successful; NULL otherwise.
- Side Effects None
- Defined in
cuddMatMult.c
static DdNode *
cuddAddPermuteRecur(
DdManager * manager, DD manager
DdHashTable * table, computed table
DdNode * node, ADD to be reordered
int * permut permutation array
)
- Recursively puts the ADD in the order given in the
array permut. Checks for trivial cases to terminate recursion, then
splits on the children of this node. Once the solutions for the
children are obtained, it puts into the current position the node
from the rest of the ADD that should be here. Then returns this ADD.
The key here is that the node being visited is NOT put in its proper
place by this instance, but rather is switched when its proper
position is reached in the recursion tree.
The DdNode * that is returned is the same ADD as passed in as node,
but in the new order.
- Side Effects None
- See Also
Cudd_addPermute
cuddBddPermuteRecur
- Defined in
cuddCompose.c
DdNode *
cuddAddRestrictRecur(
DdManager * dd,
DdNode * f,
DdNode * c
)
- Performs the recursive step of Cudd_addRestrict.
Returns the restricted ADD if successful; otherwise NULL.
- Side Effects None
- See Also
Cudd_addRestrict
- Defined in
cuddGenCof.c
DdNode *
cuddAddRoundOffRecur(
DdManager * dd,
DdNode * f,
double trunc
)
- Implements the recursive step of Cudd_addRoundOff.
Returns a pointer to the result.
- Side Effects None
- Defined in
cuddAddNeg.c
DdNode *
cuddAddScalarInverseRecur(
DdManager * dd,
DdNode * f,
DdNode * epsilon
)
- Returns a pointer to the resulting ADD in case of
success. Returns NULL if any discriminants smaller than epsilon is
encountered.
- Side Effects None
- Defined in
cuddAddInv.c
DdNode *
cuddAddUnivAbstractRecur(
DdManager * manager,
DdNode * f,
DdNode * cube
)
- Performs the recursive step of Cudd_addUnivAbstract.
Returns the ADD obtained by abstracting the variables of cube from f,
if successful; NULL otherwise.
- Side Effects None
- Defined in
cuddAddAbs.c
static DdNode *
cuddAddVectorComposeRecur(
DdManager * dd, DD manager
DdHashTable * table, computed table
DdNode * f, ADD in which to compose
DdNode ** vector, functions to substitute
int deepest depth of deepest substitution
)
- Performs the recursive step of Cudd_addVectorCompose.
- Side Effects None
- Defined in
cuddCompose.c
DdNode *
cuddAllocNode(
DdManager * unique
)
- Fast storage allocation for DdNodes in the table. The
first 4 bytes of a chunk contain a pointer to the next block; the
rest contains DD_MEM_CHUNK spaces for DdNodes. Returns a pointer to
a new node if successful; NULL is memory is full.
- Side Effects None
- See Also
cuddDynamicAllocNode
- Defined in
cuddTable.c
int
cuddAnnealing(
DdManager * table,
int lower,
int upper
)
- Get x, y by random selection. Choose either
exchange or jump randomly. In case of jump, choose between jump_up
and jump_down randomly. Do exchange or jump and get optimal case.
Loop until there is no improvement or temperature reaches
minimum. Returns 1 in case of success; 0 otherwise.
- Side Effects None
- Defined in
cuddAnneal.c
static DdApaNumber
cuddApaCountMintermAux(
DdNode * node,
int digits,
DdApaNumber max,
DdApaNumber min,
st_table * table
)
- Performs the recursive step of Cudd_ApaCountMinterm.
It is based on the following identity. Let |f| be the
number of minterms of f. Then:
|f| = (|f0|+|f1|)/2
where f0 and f1 are the two cofactors of f.
Uses the identity
|f'| = max - |f|
.
The procedure expects the argument "node" to be a regular pointer, and
guarantees this condition is met in the recursive calls.
For efficiency, the result of a call is cached only if the node has
a reference count greater than 1.
Returns the number of minterms of the function rooted at node.
- Side Effects None
- Defined in
cuddApa.c
static enum st_retval
cuddApaStCountfree(
char * key,
char * value,
char * arg
)
- Frees the memory used to store the minterm counts
recorded in the visited table. Returns ST_CONTINUE.
- Side Effects None
- Defined in
cuddApa.c
int
cuddBddAlignToZdd(
DdManager * table DD manager
)
- Reorders BDD variables according to the order of the
ZDD variables. This function can be called at the end of ZDD
reordering to insure that the order of the BDD variables is
consistent with the order of the ZDD variables. The number of ZDD
variables must be a multiple of the number of BDD variables. Let
M
be the ratio of the two numbers. cuddBddAlignToZdd
then considers the ZDD variables from M*i
to
(M+1)*i-1
as corresponding to BDD variable
i
. This function should be normally called from
Cudd_zddReduceHeap, which clears the cache. Returns 1 in case of
success; 0 otherwise.
- Side Effects Changes the BDD variable order for all diagrams and performs
garbage collection of the BDD unique table.
- See Also
Cudd_ShuffleHeap
Cudd_zddReduceHeap
- Defined in
cuddReorder.c
DdNode *
cuddBddAndAbstractRecur(
DdManager * manager,
DdNode * f,
DdNode * g,
DdNode * cube
)
- Takes the AND of two BDDs and simultaneously abstracts
the variables in cube. The variables are existentially abstracted.
Returns a pointer to the result is successful; NULL otherwise.
- Side Effects None
- See Also
Cudd_bddAndAbstract
- Defined in
cuddAndAbs.c
DdNode *
cuddBddAndRecur(
DdManager * manager,
DdNode * f,
DdNode * g
)
- Implements the recursive step of Cudd_bddAnd by taking
the conjunction of two BDDs. Returns a pointer to the result is
successful; NULL otherwise.
- Side Effects None
- See Also
Cudd_bddAnd
- Defined in
cuddBddIte.c
DdNode *
cuddBddBooleanDiffRecur(
DdManager * manager,
DdNode * f,
DdNode * var
)
- Performs the recursive steps of Cudd_bddBoleanDiff.
Returns the BDD obtained by XORing the cofactors of f with respect to
var if successful; NULL otherwise. Exploits the fact that dF/dx =
dF'/dx.
- Side Effects None
- Defined in
cuddBddAbs.c
static DdNode *
cuddBddCharToVect(
DdManager * dd,
DdNode * f,
DdNode * x
)
- Performs the recursive step of Cudd_bddCharToVect.
This function maintains the invariant that f is non-zero.
Returns the i-th component of the vector if successful; otherwise NULL.
- Side Effects None
- See Also
Cudd_bddCharToVect
- Defined in
cuddGenCof.c
static DdNode *
cuddBddClipAndAbsRecur(
DdManager * manager,
DdNode * f,
DdNode * g,
DdNode * cube,
int distance,
int direction
)
- Approximates the AND of two BDDs and simultaneously
abstracts the variables in cube. The variables are existentially
abstracted. Returns a pointer to the result is successful; NULL
otherwise.
- Side Effects None
- See Also
Cudd_bddClippingAndAbstract
- Defined in
cuddClip.c
DdNode *
cuddBddClippingAndAbstract(
DdManager * dd, manager
DdNode * f, first conjunct
DdNode * g, second conjunct
DdNode * cube, cube of variables to be abstracted
int maxDepth, maximum recursion depth
int direction under (0) or over (1) approximation
)
- Approximates the conjunction of two BDDs f and g and
simultaneously abstracts the variables in cube. Returns a
pointer to the resulting BDD if successful; NULL if the intermediate
result blows up.
- Side Effects None
- See Also
Cudd_bddClippingAndAbstract
- Defined in
cuddClip.c
static DdNode *
cuddBddClippingAndRecur(
DdManager * manager,
DdNode * f,
DdNode * g,
int distance,
int direction
)
- Implements the recursive step of Cudd_bddClippingAnd by taking
the conjunction of two BDDs. Returns a pointer to the result is
successful; NULL otherwise.
- Side Effects None
- See Also
cuddBddClippingAnd
- Defined in
cuddClip.c
DdNode *
cuddBddClippingAnd(
DdManager * dd, manager
DdNode * f, first conjunct
DdNode * g, second conjunct
int maxDepth, maximum recursion depth
int direction under (0) or over (1) approximation
)
- Approximates the conjunction of two BDDs f and g. Returns a
pointer to the resulting BDD if successful; NULL if the intermediate
result blows up.
- Side Effects None
- See Also
Cudd_bddClippingAnd
- Defined in
cuddClip.c
DdNode *
cuddBddClosestCube(
DdManager * dd,
DdNode * f,
DdNode * g,
CUDD_VALUE_TYPE bound
)
- Performs the recursive step of Cudd_bddClosestCube.
Returns the cube if succesful; NULL otherwise. The procedure uses a
four-way recursion to examine all four combinations of cofactors of
f
and g
according to the following formula.
H(f,g) = min(H(ft,gt), H(fe,ge), H(ft,ge)+1, H(fe,gt)+1)
Bounding is based on the following observations.
- If we already found two points at distance 0, there is no point in
continuing. Furthermore,
- If F == not(G) then the best we can hope for is a minimum distance
of 1. If we have already found two points at distance 1, there is
no point in continuing. (Indeed, H(F,G) == 1 in this case. We
have to continue, though, to find the cube.)
The variable bound
is set at the largest value of the distance
that we are still interested in. Therefore, we desist when
(bound == -1) and (F != not(G)) or (bound == 0) and (F == not(G)).
If we were maximally aggressive in using the bound, we would always
set the bound to the minimum distance seen thus far minus one. That
is, we would maintain the invariant
bound < minD,
except at the very beginning, when we have no value for
minD
.
However, we do not use bound < minD
when examining the
two negative cofactors, because we try to find a large cube at
minimum distance. To do so, we try to find a cube in the negative
cofactors at the same or smaller distance from the cube found in the
positive cofactors.
When we compute H(ft,ge)
and H(fe,gt)
we
know that we are going to add 1 to the result of the recursive call
to account for the difference in the splitting variable. Therefore,
we decrease the bound correspondingly.
Another important observation concerns the need of examining all
four pairs of cofators only when both f
and
g
depend on the top variable.
Suppose gt == ge == g
. (That is, g
does
not depend on the top variable.) Then
H(f,g) = min(H(ft,g), H(fe,g), H(ft,g)+1, H(fe,g)+1)
= min(H(ft,g), H(fe,g)) .
Therefore, under these circumstances, we skip the two "cross" cases.
An interesting feature of this function is the scheme used for
caching the results in the global computed table. Since we have a
cube and a distance, we combine them to form an ADD. The
combination replaces the zero child of the top node of the cube with
the negative of the distance. (The use of the negative is to avoid
ambiguity with 1.) The degenerate cases (zero and one) are treated
specially because the distance is known (0 for one, and infinity for
zero).
- Side Effects None
- See Also
Cudd_bddClosestCube
- Defined in
cuddPriority.c
DdNode *
cuddBddComposeRecur(
DdManager * dd,
DdNode * f,
DdNode * g,
DdNode * proj
)
- Performs the recursive step of Cudd_bddCompose.
Exploits the fact that the composition of f' with g
produces the complement of the composition of f with g to better
utilize the cache. Returns the composed BDD if successful; NULL
otherwise.
- Side Effects None
- See Also
Cudd_bddCompose
- Defined in
cuddCompose.c
static int
cuddBddConstrainDecomp(
DdManager * dd,
DdNode * f,
DdNode ** decomp
)
- Performs the recursive step of Cudd_bddConstrainDecomp.
Returns f super (i) if successful; otherwise NULL.
- Side Effects None
- See Also
Cudd_bddConstrainDecomp
- Defined in
cuddGenCof.c
DdNode *
cuddBddConstrainRecur(
DdManager * dd,
DdNode * f,
DdNode * c
)
- Performs the recursive step of Cudd_bddConstrain.
Returns a pointer to the result if successful; NULL otherwise.
- Side Effects None
- See Also
Cudd_bddConstrain
- Defined in
cuddGenCof.c
DdNode *
cuddBddExistAbstractRecur(
DdManager * manager,
DdNode * f,
DdNode * cube
)
- Performs the recursive steps of Cudd_bddExistAbstract.
Returns the BDD obtained by abstracting the variables
of cube from f if successful; NULL otherwise. It is also used by
Cudd_bddUnivAbstract.
- Side Effects None
- See Also
Cudd_bddExistAbstract
Cudd_bddUnivAbstract
- Defined in
cuddBddAbs.c
DdNode *
cuddBddIntersectRecur(
DdManager * dd,
DdNode * f,
DdNode * g
)
- Implements the recursive step of Cudd_bddIntersect.
- Side Effects None
- See Also
Cudd_bddIntersect
- Defined in
cuddBddIte.c
DdNode *
cuddBddIsop(
DdManager * dd,
DdNode * L,
DdNode * U
)
- Performs the recursive step of Cudd_bddIsop.
- Side Effects None
- See Also
Cudd_bddIsop
- Defined in
cuddZddIsop.c
DdNode *
cuddBddIteRecur(
DdManager * dd,
DdNode * f,
DdNode * g,
DdNode * h
)
- Implements the recursive step of Cudd_bddIte. Returns a
pointer to the resulting BDD. NULL if the intermediate result blows
up or if reordering occurs.
- Side Effects None
- Defined in
cuddBddIte.c
static DdNode *
cuddBddLICBuildResult(
DdManager * dd,
DdNode * f,
st_table * cache,
st_table * table
)
- Builds the results of Cudd_bddLICompaction.
Returns a pointer to the minimized BDD if successful; otherwise NULL.
- Side Effects None
- See Also
Cudd_bddLICompaction
cuddBddLICMarkEdges
- Defined in
cuddGenCof.c
static int
cuddBddLICMarkEdges(
DdManager * dd,
DdNode * f,
DdNode * c,
st_table * table,
st_table * cache
)
- Performs the edge marking step of Cudd_bddLICompaction.
Returns the LUB of the markings of the two outgoing edges of
f
if successful; otherwise CUDD_OUT_OF_MEM.
- Side Effects None
- See Also
Cudd_bddLICompaction
cuddBddLICBuildResult
- Defined in
cuddGenCof.c
DdNode *
cuddBddLICompaction(
DdManager * dd, manager
DdNode * f, function to be minimized
DdNode * c constraint (care set)
)
- Performs safe minimization of a BDD. Given the BDD
f
of a function to be minimized and a BDD
c
representing the care set, Cudd_bddLICompaction
produces the BDD of a function that agrees with f
wherever c
is 1. Safe minimization means that the size
of the result is guaranteed not to exceed the size of
f
. This function is based on the DAC97 paper by Hong et
al.. Returns a pointer to the result if successful; NULL
otherwise.
- Side Effects None
- See Also
Cudd_bddLICompaction
- Defined in
cuddGenCof.c
DdNode *
cuddBddLiteralSetIntersectionRecur(
DdManager * dd,
DdNode * f,
DdNode * g
)
- Performs the recursive step of
Cudd_bddLiteralSetIntersection. Scans the cubes for common variables,
and checks whether they agree in phase. Returns a pointer to the
resulting cube if successful; NULL otherwise.
- Side Effects None
- Defined in
cuddLiteral.c
DdNode *
cuddBddMakePrime(
DdManager * dd, manager
DdNode * cube, cube to be expanded
DdNode * f function of which the cube is to be made a prime
)
- Performs the recursive step of Cudd_bddMakePrime.
Returns the prime if successful; NULL otherwise.
- Side Effects None
- Defined in
cuddSat.c
DdNode *
cuddBddNPAndRecur(
DdManager * manager,
DdNode * f,
DdNode * g
)
- Implements the recursive step of Cudd_bddNPAnd.
Returns a pointer to the result is successful; NULL otherwise.
- Side Effects None
- See Also
Cudd_bddNPAnd
- Defined in
cuddGenCof.c
static DdNode *
cuddBddPermuteRecur(
DdManager * manager, DD manager
DdHashTable * table, computed table
DdNode * node, BDD to be reordered
int * permut permutation array
)
- Recursively puts the BDD in the order given in the array permut.
Checks for trivial cases to terminate recursion, then splits on the
children of this node. Once the solutions for the children are
obtained, it puts into the current position the node from the rest of
the BDD that should be here. Then returns this BDD.
The key here is that the node being visited is NOT put in its proper
place by this instance, but rather is switched when its proper position
is reached in the recursion tree.
The DdNode * that is returned is the same BDD as passed in as node,
but in the new order.
- Side Effects None
- See Also
Cudd_bddPermute
cuddAddPermuteRecur
- Defined in
cuddCompose.c
DdNode *
cuddBddRestrictRecur(
DdManager * dd,
DdNode * f,
DdNode * c
)
- Performs the recursive step of Cudd_bddRestrict.
Returns the restricted BDD if successful; otherwise NULL.
- Side Effects None
- See Also
Cudd_bddRestrict
- Defined in
cuddGenCof.c
static DdNode *
cuddBddSqueeze(
DdManager * dd,
DdNode * l,
DdNode * u
)
- Performs the recursive step of Cudd_bddSqueeze. This
procedure exploits the fact that if we complement and swap the
bounds of the interval we obtain a valid solution by taking the
complement of the solution to the original problem. Therefore, we
can enforce the condition that the upper bound is always regular.
Returns a pointer to the result if successful; NULL otherwise.
- Side Effects None
- See Also
Cudd_bddSqueeze
- Defined in
cuddGenCof.c
static DdNode *
cuddBddTransferRecur(
DdManager * ddS,
DdManager * ddD,
DdNode * f,
st_table * table
)
- Performs the recursive step of Cudd_bddTransfer.
Returns a pointer to the result if successful; NULL otherwise.
- Side Effects None
- See Also
cuddBddTransfer
- Defined in
cuddBridge.c
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
- Defined in
cuddBridge.c
static DdNode *
cuddBddVarMapRecur(
DdManager * manager, DD manager
DdNode * f BDD to be remapped
)
- Implements the recursive step of Cudd_bddVarMap.
Returns a pointer to the result if successful; NULL otherwise.
- Side Effects None
- See Also
Cudd_bddVarMap
- Defined in
cuddCompose.c
static DdNode *
cuddBddVectorComposeRecur(
DdManager * dd, DD manager
DdHashTable * table, computed table
DdNode * f, BDD in which to compose
DdNode ** vector, functions to be composed
int deepest depth of the deepest substitution
)
- Performs the recursive step of Cudd_bddVectorCompose.
- Side Effects None
- Defined in
cuddCompose.c
DdNode *
cuddBddXorExistAbstractRecur(
DdManager * manager,
DdNode * f,
DdNode * g,
DdNode * cube
)
- Takes the exclusive OR of two BDDs and simultaneously abstracts
the variables in cube. The variables are existentially abstracted. Returns a
pointer to the result is successful; NULL otherwise.
- Side Effects None
- See Also
Cudd_bddAndAbstract
- Defined in
cuddBddAbs.c
DdNode *
cuddBddXorRecur(
DdManager * manager,
DdNode * f,
DdNode * g
)
- Implements the recursive step of Cudd_bddXor by taking
the exclusive OR of two BDDs. Returns a pointer to the result is
successful; NULL otherwise.
- Side Effects None
- See Also
Cudd_bddXor
- Defined in
cuddBddIte.c
DdNode *
cuddBiasedUnderApprox(
DdManager * dd, DD manager
DdNode * f, current DD
DdNode * b, bias function
int numVars, maximum number of variables
int threshold, threshold under which approximation stops
double quality1, minimum improvement for accepted changes when b=1
double quality0 minimum improvement for accepted changes when b=0
)
- Applies the biased remapping underappoximation algorithm.
Proceeds in three phases:
- collect information on each node in the BDD; this is done via DFS.
- traverse the BDD in top-down fashion and compute for each node
whether remapping increases density.
- traverse the BDD via DFS and actually perform the elimination.
Returns the approximated BDD if successful; NULL otherwise.
- Side Effects None
- See Also
Cudd_BiasedUnderApprox
- Defined in
cuddApprox.c
DdNode *
cuddCProjectionRecur(
DdManager * dd,
DdNode * R,
DdNode * Y,
DdNode * Ysupp
)
- Performs the recursive step of Cudd_CProjection. Returns
the projection if successful; NULL otherwise.
- Side Effects None
- See Also
Cudd_CProjection
- Defined in
cuddPriority.c
void
cuddCacheFlush(
DdManager * table
)
- Flushes the cache.
- Side Effects None
- Defined in
cuddCache.c
void
cuddCacheInsert1(
DdManager * table,
DD_CTFP1 op,
DdNode * f,
DdNode * data
)
- Inserts a result in the cache for a function with two
operands.
- Side Effects None
- See Also
cuddCacheInsert
cuddCacheInsert2
- Defined in
cuddCache.c
void
cuddCacheInsert2(
DdManager * table,
DD_CTFP op,
DdNode * f,
DdNode * g,
DdNode * data
)
- Inserts a result in the cache for a function with two
operands.
- Side Effects None
- See Also
cuddCacheInsert
cuddCacheInsert1
- Defined in
cuddCache.c
void
cuddCacheInsert(
DdManager * table,
ptruint op,
DdNode * f,
DdNode * g,
DdNode * h,
DdNode * data
)
- Inserts a result in the cache.
- Side Effects None
- See Also
cuddCacheInsert2
cuddCacheInsert1
- Defined in
cuddCache.c
DdNode *
cuddCacheLookup1Zdd(
DdManager * table,
DD_CTFP1 op,
DdNode * f
)
- Returns the result if found; it returns NULL if no
result is found.
- Side Effects None
- See Also
cuddCacheLookupZdd
cuddCacheLookup2Zdd
- Defined in
cuddCache.c
DdNode *
cuddCacheLookup1(
DdManager * table,
DD_CTFP1 op,
DdNode * f
)
- Returns the result if found; it returns NULL if no
result is found.
- Side Effects None
- See Also
cuddCacheLookup
cuddCacheLookup2
- Defined in
cuddCache.c
DdNode *
cuddCacheLookup2Zdd(
DdManager * table,
DD_CTFP op,
DdNode * f,
DdNode * g
)
- Returns the result if found; it returns NULL if no
result is found.
- Side Effects None
- See Also
cuddCacheLookupZdd
cuddCacheLookup1Zdd
- Defined in
cuddCache.c
DdNode *
cuddCacheLookup2(
DdManager * table,
DD_CTFP op,
DdNode * f,
DdNode * g
)
- Returns the result if found; it returns NULL if no
result is found.
- Side Effects None
- See Also
cuddCacheLookup
cuddCacheLookup1
- Defined in
cuddCache.c
DdNode *
cuddCacheLookupZdd(
DdManager * table,
ptruint op,
DdNode * f,
DdNode * g,
DdNode * h
)
- Returns the result if found; it returns NULL if no
result is found.
- Side Effects None
- See Also
cuddCacheLookup2Zdd
cuddCacheLookup1Zdd
- Defined in
cuddCache.c
DdNode *
cuddCacheLookup(
DdManager * table,
ptruint op,
DdNode * f,
DdNode * g,
DdNode * h
)
- Returns the result if found; it returns NULL if no
result is found.
- Side Effects None
- See Also
cuddCacheLookup2
cuddCacheLookup1
- Defined in
cuddCache.c
int
cuddCacheProfile(
DdManager * table,
FILE * fp
)
- Computes and prints a profile of the cache usage.
Returns 1 if successful; 0 otherwise.
- Side Effects None
- Defined in
cuddCache.c
void
cuddCacheResize(
DdManager * table
)
- Resizes the cache.
- Side Effects None
- Defined in
cuddCache.c
static int
cuddCheckCollisionOrdering(
DdManager * unique,
int i,
int j
)
- Checks whether a collision list is ordered.
- Side Effects None
- Defined in
cuddTable.c
int
cuddCheckCube(
DdManager * dd,
DdNode * g
)
- Checks whether g is the BDD of a cube. Returns 1 in case
of success; 0 otherwise. The constant 1 is a valid cube, but all other
constant functions cause cuddCheckCube to return 0.
- Side Effects None
- Defined in
cuddCof.c
void
cuddClearDeathRow(
DdManager * table
)
- Clears the death row.
- Side Effects None
- See Also
Cudd_DelayedDerefBdd
Cudd_IterDerefBdd
Cudd_CheckZeroRef
cuddGarbageCollect
- Defined in
cuddRef.c
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
- Defined in
cuddCof.c
int
cuddCollectNodes(
DdNode * f,
st_table * visited
)
- Traverses the DD f and collects all its nodes in a
symbol table. f is assumed to be a regular pointer and
cuddCollectNodes guarantees this assumption in the recursive calls.
Returns 1 in case of success; 0 otherwise.
- Side Effects None
- Defined in
cuddUtil.c
int
cuddComputeFloorLog2(
unsigned int value
)
- Returns the floor of the logarithm to the base 2.
The input value is assumed to be greater than 0.
- Side Effects None
- Defined in
cuddCache.c
static int
cuddConjunctsAux(
DdManager * dd,
DdNode * f,
DdNode ** c1,
DdNode ** c2
)
- Procedure to compute two conjunctive factors of f and
place in *c1 and *c2. Sets up the required data - table of distances
from the constant and local reference count. Also minterm table.
- Defined in
cuddDecomp.c
DdNode *
cuddConstantLookup(
DdManager * table,
ptruint op,
DdNode * f,
DdNode * g,
DdNode * h
)
- Looks up in the cache for the result of op applied to f,
g, and h. Assumes that the calling procedure (e.g.,
Cudd_bddIteConstant) is only interested in whether the result is
constant or not. Returns the result if found (possibly
DD_NON_CONSTANT); otherwise it returns NULL.
- Side Effects None
- See Also
cuddCacheLookup
- Defined in
cuddCache.c
int
cuddDestroySubtables(
DdManager * unique,
int n
)
- Destroys the n most recently created subtables in a unique
table. n should be positive. The subtables should not contain any live
nodes, except the (isolated) projection function. The projection
functions are freed. Returns 1 if successful; 0 otherwise.
- Side Effects The variable map used for fast variable substitution is
destroyed if it exists. In this case the cache is also cleared.
- See Also
cuddInsertSubtables
Cudd_SetVarMap
- Defined in
cuddTable.c
static void
cuddDoRebalance(
DdNodePtr ** stack,
int stackN
)
- Rebalances a red/black tree.
- Side Effects None
- Defined in
cuddTable.c
DdNode *
cuddDynamicAllocNode(
DdManager * table
)
- Dynamically allocates a Node. This procedure is similar
to cuddAllocNode in Cudd_Table.c, but it does not attempt garbage
collection, because during reordering there are no dead nodes.
Returns a pointer to a new node if successful; NULL is memory is
full.
- Side Effects None
- See Also
cuddAllocNode
- Defined in
cuddReorder.c
static int
cuddEstimateCofactorSimple(
DdNode * node,
int i
)
- Performs the recursive step of Cudd_CofactorEstimateSimple.
Returns an estimate of the number of nodes in the DD of the positive
cofactor of node. Uses the least significant bit of the next field as
visited flag. node is supposed to be regular; the invariant is maintained
by this procedure.
- Side Effects None
- Defined in
cuddUtil.c
static int
cuddEstimateCofactor(
DdManager * dd,
st_table * table,
DdNode * node,
int i,
int phase,
DdNode ** ptr
)
- Performs the recursive step of Cudd_CofactorEstimate.
Returns an estimate of the number of nodes in the DD of a
cofactor of node. Uses the least significant bit of the next field as
visited flag. node is supposed to be regular; the invariant is maintained
by this procedure.
- Side Effects None
- Defined in
cuddUtil.c
int
cuddExact(
DdManager * table,
int lower,
int upper
)
- Exact variable ordering algorithm. Finds an optimum
order for the variables between lower and upper. Returns 1 if
successful; 0 otherwise.
- Side Effects None
- Defined in
cuddExact.c
static int
cuddFindParent(
DdManager * table,
DdNode * node
)
- Searches the subtables above node for a parent. Returns 1
as soon as one parent is found. Returns 0 is the search is fruitless.
- Side Effects None
- Defined in
cuddTable.c
void
cuddFreeTable(
DdManager * unique
)
- Frees the resources associated to a unique table.
- Side Effects None
- See Also
cuddInitTable
- Defined in
cuddTable.c
int
cuddGarbageCollect(
DdManager * unique,
int clearCache
)
- Performs garbage collection on the BDD and ZDD unique tables.
If clearCache is 0, the cache is not cleared. This should only be
specified if the cache has been cleared right before calling
cuddGarbageCollect. (As in the case of dynamic reordering.)
Returns the total number of deleted nodes.
- Side Effects None
- Defined in
cuddTable.c
int
cuddGa(
DdManager * table, manager
int lower, lowest level to be reordered
int upper highest level to be reorderded
)
- Genetic algorithm for DD reordering.
The two children of a crossover will be stored in
storedd[popsize
- Side Effects None
- Defined in
cuddGenetic.c
void
cuddGetBranches(
DdNode * g,
DdNode ** g1,
DdNode ** g0
)
- Computes the children of g.
- Side Effects None
- Defined in
cuddCof.c
static DdHashItem *
cuddHashTableAlloc(
DdHashTable * hash
)
- Fast storage allocation for items in a hash table. The
first 4 bytes of a chunk contain a pointer to the next block; the
rest contains DD_MEM_CHUNK spaces for hash items. Returns a pointer to
a new item if successful; NULL is memory is full.
- Side Effects None
- See Also
cuddAllocNode
cuddDynamicAllocNode
- Defined in
cuddLCache.c
DdHashTable *
cuddHashTableInit(
DdManager * manager,
unsigned int keySize,
unsigned int initSize
)
- Initializes a hash table. Returns a pointer to the new
table if successful; NULL otherwise.
- Side Effects None
- See Also
cuddHashTableQuit
- Defined in
cuddLCache.c
int
cuddHashTableInsert1(
DdHashTable * hash,
DdNode * f,
DdNode * value,
ptrint count
)
- Inserts an item in a hash table when the key is one pointer.
Returns 1 if successful; 0 otherwise.
- Side Effects None
- See Also
cuddHashTableInsert
cuddHashTableInsert2
cuddHashTableInsert3
cuddHashTableLookup1
- Defined in
cuddLCache.c
int
cuddHashTableInsert2(
DdHashTable * hash,
DdNode * f,
DdNode * g,
DdNode * value,
ptrint count
)
- Inserts an item in a hash table when the key is
composed of two pointers. Returns 1 if successful; 0 otherwise.
- Side Effects None
- See Also
cuddHashTableInsert
cuddHashTableInsert1
cuddHashTableInsert3
cuddHashTableLookup2
- Defined in
cuddLCache.c
int
cuddHashTableInsert3(
DdHashTable * hash,
DdNode * f,
DdNode * g,
DdNode * h,
DdNode * value,
ptrint count
)
- Inserts an item in a hash table when the key is
composed of three pointers. Returns 1 if successful; 0 otherwise.
- Side Effects None
- See Also
cuddHashTableInsert
cuddHashTableInsert1
cuddHashTableInsert2
cuddHashTableLookup3
- Defined in
cuddLCache.c
int
cuddHashTableInsert(
DdHashTable * hash,
DdNodePtr * key,
DdNode * value,
ptrint count
)
- Inserts an item in a hash table when the key has more than
three pointers. Returns 1 if successful; 0 otherwise.
- Side Effects None
- See Also
[cuddHashTableInsert1
cuddHashTableInsert2
cuddHashTableInsert3
cuddHashTableLookup
- Defined in
cuddLCache.c
DdNode *
cuddHashTableLookup1(
DdHashTable * hash,
DdNode * f
)
- Looks up a key consisting of one pointer in a hash table.
Returns the value associated to the key if there is an entry for the given
key in the table; NULL otherwise. If the entry is present, its reference
counter is decremented if not saturated. If the counter reaches 0, the
value of the entry is dereferenced, and the entry is returned to the free
list.
- Side Effects None
- See Also
cuddHashTableLookup
cuddHashTableLookup2
cuddHashTableLookup3
cuddHashTableInsert1
- Defined in
cuddLCache.c
DdNode *
cuddHashTableLookup2(
DdHashTable * hash,
DdNode * f,
DdNode * g
)
- Looks up a key consisting of two pointer in a hash table.
Returns the value associated to the key if there is an entry for the given
key in the table; NULL otherwise. If the entry is present, its reference
counter is decremented if not saturated. If the counter reaches 0, the
value of the entry is dereferenced, and the entry is returned to the free
list.
- Side Effects None
- See Also
cuddHashTableLookup
cuddHashTableLookup1
cuddHashTableLookup3
cuddHashTableInsert2
- Defined in
cuddLCache.c
DdNode *
cuddHashTableLookup3(
DdHashTable * hash,
DdNode * f,
DdNode * g,
DdNode * h
)
- Looks up a key consisting of three pointers in a hash table.
Returns the value associated to the key if there is an entry for the given
key in the table; NULL otherwise. If the entry is present, its reference
counter is decremented if not saturated. If the counter reaches 0, the
value of the entry is dereferenced, and the entry is returned to the free
list.
- Side Effects None
- See Also
cuddHashTableLookup
cuddHashTableLookup1
cuddHashTableLookup2
cuddHashTableInsert3
- Defined in
cuddLCache.c
DdNode *
cuddHashTableLookup(
DdHashTable * hash,
DdNodePtr * key
)
- Looks up a key consisting of more than three pointers
in a hash table. Returns the value associated to the key if there
is an entry for the given key in the table; NULL otherwise. If the
entry is present, its reference counter is decremented if not
saturated. If the counter reaches 0, the value of the entry is
dereferenced, and the entry is returned to the free list.
- Side Effects None
- See Also
cuddHashTableLookup1
cuddHashTableLookup2
cuddHashTableLookup3
cuddHashTableInsert
- Defined in
cuddLCache.c
void
cuddHashTableQuit(
DdHashTable * hash
)
- Shuts down a hash table, dereferencing all the values.
- Side Effects None
- See Also
cuddHashTableInit
- Defined in
cuddLCache.c
static int
cuddHashTableResize(
DdHashTable * hash
)
- Resizes a hash table. Returns 1 if successful; 0
otherwise.
- Side Effects None
- See Also
cuddHashTableInsert
- Defined in
cuddLCache.c
int
cuddHeapProfile(
DdManager * dd
)
- Prints to the manager's stdout the number of live nodes for each
level of the DD heap that contains at least one live node. It also
prints a summary containing:
- total number of tables;
- number of tables with live nodes;
- table with the largest number of live nodes;
- number of nodes in that table.
If more than one table contains the maximum number of live nodes,
only the one of lowest index is reported. Returns 1 in case of success
and 0 otherwise.
- Side Effects None
- Defined in
cuddCheck.c
int
cuddInitCache(
DdManager * unique, unique table
unsigned int cacheSize, initial size of the cache
unsigned int maxCacheSize cache size beyond which no resizing occurs
)
- Initializes the computed table. It is called by
Cudd_Init. Returns 1 in case of success; 0 otherwise.
- Side Effects None
- See Also
Cudd_Init
- Defined in
cuddCache.c
int
cuddInitInteract(
DdManager * table
)
- Initializes the interaction matrix. The interaction
matrix is implemented as a bit vector storing the upper triangle of
the symmetric interaction matrix. The bit vector is kept in an array
of long integers. The computation is based on a series of depth-first
searches, one for each root of the DAG. Two flags are needed: The
local visited flag uses the LSB of the then pointer. The global
visited flag uses the LSB of the next pointer.
Returns 1 if successful; 0 otherwise.
- Side Effects None
- Defined in
cuddInteract.c
int
cuddInitLinear(
DdManager * table
)
- Initializes the linear transform matrix. Returns 1 if
successful; 0 otherwise.
- Side Effects none
- Defined in
cuddLinear.c
DdManager *
cuddInitTable(
unsigned int numVars, Initial number of BDD variables (and subtables)
unsigned int numVarsZ, Initial number of ZDD variables (and subtables)
unsigned int numSlots, Initial size of the BDD subtables
unsigned int looseUpTo Limit for fast table growth
)
- Creates and initializes the unique table. Returns a pointer
to the table if successful; NULL otherwise.
- Side Effects None
- See Also
Cudd_Init
cuddFreeTable
- Defined in
cuddTable.c
int
cuddInsertSubtables(
DdManager * unique,
int n,
int level
)
- Inserts n new subtables in a unique table at level.
The number n should be positive, and level should be an existing level.
Returns 1 if successful; 0 otherwise.
- Side Effects None
- See Also
cuddDestroySubtables
- Defined in
cuddTable.c
int
cuddIsInDeathRow(
DdManager * dd,
DdNode * f
)
- Checks whether a node is in the death row. Returns the
position of the first occurrence if the node is present; -1
otherwise.
- Side Effects None
- See Also
Cudd_DelayedDerefBdd
cuddClearDeathRow
- Defined in
cuddRef.c
void
cuddLevelQueueDequeue(
DdLevelQueue * queue,
int level
)
- Remove an item from the front of a level queue.
- Side Effects None
- See Also
cuddLevelQueueEnqueue
- Defined in
cuddLevelQ.c
void *
cuddLevelQueueEnqueue(
DdLevelQueue * queue, level queue
void * key, key to be enqueued
int level level at which to insert
)
- Inserts a new key in a level queue. A new entry is
created in the queue only if the node is not already
enqueued. Returns a pointer to the queue item if successful; NULL
otherwise.
- Side Effects None
- See Also
cuddLevelQueueInit
cuddLevelQueueDequeue
- Defined in
cuddLevelQ.c
DdLevelQueue *
cuddLevelQueueInit(
int levels, number of levels
int itemSize, size of the item
int numBuckets initial number of hash buckets
)
- Initializes a level queue. A level queue is a queue
where inserts are based on the levels of the nodes. Within each
level the policy is FIFO. Level queues are useful in traversing a
BDD top-down. Queue items are kept in a free list when dequeued for
efficiency. Returns a pointer to the new queue if successful; NULL
otherwise.
- Side Effects None
- See Also
cuddLevelQueueQuit
cuddLevelQueueEnqueue
cuddLevelQueueDequeue
- Defined in
cuddLevelQ.c
void
cuddLevelQueueQuit(
DdLevelQueue * queue
)
- Shuts down a level queue and releases all the
associated memory.
- Side Effects None
- See Also
cuddLevelQueueInit
- Defined in
cuddLevelQ.c
int
cuddLinearAndSifting(
DdManager * table,
int lower,
int upper
)
- BDD reduction based on combination of sifting and linear
transformations. Assumes that no dead nodes are present.
- Order all the variables according to the number of entries
in each unique table.
- Sift the variable up and down, remembering each time the
total size of the DD heap. At each position, linear transformation
of the two adjacent variables is tried and is accepted if it reduces
the size of the DD.
- Select the best permutation.
- Repeat 3 and 4 for all variables.
Returns 1 if successful; 0 otherwise.
- Side Effects None
- Defined in
cuddLinear.c
int
cuddLinearInPlace(
DdManager * table,
int x,
int y
)
- Linearly combines two adjacent variables. Specifically,
replaces the top variable with the exclusive nor of the two variables.
It assumes that no dead nodes are present on entry to this
procedure. The procedure then guarantees that no dead nodes will be
present when it terminates. cuddLinearInPlace assumes that x <
y. Returns the number of keys in the table if successful; 0
otherwise.
- Side Effects The two subtables corrresponding to variables x and y are
modified. The global counters of the unique table are also affected.
- See Also
cuddSwapInPlace
- Defined in
cuddLinear.c
static void
cuddLocalCacheAddToList(
DdLocalCache * cache
)
- Inserts a local cache in the manager list.
- Side Effects None
- Defined in
cuddLCache.c
void
cuddLocalCacheClearAll(
DdManager * manager
)
- Clears the local caches of a manager.
Used before reordering.
- Side Effects None
- Defined in
cuddLCache.c
void
cuddLocalCacheClearDead(
DdManager * manager
)
- Clears the dead entries of the local caches of a manager.
Used during garbage collection.
- Side Effects None
- Defined in
cuddLCache.c
DdLocalCache *
cuddLocalCacheInit(
DdManager * manager, manager
unsigned int keySize, size of the key (number of operands)
unsigned int cacheSize, Initial size of the cache
unsigned int maxCacheSize Size of the cache beyond which no resizing occurs
)
- Initializes a computed table. Returns a pointer the
the new local cache in case of success; NULL otherwise.
- Side Effects None
- See Also
cuddInitCache
- Defined in
cuddLCache.c
void
cuddLocalCacheInsert(
DdLocalCache * cache,
DdNodePtr * key,
DdNode * value
)
- Inserts a result in a local cache.
- Side Effects None
- Defined in
cuddLCache.c
DdNode *
cuddLocalCacheLookup(
DdLocalCache * cache,
DdNodePtr * key
)
- Looks up in a local cache. Returns the result if found;
it returns NULL if no result is found.
- Side Effects None
- Defined in
cuddLCache.c
int
cuddLocalCacheProfile(
DdLocalCache * cache
)
- Computes and prints a profile of a local cache usage.
Returns 1 if successful; 0 otherwise.
- Side Effects None
- Defined in
cuddLCache.c
void
cuddLocalCacheQuit(
DdLocalCache * cache cache to be shut down
)
- Initializes the computed table. It is called by
Cudd_Init. Returns a pointer the the new local cache in case of
success; NULL otherwise.
- Side Effects None
- See Also
cuddLocalCacheInit
- Defined in
cuddLCache.c
static void
cuddLocalCacheRemoveFromList(
DdLocalCache * cache
)
- Removes a local cache from the manager list.
- Side Effects None
- Defined in
cuddLCache.c
static void
cuddLocalCacheResize(
DdLocalCache * cache
)
- Resizes a local cache.
- Side Effects None
- Defined in
cuddLCache.c
DdNode *
cuddMakeBddFromZddCover(
DdManager * dd,
DdNode * node
)
- Converts a ZDD cover to a BDD graph. If successful, it
returns a BDD node, otherwise it returns NULL. It is a recursive
algorithm as the following. First computes 3 cofactors of a ZDD cover;
f1, f0 and fd. Second, compute BDDs(b1, b0 and bd) of f1, f0 and fd.
Third, compute T=b1+bd and E=b0+bd. Fourth, compute ITE(v,T,E) where v
is the variable which has the index of the top node of the ZDD cover.
In this case, since the index of v can be larger than either one of T or
one of E, cuddUniqueInterIVO is called, here IVO stands for
independent variable ordering.
- See Also
Cudd_MakeBddFromZddCover
- Defined in
cuddZddIsop.c
static int
cuddMinHammingDistRecur(
DdNode * f,
int * minterm,
DdHashTable * table,
int upperBound
)
- Performs the recursive step of Cudd_MinHammingDist.
It is based on the following identity. Let H(f) be the
minimum Hamming distance of the minterms of f from the reference
minterm. Then:
H(f) = min(H(f0)+h0,H(f1)+h1)
where f0 and f1 are the two cofactors of f with respect to its top
variable; h0 is 1 if the minterm assigns 1 to the top variable of f;
h1 is 1 if the minterm assigns 0 to the top variable of f.
The upper bound on the distance is used to bound the depth of the
recursion.
Returns the minimum distance unless it exceeds the upper bound or
computation fails.
- Side Effects None
- See Also
Cudd_MinHammingDist
- Defined in
cuddPriority.c
int
cuddNextHigh(
DdManager * table,
int x
)
- Finds the next subtable with a larger index. Returns the
index.
- Side Effects None
- See Also
cuddNextLow
- Defined in
cuddReorder.c
int
cuddNextLow(
DdManager * table,
int x
)
- Finds the next subtable with a smaller index. Returns the
index.
- Side Effects None
- See Also
cuddNextHigh
- Defined in
cuddReorder.c
static int
cuddNodeArrayRecur(
DdNode * f,
DdNodePtr * table,
int index
)
- Performs the recursive step of cuddNodeArray. Returns
an the number of nodes in the DD. Clear the least significant bit
of the next field that was used as visited flag by
cuddNodeArrayRecur when counting the nodes. node is supposed to be
regular; the invariant is maintained by this procedure.
- Side Effects None
- Defined in
cuddUtil.c
DdNodePtr *
cuddNodeArray(
DdNode * f,
int * n
)
- Traverses the DD f and collects all its nodes in an array.
The caller should free the array returned by cuddNodeArray.
Returns a pointer to the array of nodes in case of success; NULL
otherwise. The nodes are collected in reverse topological order, so
that a node is always preceded in the array by all its descendants.
- Side Effects The number of nodes is returned as a side effect.
- See Also
Cudd_FirstNode
- Defined in
cuddUtil.c
static void
cuddOrderedInsert(
DdNodePtr * root,
DdNodePtr node
)
- Inserts a DdNode in a red/black search tree. Nodes from
the same "page" (defined by DD_PAGE_MASK) are linked in a LIFO list.
- Side Effects None
- See Also
cuddOrderedThread
- Defined in
cuddTable.c
static DdNode *
cuddOrderedThread(
DdNode * root,
DdNode * list
)
- Threads all the nodes of a search tree into a linear
list. For each node of the search tree, the "left" child, if non-null, has
a lower address than its parent, and the "right" child, if non-null, has a
higher address than its parent.
The list is sorted in order of increasing addresses. The search
tree is destroyed as a result of this operation. The last element of
the linear list is made to point to the address passed in list. Each
node if the search tree is a linearly-linked list of nodes from the
same memory page (as defined in DD_PAGE_MASK). When a node is added to
the linear list, all the elements of the linked list are added.
- Side Effects The search tree is destroyed as a result of this operation.
- See Also
cuddOrderedInsert
- Defined in
cuddTable.c
void
cuddPrintNode(
DdNode * f,
FILE * fp
)
- Prints out information on a node.
- Side Effects None
- Defined in
cuddCheck.c
void
cuddPrintVarGroups(
DdManager * dd, manager
MtrNode * root, root of the group tree
int zdd, 0: BDD; 1: ZDD
int silent flag to check tree syntax only
)
- Prints the variable groups as a parenthesized list.
For each group the level range that it represents is printed. After
each group, the group's flags are printed, preceded by a `|'. For
each flag (except MTR_TERMINAL) a character is printed.
- F: MTR_FIXED
- N: MTR_NEWNODE
- S: MTR_SOFT
The second argument, silent, if different from 0, causes
Cudd_PrintVarGroups to only check the syntax of the group tree.
- Side Effects None
- Defined in
cuddCheck.c
int
cuddP(
DdManager * dd,
DdNode * f
)
- Prints a DD to the standard output. One line per node is
printed. Returns 1 if successful; 0 otherwise.
- Side Effects None
- See Also
Cudd_PrintDebug
- Defined in
cuddUtil.c
void
cuddReclaimZdd(
DdManager * table,
DdNode * n
)
- Brings children of a dead ZDD node back.
- Side Effects None
- See Also
cuddReclaim
- Defined in
cuddRef.c
void
cuddReclaim(
DdManager * table,
DdNode * n
)
- Brings children of a dead node back.
- Side Effects None
- See Also
cuddReclaimZdd
- Defined in
cuddRef.c
void
cuddRehash(
DdManager * unique,
int i
)
- Doubles the size of a unique subtable and rehashes its
contents.
- Side Effects None
- Defined in
cuddTable.c
DdNode *
cuddRemapUnderApprox(
DdManager * dd, DD manager
DdNode * f, current DD
int numVars, maximum number of variables
int threshold, threshold under which approximation stops
double quality minimum improvement for accepted changes
)
- Applies the remapping underappoximation algorithm.
Proceeds in three phases:
- collect information on each node in the BDD; this is done via DFS.
- traverse the BDD in top-down fashion and compute for each node
whether remapping increases density.
- traverse the BDD via DFS and actually perform the elimination.
Returns the approximated BDD if successful; NULL otherwise.
- Side Effects None
- See Also
Cudd_RemapUnderApprox
- Defined in
cuddApprox.c
int
cuddResizeLinear(
DdManager * table
)
- Resizes the linear transform matrix. Returns 1 if
successful; 0 otherwise.
- Side Effects none
- Defined in
cuddLinear.c
int
cuddResizeTableZdd(
DdManager * unique,
int index
)
- Increases the number of ZDD subtables in a unique table so
that it meets or exceeds index. When new ZDD variables are created, it
is possible to preserve the functions unchanged, or it is possible to
preserve the covers unchanged, but not both. cuddResizeTableZdd preserves
the covers. Returns 1 if successful; 0 otherwise.
- Side Effects None
- See Also
ddResizeTable
- Defined in
cuddTable.c
static void
cuddRotateLeft(
DdNodePtr * nodeP
)
- Performs the left rotation for red/black trees.
- Side Effects None
- See Also
cuddRotateRight
- Defined in
cuddTable.c
static void
cuddRotateRight(
DdNodePtr * nodeP
)
- Performs the right rotation for red/black trees.
- Side Effects None
- See Also
cuddRotateLeft
- Defined in
cuddTable.c
void
cuddSetInteract(
DdManager * table,
int x,
int y
)
- Given a pair of variables 0 <= x < y < table->size,
sets the corresponding bit of the interaction matrix to 1.
- Side Effects None
- Defined in
cuddInteract.c
void
cuddShrinkDeathRow(
DdManager * table
)
- Shrinks the death row by a factor of four.
- Side Effects None
- See Also
cuddClearDeathRow
- Defined in
cuddRef.c
void
cuddShrinkSubtable(
DdManager * unique,
int i
)
- Shrinks a subtable.
- Side Effects None
- See Also
cuddRehash
- Defined in
cuddTable.c
int
cuddSifting(
DdManager * table,
int lower,
int upper
)
- Implementation of Rudell's sifting algorithm.
Assumes that no dead nodes are present.
- Order all the variables according to the number of entries
in each unique table.
- Sift the variable up and down, remembering each time the
total size of the DD heap.
- Select the best permutation.
- Repeat 3 and 4 for all variables.
Returns 1 if successful; 0 otherwise.
- Side Effects None
- Defined in
cuddReorder.c
void
cuddSlowTableGrowth(
DdManager * unique
)
- Adjusts parameters of a table to slow down its growth.
- Side Effects None
- Defined in
cuddTable.c
DdNode *
cuddSolveEqnRecur(
DdManager * bdd,
DdNode * F, the left-hand side of the equation
DdNode * Y, the cube of remaining y variables
DdNode ** G, the array of solutions
int n, number of unknowns
int * yIndex, array holding the y variable indices
int i level of recursion
)
- Implements the recursive step of Cudd_SolveEqn.
Returns NULL if the intermediate solution blows up
or reordering occurs. The parametric solutions are
stored in the array G.
- Side Effects none
- See Also
Cudd_SolveEqn
Cudd_VerifySol
- Defined in
cuddSolve.c
DdNode*
cuddSplitSetRecur(
DdManager * manager,
st_table * mtable,
int * varSeen,
DdNode * p,
double n,
double max,
int index
)
- Implements the recursive step of Cudd_SplitSet. The
procedure recursively traverses the BDD and checks to see if any
node satisfies the minterm requirements as specified by 'n'. At any
node X, n is compared to the number of minterms in the onset of X's
children. If either of the child nodes have exactly n minterms, then
that node is returned; else, if n is greater than the onset of one
of the child nodes, that node is retained and the difference in the
number of minterms is extracted from the other child. In case n
minterms can be extracted from constant 1, the algorithm returns the
result with at most log(n) nodes.
- Side Effects The array 'varSeen' is updated at every recursive call
to set the variables traversed by the procedure.
- Defined in
cuddSplit.c
enum st_retval
cuddStCountfree(
char * key,
char * value,
char * arg
)
- Frees the memory used to store the minterm counts
recorded in the visited table. Returns ST_CONTINUE.
- Side Effects None
- Defined in
cuddUtil.c
DdNode *
cuddSubsetHeavyBranch(
DdManager * dd, DD manager
DdNode * f, current DD
int numVars, maximum number of variables
int threshold threshold size for the subset
)
- Here a subset BDD is built by throwing away one of the
children. Starting at root, annotate each node with the number of
minterms (in terms of the total number of variables specified -
numVars), number of nodes taken by the DAG rooted at this node and
number of additional nodes taken by the child that has the lesser
minterms. The child with the lower number of minterms is thrown away
and a dyanmic count of the nodes of the subset is kept. Once the
threshold is reached the subset is returned to the calling
procedure.
- Side Effects None
- See Also
Cudd_SubsetHeavyBranch
- Defined in
cuddSubsetHB.c
DdNode *
cuddSubsetShortPaths(
DdManager * dd, DD manager
DdNode * f, function to be subset
int numVars, total number of variables in consideration
int threshold, maximum number of nodes allowed in the subset
int hardlimit flag determining whether thershold should be respected strictly
)
- The outermost procedure to return a subset of the given
BDD with the largest cubes. The path lengths are calculated, the maximum
allowable path length is determined and the number of nodes of this
path length that can be used to build a subset. If the threshold is
larger than the size of the original BDD, the original BDD is
returned.
- Side Effects None
- See Also
Cudd_SubsetShortPaths
- Defined in
cuddSubsetSP.c
int
cuddSwapInPlace(
DdManager * table,
int x,
int y
)
- Swaps two adjacent variables. It assumes that no dead
nodes are present on entry to this procedure. The procedure then
guarantees that no dead nodes will be present when it terminates.
cuddSwapInPlace assumes that x < y. Returns the number of keys in
the table if successful; 0 otherwise.
- Side Effects None
- Defined in
cuddReorder.c
int
cuddSwapping(
DdManager * table,
int lower,
int upper,
Cudd_ReorderingType heuristic
)
- Implementation of Plessier's algorithm that reorders
variables by a sequence of (non-adjacent) swaps.
- Select two variables (RANDOM or HEURISTIC).
- Permute these variables.
- If the nodes have decreased accept the permutation.
- Otherwise reconstruct the original heap.
- Loop.
Returns 1 in case of success; 0 otherwise.
- Side Effects None
- Defined in
cuddReorder.c
int
cuddSymmCheck(
DdManager * table,
int x,
int y
)
- Checks for symmetry of x and y. Ignores projection
functions, unless they are isolated. Returns 1 in case of symmetry; 0
otherwise.
- Side Effects None
- Defined in
cuddSymmetry.c
int
cuddSymmSiftingConv(
DdManager * table,
int lower,
int upper
)
- Symmetric sifting to convergence algorithm.
Assumes that no dead nodes are present.
- Order all the variables according to the number of entries in
each unique subtable.
- Sift the variable up and down, remembering each time the total
size of the DD heap and grouping variables that are symmetric.
- Select the best permutation.
- Repeat 3 and 4 for all variables.
- Repeat 1-4 until no further improvement.
Returns 1 plus the number of symmetric variables if successful; 0
otherwise.
- Side Effects None
- See Also
cuddSymmSifting
- Defined in
cuddSymmetry.c
int
cuddSymmSifting(
DdManager * table,
int lower,
int upper
)
- Symmetric sifting algorithm.
Assumes that no dead nodes are present.
- Order all the variables according to the number of entries in
each unique subtable.
- Sift the variable up and down, remembering each time the total
size of the DD heap and grouping variables that are symmetric.
- Select the best permutation.
- Repeat 3 and 4 for all variables.
Returns 1 plus the number of symmetric variables if successful; 0
otherwise.
- Side Effects None
- See Also
cuddSymmSiftingConv
- Defined in
cuddSymmetry.c
int
cuddTestInteract(
DdManager * table,
int x,
int y
)
- Given a pair of variables 0 <= x < y < table->size,
tests whether the corresponding bit of the interaction matrix is 1.
Returns the value of the bit.
- Side Effects None
- Defined in
cuddInteract.c
int
cuddTimesInDeathRow(
DdManager * dd,
DdNode * f
)
- Counts how many times a node is in the death row.
- Side Effects None
- See Also
Cudd_DelayedDerefBdd
cuddClearDeathRow
cuddIsInDeathRow
- Defined in
cuddRef.c
int
cuddTreeSifting(
DdManager * table, DD table
Cudd_ReorderingType method reordering method for the groups of leaves
)
- Tree sifting algorithm. Assumes that a tree representing
a group hierarchy is passed as a parameter. It then reorders each
group in postorder fashion by calling ddTreeSiftingAux. Assumes that
no dead nodes are present. Returns 1 if successful; 0 otherwise.
- Side Effects None
- Defined in
cuddGroup.c
DdNode *
cuddUnderApprox(
DdManager * dd, DD manager
DdNode * f, current DD
int numVars, maximum number of variables
int threshold, threshold under which approximation stops
int safe, enforce safe approximation
double quality minimum improvement for accepted changes
)
- Applies Tom Shiple's underappoximation algorithm. Proceeds
in three phases:
- collect information on each node in the BDD; this is done via DFS.
- traverse the BDD in top-down fashion and compute for each node
whether its elimination increases density.
- traverse the BDD via DFS and actually perform the elimination.
Returns the approximated BDD if successful; NULL otherwise.
- Side Effects None
- See Also
Cudd_UnderApprox
- Defined in
cuddApprox.c
DdNode *
cuddUniqueConst(
DdManager * unique,
CUDD_VALUE_TYPE value
)
- Checks the unique table for the existence of a constant node.
If it does not exist, it creates a new one. Does not
modify the reference count of whatever is returned. A newly created
internal node comes back with a reference count 0. Returns a
pointer to the new node.
- Side Effects None
- Defined in
cuddTable.c
DdNode *
cuddUniqueInterIVO(
DdManager * unique,
int index,
DdNode * T,
DdNode * E
)
- Wrapper for cuddUniqueInter that is independent of
variable ordering (IVO). This function does not require parameter
index to precede the indices of the top nodes of T and E in the
variable order. Returns a pointer to the result node under normal
conditions; NULL if reordering occurred or memory was exhausted.
- Side Effects None
- See Also
cuddUniqueInter
Cudd_MakeBddFromZddCover
- Defined in
cuddTable.c
DdNode *
cuddUniqueInterZdd(
DdManager * unique,
int index,
DdNode * T,
DdNode * E
)
- Checks the unique table for the existence of an internal
ZDD node. If it does not exist, it creates a new one. Does not
modify the reference count of whatever is returned. A newly created
internal node comes back with a reference count 0. For a newly
created node, increments the reference counts of what T and E point
to. Returns a pointer to the new node if successful; NULL if memory
is exhausted or if reordering took place.
- Side Effects None
- See Also
cuddUniqueInter
- Defined in
cuddTable.c
DdNode *
cuddUniqueInter(
DdManager * unique,
int index,
DdNode * T,
DdNode * E
)
- Checks the unique table for the existence of an internal
node. If it does not exist, it creates a new one. Does not
modify the reference count of whatever is returned. A newly created
internal node comes back with a reference count 0. For a newly
created node, increments the reference counts of what T and E point
to. Returns a pointer to the new node if successful; NULL if memory
is exhausted or if reordering took place.
- Side Effects None
- See Also
cuddUniqueInterZdd
- Defined in
cuddTable.c
static DdNode *
cuddUniqueLookup(
DdManager * unique,
int index,
DdNode * T,
DdNode * E
)
- Checks the unique table for the existence of an internal
node. Returns a pointer to the node if it is in the table; NULL otherwise.
- Side Effects None
- See Also
cuddUniqueInter
- Defined in
cuddUtil.c
void
cuddUpdateInteractionMatrix(
DdManager * table,
int xindex,
int yindex
)
- Updates the interaction matrix.
- Side Effects none
- Defined in
cuddLinear.c
DdNode *
cuddVerifySol(
DdManager * bdd,
DdNode * F, the left-hand side of the equation
DdNode ** G, the array of solutions
int * yIndex, array holding the y variable indices
int n number of unknowns
)
- Implements the recursive step of Cudd_VerifySol.
- Side Effects none
- See Also
Cudd_VerifySol
- Defined in
cuddSolve.c
int
cuddWindowReorder(
DdManager * table, DD table
int low, lowest index to reorder
int high, highest index to reorder
Cudd_ReorderingType submethod window reordering option
)
- Reorders by applying the method of the sliding window.
Tries all possible permutations to the variables in a window that
slides from low to high. The size of the window is determined by
submethod. Assumes that no dead nodes are present. Returns 1 in
case of success; 0 otherwise.
- Side Effects None
- Defined in
cuddWindow.c
static void
cuddXorLinear(
DdManager * table,
int x,
int y
)
- XORs two rows of the linear transform matrix and replaces
the first row with the result.
- Side Effects none
- Defined in
cuddLinear.c
int
cuddZddAlignToBdd(
DdManager * table DD manager
)
- Reorders ZDD variables according to the order of the
BDD variables. This function can be called at the end of BDD
reordering to insure that the order of the ZDD variables is
consistent with the order of the BDD variables. The number of ZDD
variables must be a multiple of the number of BDD variables. Let
M
be the ratio of the two numbers. cuddZddAlignToBdd
then considers the ZDD variables from M*i
to
(M+1)*i-1
as corresponding to BDD variable
i
. This function should be normally called from
Cudd_ReduceHeap, which clears the cache. Returns 1 in case of
success; 0 otherwise.
- Side Effects Changes the ZDD variable order for all diagrams and performs
garbage collection of the ZDD unique table.
- See Also
Cudd_zddShuffleHeap
Cudd_ReduceHeap
- Defined in
cuddZddReord.c
DdNode *
cuddZddChangeAux(
DdManager * zdd,
DdNode * P,
DdNode * zvar
)
- Performs the recursive step of Cudd_zddChange.
- Side Effects None
- Defined in
cuddZddSetop.c
DdNode *
cuddZddChange(
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. 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.
- Side Effects None
- See Also
Cudd_zddChange
- Defined in
cuddZddSetop.c
DdNode *
cuddZddComplement(
DdManager * dd,
DdNode * node
)
- Computes the complement of a ZDD node. So far, since we
couldn't find a direct way to get the complement of a ZDD cover, we first
convert a ZDD cover to a BDD, then make the complement of the ZDD cover
from the complement of the BDD node by using ISOP.
- Side Effects The result depends on current variable order.
- Defined in
cuddZddFuncs.c
static double
cuddZddCountDoubleStep(
DdNode * P,
st_table * table,
DdNode * base,
DdNode * empty
)
- Performs the recursive step of Cudd_zddCountDouble.
- Side Effects None
- Defined in
cuddZddCount.c
static int
cuddZddCountStep(
DdNode * P,
st_table * table,
DdNode * base,
DdNode * empty
)
- Performs the recursive step of Cudd_zddCount.
- Side Effects None
- Defined in
cuddZddCount.c
static int
cuddZddDagInt(
DdNode * n,
st_table * tab
)
- Performs the recursive step of Cudd_zddDagSize. Does
not check for out-of-memory conditions.
- Side Effects None
- Defined in
cuddZddMisc.c
DdNode *
cuddZddDiff(
DdManager * zdd,
DdNode * P,
DdNode * Q
)
- Performs the recursive step of Cudd_zddDiff.
- Side Effects None
- Defined in
cuddZddSetop.c
DdNode *
cuddZddDivideF(
DdManager * dd,
DdNode * f,
DdNode * g
)
- Performs the recursive step of Cudd_zddDivideF.
- Side Effects None
- See Also
Cudd_zddDivideF
- Defined in
cuddZddFuncs.c
DdNode *
cuddZddDivide(
DdManager * dd,
DdNode * f,
DdNode * g
)
- Performs the recursive step of Cudd_zddDivide.
- Side Effects None
- See Also
Cudd_zddDivide
- Defined in
cuddZddFuncs.c
void
cuddZddFreeUniv(
DdManager * zdd
)
- Frees the ZDD universe.
- Side Effects None
- See Also
cuddZddInitUniv
- Defined in
cuddInit.c
int
cuddZddGetCofactors2(
DdManager * dd,
DdNode * f,
int v,
DdNode ** f1,
DdNode ** f0
)
- Computes the two-way decomposition of f w.r.t. v.
- Side Effects The results are returned in f1 and f0.
- See Also
cuddZddGetCofactors3
- Defined in
cuddZddFuncs.c
int
cuddZddGetCofactors3(
DdManager * dd,
DdNode * f,
int v,
DdNode ** f1,
DdNode ** f0,
DdNode ** fd
)
- Computes the three-way decomposition of function f (represented
by a ZDD) wit respect to variable v. Returns 0 if successful; 1 otherwise.
- Side Effects The results are returned in f1, f0, and fd.
- See Also
cuddZddGetCofactors2
- Defined in
cuddZddFuncs.c
int
cuddZddGetNegVarIndex(
DdManager * dd,
int index
)
- Returns the index of negative ZDD variable.
- Defined in
cuddZddFuncs.c
int
cuddZddGetNegVarLevel(
DdManager * dd,
int index
)
- Returns the level of negative ZDD variable.
- Defined in
cuddZddFuncs.c
DdNode *
cuddZddGetNodeIVO(
DdManager * dd,
int index,
DdNode * g,
DdNode * h
)
- Wrapper for cuddUniqueInterZdd that is independent of
variable ordering (IVO). This function does not require parameter
index to precede the indices of the top nodes of g and h in the
variable order. Returns a pointer to the result node under normal
conditions; NULL if reordering occurred or memory was exhausted.
- Side Effects None
- See Also
cuddZddGetNode
cuddZddIsop
- Defined in
cuddTable.c
DdNode *
cuddZddGetNode(
DdManager * zdd,
int id,
DdNode * T,
DdNode * E
)
- Wrapper for cuddUniqueInterZdd, which applies the ZDD
reduction rule. Returns a pointer to the result node under normal
conditions; NULL if reordering occurred or memory was exhausted.
- Side Effects None
- See Also
cuddUniqueInterZdd
- Defined in
cuddTable.c
int
cuddZddGetPosVarIndex(
DdManager * dd,
int index
)
- Returns the index of positive ZDD variable.
- Defined in
cuddZddFuncs.c
int
cuddZddGetPosVarLevel(
DdManager * dd,
int index
)
- Returns the level of positive ZDD variable.
- Defined in
cuddZddFuncs.c
int
cuddZddInitUniv(
DdManager * zdd
)
- Initializes the ZDD universe. Returns 1 if successful; 0
otherwise.
- Side Effects None
- See Also
cuddZddFreeUniv
- Defined in
cuddInit.c
DdNode *
cuddZddIntersect(
DdManager * zdd,
DdNode * P,
DdNode * Q
)
- Performs the recursive step of Cudd_zddIntersect.
- Side Effects None
- Defined in
cuddZddSetop.c
DdNode *
cuddZddIsop(
DdManager * dd,
DdNode * L,
DdNode * U,
DdNode ** zdd_I
)
- Performs the recursive step of Cudd_zddIsop.
- Side Effects None
- See Also
Cudd_zddIsop
- Defined in
cuddZddIsop.c
DdNode *
cuddZddIte(
DdManager * dd,
DdNode * f,
DdNode * g,
DdNode * h
)
- Performs the recursive step of Cudd_zddIte.
- Side Effects None
- Defined in
cuddZddSetop.c
static int
cuddZddLinearAux(
DdManager * table,
int x,
int xLow,
int xHigh
)
- Given xLow <= x <= xHigh moves x up and down between the
boundaries. Finds the best position and does the required changes.
Returns 1 if successful; 0 otherwise.
- Side Effects None
- Defined in
cuddZddLin.c
static int
cuddZddLinearBackward(
DdManager * table,
int size,
Move * moves
)
- Given a set of moves, returns the ZDD heap to the
position giving the minimum size. In case of ties, returns to the
closest position giving the minimum size. Returns 1 in case of
success; 0 otherwise.
- Side Effects None
- Defined in
cuddZddLin.c
static Move *
cuddZddLinearDown(
DdManager * table,
int x,
int xHigh,
Move * prevMoves
)
- Sifts a variable down. Moves x down until either it
reaches the bound (xHigh) or the size of the ZDD heap increases too
much. Returns the set of moves in case of success; NULL if memory is
full.
- Side Effects None
- Defined in
cuddZddLin.c
static int
cuddZddLinearInPlace(
DdManager * table,
int x,
int y
)
- Linearly combines two adjacent variables. It assumes
that no dead nodes are present on entry to this procedure. The
procedure then guarantees that no dead nodes will be present when it
terminates. cuddZddLinearInPlace assumes that x < y. Returns the
number of keys in the table if successful; 0 otherwise.
- Side Effects None
- See Also
cuddZddSwapInPlace
cuddLinearInPlace
- Defined in
cuddZddLin.c
int
cuddZddLinearSifting(
DdManager * table,
int lower,
int upper
)
- Implementation of the linear sifting algorithm for ZDDs.
Assumes that no dead nodes are present.
- Order all the variables according to the number of entries
in each unique table.
- Sift the variable up and down and applies the XOR transformation,
remembering each time the total size of the DD heap.
- Select the best permutation.
- Repeat 3 and 4 for all variables.
Returns 1 if successful; 0 otherwise.
- Side Effects None
- Defined in
cuddZddLin.c
static Move *
cuddZddLinearUp(
DdManager * table,
int y,
int xLow,
Move * prevMoves
)
- Sifts a variable up applying the XOR
transformation. Moves y up until either it reaches the bound (xLow)
or the size of the ZDD heap increases too much. Returns the set of
moves in case of success; NULL if memory is full.
- Side Effects None
- Defined in
cuddZddLin.c
int
cuddZddNextHigh(
DdManager * table,
int x
)
- Finds the next subtable with a larger index. Returns the
index.
- Side Effects None
- Defined in
cuddZddReord.c
int
cuddZddNextLow(
DdManager * table,
int x
)
- Finds the next subtable with a smaller index. Returns the
index.
- Side Effects None
- Defined in
cuddZddReord.c
DdNode *
cuddZddProduct(
DdManager * dd,
DdNode * f,
DdNode * g
)
- Performs the recursive step of Cudd_zddProduct.
- Side Effects None
- See Also
Cudd_zddProduct
- Defined in
cuddZddFuncs.c
int
cuddZddP(
DdManager * zdd,
DdNode * f
)
- Prints a ZDD to the standard output. One line per node is
printed. Returns 1 if successful; 0 otherwise.
- Side Effects None
- See Also
Cudd_zddPrintDebug
- Defined in
cuddZddUtil.c
static int
cuddZddSiftingAux(
DdManager * table,
int x,
int x_low,
int x_high
)
- Given xLow <= x <= xHigh moves x up and down between the
boundaries. Finds the best position and does the required changes.
Returns 1 if successful; 0 otherwise.
- Side Effects None
- Defined in
cuddZddReord.c
static int
cuddZddSiftingBackward(
DdManager * table,
Move * moves,
int size
)
- Given a set of moves, returns the ZDD heap to the
position giving the minimum size. In case of ties, returns to the
closest position giving the minimum size. Returns 1 in case of
success; 0 otherwise.
- Side Effects None
- Defined in
cuddZddReord.c
static Move *
cuddZddSiftingDown(
DdManager * table,
int x,
int x_high,
int initial_size
)
- Sifts a variable down. Moves x down until either it
reaches the bound (x_high) or the size of the ZDD heap increases too
much. Returns the set of moves in case of success; NULL if memory is
full.
- Side Effects None
- Defined in
cuddZddReord.c
static Move *
cuddZddSiftingUp(
DdManager * table,
int x,
int x_low,
int initial_size
)
- Sifts a variable up. Moves y up until either it reaches
the bound (x_low) or the size of the ZDD heap increases too much.
Returns the set of moves in case of success; NULL if memory is full.
- Side Effects None
- Defined in
cuddZddReord.c
int
cuddZddSifting(
DdManager * table,
int lower,
int upper
)
- Implementation of Rudell's sifting algorithm.
Assumes that no dead nodes are present.
- Order all the variables according to the number of entries
in each unique table.
- Sift the variable up and down, remembering each time the
total size of the DD heap.
- Select the best permutation.
- Repeat 3 and 4 for all variables.
Returns 1 if successful; 0 otherwise.
- Side Effects None
- Defined in
cuddZddReord.c
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. Returns a pointer to
the result if successful; NULL otherwise. 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.
- Side Effects None
- See Also
cuddZddSubset1
Cudd_zddSubset0
- Defined in
cuddZddSetop.c
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. Returns a pointer to
the result if successful; NULL otherwise. 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.
- Side Effects None
- See Also
cuddZddSubset0
Cudd_zddSubset1
- Defined in
cuddZddSetop.c
int
cuddZddSwapInPlace(
DdManager * table,
int x,
int y
)
- Swaps two adjacent variables. It assumes that no dead
nodes are present on entry to this procedure. The procedure then
guarantees that no dead nodes will be present when it terminates.
cuddZddSwapInPlace assumes that x < y. Returns the number of keys in
the table if successful; 0 otherwise.
- Side Effects None
- Defined in
cuddZddReord.c
int
cuddZddSwapping(
DdManager * table,
int lower,
int upper,
Cudd_ReorderingType heuristic
)
- Implementation of Plessier's algorithm that reorders
variables by a sequence of (non-adjacent) swaps.
- Select two variables (RANDOM or HEURISTIC).
- Permute these variables.
- If the nodes have decreased accept the permutation.
- Otherwise reconstruct the original heap.
- Loop.
Returns 1 in case of success; 0 otherwise.
- Side Effects None
- Defined in
cuddZddReord.c
int
cuddZddSymmCheck(
DdManager * table,
int x,
int y
)
- Checks for symmetry of x and y. Ignores projection
functions, unless they are isolated. Returns 1 in case of
symmetry; 0 otherwise.
- Side Effects None
- Defined in
cuddZddSymm.c
static int
cuddZddSymmSiftingAux(
DdManager * table,
int x,
int x_low,
int x_high
)
- Given x_low <= x <= x_high moves x up and down between the
boundaries. Finds the best position and does the required changes.
Assumes that x is not part of a symmetry group. Returns 1 if
successful; 0 otherwise.
- Side Effects None
- Defined in
cuddZddSymm.c
static int
cuddZddSymmSiftingBackward(
DdManager * table,
Move * moves,
int size
)
- Given a set of moves, returns the ZDD heap to the
position giving the minimum size. In case of ties, returns to the
closest position giving the minimum size. Returns 1 in case of
success; 0 otherwise.
- Side Effects None
- Defined in
cuddZddSymm.c
static int
cuddZddSymmSiftingConvAux(
DdManager * table,
int x,
int x_low,
int x_high
)
- Given x_low <= x <= x_high moves x up and down between the
boundaries. Finds the best position and does the required changes.
Assumes that x is either an isolated variable, or it is the bottom of
a symmetry group. All symmetries may not have been found, because of
exceeded growth limit. Returns 1 if successful; 0 otherwise.
- Side Effects None
- Defined in
cuddZddSymm.c
int
cuddZddSymmSiftingConv(
DdManager * table,
int lower,
int upper
)
- Symmetric sifting to convergence algorithm for ZDDs.
Assumes that no dead nodes are present.
- Order all the variables according to the number of entries in
each unique subtable.
- Sift the variable up and down, remembering each time the total
size of the ZDD heap and grouping variables that are symmetric.
- Select the best permutation.
- Repeat 3 and 4 for all variables.
- Repeat 1-4 until no further improvement.
Returns 1 plus the number of symmetric variables if successful; 0
otherwise.
- Side Effects None
- See Also
cuddZddSymmSifting
- Defined in
cuddZddSymm.c
static Move *
cuddZddSymmSifting_down(
DdManager * table,
int x,
int x_high,
int initial_size
)
- Moves x down until either it reaches the bound (x_high)
or the size of the ZDD heap increases too much. Assumes that x is the
bottom of a symmetry group. Checks x for symmetry to the adjacent
variables. If symmetry is found, the symmetry group of x is merged
with the symmetry group of the other variable. Returns the set of
moves in case of success; ZDD_MV_OOM if memory is full.
- Side Effects None
- Defined in
cuddZddSymm.c
static Move *
cuddZddSymmSifting_up(
DdManager * table,
int x,
int x_low,
int initial_size
)
- Moves x up until either it reaches the bound (x_low) or
the size of the ZDD heap increases too much. Assumes that x is the top
of a symmetry group. Checks x for symmetry to the adjacent
variables. If symmetry is found, the symmetry group of x is merged
with the symmetry group of the other variable. Returns the set of
moves in case of success; ZDD_MV_OOM if memory is full.
- Side Effects None
- Defined in
cuddZddSymm.c
int
cuddZddSymmSifting(
DdManager * table,
int lower,
int upper
)
- Symmetric sifting algorithm.
Assumes that no dead nodes are present.
- Order all the variables according to the number of entries in
each unique subtable.
- Sift the variable up and down, remembering each time the total
size of the ZDD heap and grouping variables that are symmetric.
- Select the best permutation.
- Repeat 3 and 4 for all variables.
Returns 1 plus the number of symmetric variables if successful; 0
otherwise.
- Side Effects None
- See Also
cuddZddSymmSiftingConv
- Defined in
cuddZddSymm.c
static void
cuddZddSymmSummary(
DdManager * table,
int lower,
int upper,
int * symvars,
int * symgroups
)
- Counts numbers of symmetric variables and symmetry
groups.
- Side Effects None
- Defined in
cuddZddSymm.c
int
cuddZddTreeSifting(
DdManager * table, DD table
Cudd_ReorderingType method reordering method for the groups of leaves
)
- Tree sifting algorithm for ZDDs. Assumes that a tree
representing a group hierarchy is passed as a parameter. It then
reorders each group in postorder fashion by calling
zddTreeSiftingAux. Assumes that no dead nodes are present. Returns
1 if successful; 0 otherwise.
- Side Effects None
- Defined in
cuddZddGroup.c
DdNode *
cuddZddUnateProduct(
DdManager * dd,
DdNode * f,
DdNode * g
)
- Performs the recursive step of Cudd_zddUnateProduct.
- Side Effects None
- See Also
Cudd_zddUnateProduct
- Defined in
cuddZddFuncs.c
static Move*
cuddZddUndoMoves(
DdManager * table,
Move * moves
)
- Given a set of moves, returns the ZDD heap to the
order in effect before the moves. Returns 1 in case of success;
0 otherwise.
- Side Effects None
- Defined in
cuddZddLin.c
DdNode *
cuddZddUnion(
DdManager * zdd,
DdNode * P,
DdNode * Q
)
- Performs the recursive step of Cudd_zddUnion.
- Side Effects None
- Defined in
cuddZddSetop.c
int
cuddZddUniqueCompare(
int * ptr_x,
int * ptr_y
)
- Comparison function used by qsort to order the
variables according to the number of keys in the subtables.
Returns the difference in number of keys between the two
variables being compared.
- Side Effects None
- Defined in
cuddZddReord.c
DdNode *
cuddZddWeakDivF(
DdManager * dd,
DdNode * f,
DdNode * g
)
- Performs the recursive step of Cudd_zddWeakDivF.
- Side Effects None
- See Also
Cudd_zddWeakDivF
- Defined in
cuddZddFuncs.c
DdNode *
cuddZddWeakDiv(
DdManager * dd,
DdNode * f,
DdNode * g
)
- Performs the recursive step of Cudd_zddWeakDiv.
- Side Effects None
- See Also
Cudd_zddWeakDiv
- Defined in
cuddZddFuncs.c
static DdNode *
ddBddToAddRecur(
DdManager * dd,
DdNode * B
)
- Performs the recursive step for Cudd_BddToAdd. Returns a
pointer to the resulting ADD if successful; NULL otherwise.
- Side Effects None
- Defined in
cuddBridge.c
static int
ddCheckPermuation(
DdManager * table,
MtrNode * treenode,
int * perm,
int * invperm
)
- Checks the BDD variable group tree before a shuffle.
Returns 1 if successful; 0 otherwise.
- Side Effects Changes the BDD variable group tree.
- Defined in
cuddReorder.c
static void
ddClearFlag(
DdNode * f
)
- Performs a DFS from f, clearing the LSB of the next
pointers.
- Side Effects None
- See Also
ddSupportStep
ddDagInt
- Defined in
cuddUtil.c
static void
ddClearGlobal(
DdManager * table,
int lower,
int maxlevel
)
- Scans the DD and clears the LSB of the next pointers.
The LSB of the next pointers are used as markers to tell whether a
node was reached. Once the roots are counted, these flags are
reset.
- Side Effects None
- See Also
ddCountRoots
- Defined in
cuddExact.c
static void
ddClearGlobal(
DdManager * table
)
- The LSB of the next pointers are used as markers to tell
whether a node was reached by at least one DFS. Once the interaction
matrix is built, these flags are reset.
- Side Effects None
- Defined in
cuddInteract.c
static void
ddClearLocal(
DdNode * f
)
- Performs a DFS from f, clearing the LSB of the then pointers.
- Side Effects None
- Defined in
cuddInteract.c
static double *
ddCofMintermAux(
DdManager * dd,
DdNode * node,
st_table * table
)
- Traverses the DD node and computes the fraction of
minterms in the on-set of all positive cofactors simultaneously.
It allocates an array with two more entries than there are
variables below the one labeling the node. One extra entry (the
first in the array) is for the variable labeling the node. The other
entry (the last one in the array) holds the fraction of minterms of
the function rooted at node. Each other entry holds the value for
one cofactor. The array is put in a symbol table, to avoid repeated
computation, and its address is returned by the procedure, for use
by the caller. Returns a pointer to the array of cofactor measures.
- Side Effects None
- Defined in
cuddSign.c
static int
ddCountInternalMtrNodes(
DdManager * table,
MtrNode * treenode
)
- Counts the number of internal nodes of the group tree.
Returns the count.
- Side Effects None
- Defined in
cuddGroup.c
static double
ddCountMintermAux(
DdNode * node,
double max,
DdHashTable * table
)
- Performs the recursive step of Cudd_CountMinterm.
It is based on the following identity. Let |f| be the
number of minterms of f. Then:
|f| = (|f0|+|f1|)/2
where f0 and f1 are the two cofactors of f. Does not use the
identity |f'| = max - |f|, to minimize loss of accuracy due to
roundoff. Returns the number of minterms of the function rooted at
node.
- Side Effects None
- Defined in
cuddUtil.c
static double
ddCountPathAux(
DdNode * node,
st_table * table
)
- Performs the recursive step of Cudd_CountPath.
It is based on the following identity. Let |f| be the
number of paths of f. Then:
|f| = |f0|+|f1|
where f0 and f1 are the two cofactors of f. Uses the
identity |f'| = |f|, to improve the utilization of the (local) cache.
Returns the number of paths of the function rooted at node.
- Side Effects None
- Defined in
cuddUtil.c
static double
ddCountPathsToNonZero(
DdNode * N,
st_table * table
)
- Performs the recursive step of Cudd_CountPathsToNonZero.
It is based on the following identity. Let |f| be the
number of paths of f. Then:
|f| = |f0|+|f1|
where f0 and f1 are the two cofactors of f. Returns the number of
paths of the function rooted at node.
- Side Effects None
- Defined in
cuddUtil.c
static int
ddCountRoots(
DdManager * table,
int lower,
int upper
)
- Counts the number of roots at the levels between lower and
upper. The computation is based on breadth-first search.
A node is a root if it is not reachable from any previously visited node.
(All the nodes at level lower are therefore considered roots.)
The visited flag uses the LSB of the next pointer. Returns the root
count. The roots that are constant nodes are always ignored.
- Side Effects None
- See Also
ddClearGlobal
- Defined in
cuddExact.c
static void
ddCreateGroup(
DdManager * table,
int x,
int y
)
- Creates a group encompassing variables from x to y in the
DD table. In the current implementation it must be y == x+1.
Returns 1 in case of success; 0 otherwise.
- Side Effects None
- Defined in
cuddGroup.c
static int
ddDagInt(
DdNode * n
)
- Performs the recursive step of Cudd_DagSize. Returns the
number of nodes in the graph rooted at n.
- Side Effects None
- Defined in
cuddUtil.c
static void
ddDissolveGroup(
DdManager * table,
int x,
int y
)
- x and y are variables in a group to be cut in two. The cut
is to pass between x and y.
- Side Effects None
- Defined in
cuddGroup.c
static int
ddDoDumpBlif(
DdManager * dd,
DdNode * f,
FILE * fp,
st_table * visited,
char ** names,
int mv
)
- Performs the recursive step of Cudd_DumpBlif. Traverses
the BDD f and writes a multiplexer-network description to the file
pointed by fp in blif format. f is assumed to be a regular pointer
and ddDoDumpBlif guarantees this assumption in the recursive calls.
- Side Effects None
- Defined in
cuddExport.c
static int
ddDoDumpDDcal(
DdManager * dd,
DdNode * f,
FILE * fp,
st_table * visited,
char ** names,
unsigned long mask
)
- Performs the recursive step of Cudd_DumpDDcal. Traverses
the BDD f and writes a line for each node to the file
pointed by fp in DDcal format. f is assumed to be a regular pointer
and ddDoDumpDDcal guarantees this assumption in the recursive calls.
- Side Effects None
- Defined in
cuddExport.c
static int
ddDoDumpDaVinci(
DdManager * dd,
DdNode * f,
FILE * fp,
st_table * visited,
char ** names,
unsigned long mask
)
- Performs the recursive step of Cudd_DumpDaVinci. Traverses
the BDD f and writes a term expression to the file
pointed by fp in daVinci format. f is assumed to be a regular pointer
and ddDoDumpDaVinci guarantees this assumption in the recursive calls.
- Side Effects None
- Defined in
cuddExport.c
static int
ddDoDumpFactoredForm(
DdManager * dd,
DdNode * f,
FILE * fp,
char ** names
)
- Performs the recursive step of
Cudd_DumpFactoredForm. Traverses the BDD f and writes a factored
form for each node to the file pointed by fp in terms of the
factored forms of the children. Constants are propagated, and
absorption is applied. f is assumed to be a regular pointer and
ddDoDumpFActoredForm guarantees this assumption in the recursive
calls.
- Side Effects None
- See Also
Cudd_DumpFactoredForm
- Defined in
cuddExport.c
static int
ddEpdCountMintermAux(
DdNode * node,
EpDouble * max,
EpDouble * epd,
st_table * table
)
- Performs the recursive step of Cudd_EpdCountMinterm.
It is based on the following identity. Let |f| be the
number of minterms of f. Then:
|f| = (|f0|+|f1|)/2
where f0 and f1 are the two cofactors of f. Does not use the
identity |f'| = max - |f|, to minimize loss of accuracy due to
roundoff. Returns the number of minterms of the function rooted at
node.
- Side Effects None
- Defined in
cuddUtil.c
static enum st_retval
ddEpdFree(
char * key,
char * value,
char * arg
)
- Frees the memory used to store the minterm counts
recorded in the visited table. Returns ST_CONTINUE.
- Side Effects None
- Defined in
cuddUtil.c
static int
ddExchange(
DdManager * table,
int x,
int y,
double temp
)
- This is the same funcion as ddSwapping except for
comparison expression. Use probability function, exp(-size_change/temp).
- Side Effects None
- Defined in
cuddAnneal.c
static int
ddExtSymmCheck(
DdManager * table,
int x,
int y
)
- Checks for extended symmetry of x and y. Returns 1 in
case of extended symmetry; 0 otherwise.
- Side Effects None
- Defined in
cuddGroup.c
static DdNode *
ddFindEssentialRecur(
DdManager * dd,
DdNode * f
)
- Implements the recursive step of Cudd_FindEssential.
Returns a pointer to the cube BDD if successful; NULL otherwise.
- Side Effects None
- Defined in
cuddEssent.c
static void
ddFindNodeHiLo(
DdManager * table,
MtrNode * treenode,
int * lower,
int * upper
)
- Finds the lower and upper bounds of the group
represented by treenode. From the index and size fields we need to
derive the current positions, and find maximum and minimum.
- Side Effects The bounds are returned as side effects.
- Defined in
cuddGroup.c
static DdTlcInfo *
ddFindTwoLiteralClausesRecur(
DdManager * dd,
DdNode * f,
st_table * table
)
- Implements the recursive step of
Cudd_FindTwoLiteralClauses. The DD node is assumed to be not
constant. Returns a pointer to a set of clauses if successful; NULL
otherwise.
- Side Effects None
- See Also
Cudd_FindTwoLiteralClauses
- Defined in
cuddEssent.c
static void
ddFixLimits(
DdManager * unique
)
- Adjusts the values of table fields controlling the.
sizes of subtables and computed table. If the computed table is too small
according to the new values, it is resized.
- Side Effects Modifies manager fields. May resize computed table.
- Defined in
cuddTable.c
static int
ddGroupMoveBackward(
DdManager * table,
int x,
int y
)
- Undoes the swap two groups. Returns 1 in case of
success; 0 otherwise.
- Side Effects None
- Defined in
cuddGroup.c
static int
ddGroupMove(
DdManager * table,
int x,
int y,
Move ** moves
)
- Swaps two groups and records the move. Returns the
number of keys in the DD table in case of success; 0 otherwise.
- Side Effects None
- Defined in
cuddGroup.c
static int
ddGroupSiftingAux(
DdManager * table,
int x,
int xLow,
int xHigh,
DD_CHKFP checkFunction,
int lazyFlag
)
- Sifts one variable up and down until it has taken all
positions. Checks for aggregation. There may be at most two sweeps,
even if the group grows. Assumes that x is either an isolated
variable, or it is the bottom of a group. All groups may not have
been found. The variable being moved is returned to the best position
seen during sifting. Returns 1 in case of success; 0 otherwise.
- Side Effects None
- Defined in
cuddGroup.c
static int
ddGroupSiftingBackward(
DdManager * table,
Move * moves,
int size,
int upFlag,
int lazyFlag
)
- Determines the best position for a variables and returns
it there. Returns 1 in case of success; 0 otherwise.
- Side Effects None
- Defined in
cuddGroup.c
static int
ddGroupSiftingDown(
DdManager * table,
int x,
int xHigh,
DD_CHKFP checkFunction,
Move ** moves
)
- Sifts down a variable until it reaches position xHigh.
Assumes that x is the bottom of a group (or a singleton). Records
all the moves. Returns 1 in case of success; 0 otherwise.
- Side Effects None
- Defined in
cuddGroup.c
static int
ddGroupSiftingUp(
DdManager * table,
int y,
int xLow,
DD_CHKFP checkFunction,
Move ** moves
)
- Sifts up a variable until either it reaches position
xLow or the size of the DD heap increases too much. Assumes that y is
the top of a group (or a singleton). Checks y for aggregation to the
adjacent variables. Records all the moves that are appended to the
list of moves received as input and returned as a side effect.
Returns 1 in case of success; 0 otherwise.
- Side Effects None
- Defined in
cuddGroup.c
static int
ddGroupSifting(
DdManager * table,
int lower,
int upper,
DD_CHKFP checkFunction,
int lazyFlag
)
- Sifts from treenode->low to treenode->high. If
croupcheck == CUDD_GROUP_CHECK7, it checks for group creation at the
end of the initial sifting. If a group is created, it is then sifted
again. After sifting one variable, the group that contains it is
dissolved. Returns 1 in case of success; 0 otherwise.
- Side Effects None
- Defined in
cuddGroup.c
static int
ddIsIthAddVarPair(
DdManager * dd,
DdNode * f,
DdNode * g,
unsigned int i
)
- Comparison of a pair of functions to the i-th ADD
variable. Returns 1 if the functions are the i-th ADD variable and its
complement; 0 otherwise.
- Side Effects None
- Defined in
cuddCompose.c
static int
ddIsIthAddVar(
DdManager * dd,
DdNode * f,
unsigned int i
)
- Comparison of a function to the i-th ADD variable. Returns 1 if
the function is the i-th ADD variable; 0 otherwise.
- Side Effects None
- Defined in
cuddCompose.c
static int
ddIsVarHandled(
DdManager * dd,
int index
)
- Checks whether a variables is already handled. This
function is used for lazy sifting.
- Side Effects none
- Defined in
cuddGroup.c
static int
ddJumpingAux(
DdManager * table,
int x,
int x_low,
int x_high,
double temp
)
- If x==x_low, it executes jumping_down. If x==x_high, it
executes jumping_up. This funcion is similar to ddSiftingAux. Returns
1 in case of success; 0 otherwise.
- Side Effects None
- Defined in
cuddAnneal.c
static Move *
ddJumpingDown(
DdManager * table,
int x,
int x_high,
int initial_size
)
- This is a simplified version of ddSiftingDown. It does not
use lower bounding. Returns the set of moves in case of success; NULL
if memory is full.
- Side Effects None
- Defined in
cuddAnneal.c
static Move *
ddJumpingUp(
DdManager * table,
int x,
int x_low,
int initial_size
)
- This is a simplified version of ddSiftingUp. It does not
use lower bounding. Returns the set of moves in case of success; NULL
if memory is full.
- Side Effects None
- Defined in
cuddAnneal.c
static unsigned int
ddLCHash(
DdNodePtr * key,
unsigned int keysize,
int shift
)
- Computes the hash value for a local cache. Returns the
bucket index.
- Side Effects None
- Defined in
cuddLCache.c
static int
ddLeavesInt(
DdNode * n
)
- Performs the recursive step of Cudd_CountLeaves. Returns
the number of leaves in the DD rooted at n.
- Side Effects None
- See Also
Cudd_CountLeaves
- Defined in
cuddUtil.c
static int
ddLinearAndSiftingAux(
DdManager * table,
int x,
int xLow,
int xHigh
)
- Given xLow <= x <= xHigh moves x up and down between the
boundaries. At each step a linear transformation is tried, and, if it
decreases the size of the DD, it is accepted. Finds the best position
and does the required changes. Returns 1 if successful; 0 otherwise.
- Side Effects None
- Defined in
cuddLinear.c
static int
ddLinearAndSiftingBackward(
DdManager * table,
int size,
Move * moves
)
- Given a set of moves, returns the DD heap to the
position giving the minimum size. In case of ties, returns to the
closest position giving the minimum size. Returns 1 in case of
success; 0 otherwise.
- Side Effects None
- Defined in
cuddLinear.c
static Move *
ddLinearAndSiftingDown(
DdManager * table,
int x,
int xHigh,
Move * prevMoves
)
- Sifts a variable down and applies linear
transformations. Moves x down until either it reaches the bound
(xHigh) or the size of the DD heap increases too much. Returns the
set of moves in case of success; NULL if memory is full.
- Side Effects None
- Defined in
cuddLinear.c
static Move *
ddLinearAndSiftingUp(
DdManager * table,
int y,
int xLow,
Move * prevMoves
)
- Sifts a variable up and applies linear transformations.
Moves y up until either it reaches the bound (xLow) or the size of
the DD heap increases too much. Returns the set of moves in case of
success; NULL if memory is full.
- Side Effects None
- Defined in
cuddLinear.c
static int
ddLinearUniqueCompare(
int * ptrX,
int * ptrY
)
- Comparison function used by qsort to order the
variables according to the number of keys in the subtables.
Returns the difference in number of keys between the two
variables being compared.
- Side Effects None
- Defined in
cuddLinear.c
static void
ddMergeGroups(
DdManager * table,
MtrNode * treenode,
int low,
int high
)
- Creates a single group from low to high and adjusts the
index field of the tree node.
- Side Effects None
- Defined in
cuddGroup.c
static int
ddNoCheck(
DdManager * table,
int x,
int y
)
- Pretends to check two variables for aggregation. Always
returns 0.
- Side Effects None
- Defined in
cuddGroup.c
static void
ddPatchTree(
DdManager * dd,
MtrNode * treenode
)
- Fixes a variable tree after the insertion of new subtables.
After such an insertion, the low fields of the tree below the insertion
point are inconsistent.
- Side Effects None
- Defined in
cuddTable.c
static int
ddPermuteWindow3(
DdManager * table,
int x
)
- Tries all the permutations of the three variables between
x and x+2 and retains the best. Assumes that no dead nodes are
present. Returns the index of the best permutation (1-6) in case of
success; 0 otherwise.Assumes that no dead nodes are present. Returns
the index of the best permutation (1-6) in case of success; 0
otherwise.
- Side Effects None
- Defined in
cuddWindow.c
static int
ddPermuteWindow4(
DdManager * table,
int w
)
- Tries all the permutations of the four variables between
w and w+3 and retains the best. Assumes that no dead nodes are
present. Returns the index of the best permutation (1-24) in case of
success; 0 otherwise.
- Side Effects None
- Defined in
cuddWindow.c
static int
ddPickArbitraryMinterms(
DdManager * dd,
DdNode * node,
int nvars,
int nminterms,
char ** string
)
- Performs the recursive step of Cudd_bddPickArbitraryMinterms.
Returns 1 if successful; 0 otherwise.
- Side Effects none
- See Also
Cudd_bddPickArbitraryMinterms
- Defined in
cuddUtil.c
static int
ddPickRepresentativeCube(
DdManager * dd,
DdNode * node,
double * weight,
char * string
)
- Finds a representative cube of a BDD with the weight of
each variable. From the top variable, if the weight is greater than or
equal to 0.0, choose THEN branch unless the child is the constant 0.
Otherwise, choose ELSE branch unless the child is the constant 0.
- Side Effects Cudd_SubsetWithMaskVars Cudd_bddPickOneCube
- Defined in
cuddUtil.c
static void
ddPrintMintermAux(
DdManager * dd, manager
DdNode * node, current node
int * list current recursion path
)
- Performs the recursive step of Cudd_PrintMinterm.
- Side Effects None
- Defined in
cuddUtil.c
static void
ddRehashZdd(
DdManager * unique,
int i
)
- Rehashes a ZDD unique subtable.
- Side Effects None
- See Also
cuddRehash
- Defined in
cuddTable.c
static int
ddReorderChildren(
DdManager * table,
MtrNode * treenode,
Cudd_ReorderingType method
)
- Reorders the children of a group tree node according to
the options. After reordering puts all the variables in the group
and/or its descendents in a single group. This allows hierarchical
reordering. If the variables in the group do not exist yet, simply
does nothing. Returns 1 if successful; 0 otherwise.
- Side Effects None
- Defined in
cuddGroup.c
static int
ddReorderPostprocess(
DdManager * table
)
- Cleans up at the end of reordering.
- Side Effects None
- Defined in
cuddReorder.c
static int
ddReorderPreprocess(
DdManager * table
)
- Prepares the DD heap for dynamic reordering. Does
garbage collection, to guarantee that there are no dead nodes;
clears the cache, which is invalidated by dynamic reordering; initializes
the number of isolated projection functions; and initializes the
interaction matrix. Returns 1 in case of success; 0 otherwise.
- Side Effects None
- Defined in
cuddReorder.c
static void
ddReportRefMess(
DdManager * unique, manager
int i, table in which the problem occurred
const char * caller procedure that detected the problem
)
- Reports problem in garbage collection.
- Side Effects None
- See Also
cuddGarbageCollect
cuddGarbageCollectZdd
- Defined in
cuddTable.c
static int
ddResetVarHandled(
DdManager * dd,
int index
)
- Resets a variable to be processed. This function is used
for lazy sifting.
- Side Effects none
- Defined in
cuddGroup.c
static int
ddResizeTable(
DdManager * unique,
int index
)
- Increases the number of subtables in a unique table so
that it meets or exceeds index. Returns 1 if successful; 0 otherwise.
- Side Effects None
- See Also
cuddResizeTableZdd
- Defined in
cuddTable.c
static int
ddSecDiffCheck(
DdManager * table,
int x,
int y
)
- Checks two variables for aggregation. The check is based
on the second difference of the number of nodes as a function of the
layer. If the second difference is lower than a given threshold
(typically negative) then the two variables should be aggregated.
Returns 1 if the two variables pass the test; 0 otherwise.
- Side Effects None
- Defined in
cuddGroup.c
static int
ddSetVarHandled(
DdManager * dd,
int index
)
- Sets a variable to already handled. This function is used
for lazy sifting.
- Side Effects none
- Defined in
cuddGroup.c
static int
ddShuffle(
DdManager * table,
DdHalfWord * permutation,
int lower,
int upper
)
- Reorders variables according to a given permutation.
The i-th permutation array contains the index of the variable that
should be brought to the i-th level. ddShuffle assumes that no
dead nodes are present and that the interaction matrix is properly
initialized. The reordering is achieved by a series of upward sifts.
Returns 1 if successful; 0 otherwise.
- Side Effects None
- Defined in
cuddExact.c
static int
ddShuffle(
DdManager * table,
int * permutation
)
- Reorders variables according to a given permutation.
The i-th permutation array contains the index of the variable that
should be brought to the i-th level. ddShuffle assumes that no
dead nodes are present and that the interaction matrix is properly
initialized. The reordering is achieved by a series of upward sifts.
Returns 1 if successful; 0 otherwise.
- Side Effects None
- Defined in
cuddReorder.c
static int
ddSiftUp(
DdManager * table,
int x,
int xLow
)
- Takes a variable from position x and sifts it up to
position xLow; xLow should be less than or equal to x.
Returns 1 if successful; 0 otherwise
- Side Effects None
- Defined in
cuddExact.c
static int
ddSiftUp(
DdManager * table,
int x,
int xLow
)
- Takes a variable from position x and sifts it up to
position xLow; xLow should be less than or equal to x.
Returns 1 if successful; 0 otherwise
- Side Effects None
- Defined in
cuddReorder.c
static int
ddSiftingAux(
DdManager * table,
int x,
int xLow,
int xHigh
)
- Given xLow <= x <= xHigh moves x up and down between the
boundaries. Finds the best position and does the required changes.
Returns 1 if successful; 0 otherwise.
- Side Effects None
- Defined in
cuddReorder.c
static int
ddSiftingBackward(
DdManager * table,
int size,
Move * moves
)
- Given a set of moves, returns the DD heap to the
position giving the minimum size. In case of ties, returns to the
closest position giving the minimum size. Returns 1 in case of
success; 0 otherwise.
- Side Effects None
- Defined in
cuddReorder.c
static Move *
ddSiftingDown(
DdManager * table,
int x,
int xHigh
)
- Sifts a variable down. Moves x down until either it
reaches the bound (xHigh) or the size of the DD heap increases too
much. Returns the set of moves in case of success; NULL if memory is
full.
- Side Effects None
- Defined in
cuddReorder.c
static Move *
ddSiftingUp(
DdManager * table,
int y,
int xLow
)
- Sifts a variable up. Moves y up until either it reaches
the bound (xLow) or the size of the DD heap increases too much.
Returns the set of moves in case of success; NULL if memory is full.
- Side Effects None
- Defined in
cuddReorder.c
static void
ddSuppInteract(
DdNode * f,
int * support
)
- Performs a DFS from f. Uses the LSB of the then pointer
as visited flag.
- Side Effects Accumulates in support the variables on which f depends.
- Defined in
cuddInteract.c
static void
ddSupportStep(
DdNode * f,
int * support
)
- Performs the recursive step of Cudd_Support. Performs a
DFS from f. The support is accumulated in supp as a side effect. Uses
the LSB of the then pointer as visited flag.
- Side Effects None
- See Also
ddClearFlag
- Defined in
cuddUtil.c
static Move *
ddSwapAny(
DdManager * table,
int x,
int y
)
- Swaps any two variables. Returns the set of moves.
- Side Effects None
- Defined in
cuddReorder.c
static int
ddSymmGroupMoveBackward(
DdManager * table,
int x,
int y
)
- Undoes the swap of two groups. x is assumed to be the
bottom variable of the first group. y is assumed to be the top
variable of the second group. Returns the number of keys in the table
if successful; 0 otherwise.
- Side Effects None
- Defined in
cuddSymmetry.c
static int
ddSymmGroupMove(
DdManager * table,
int x,
int y,
Move ** moves
)
- Swaps two groups. x is assumed to be the bottom variable
of the first group. y is assumed to be the top variable of the second
group. Updates the list of moves. Returns the number of keys in the
table if successful; 0 otherwise.
- Side Effects None
- Defined in
cuddSymmetry.c
static int
ddSymmSiftingAux(
DdManager * table,
int x,
int xLow,
int xHigh
)
- Given xLow <= x <= xHigh moves x up and down between the
boundaries. Finds the best position and does the required changes.
Assumes that x is not part of a symmetry group. Returns 1 if
successful; 0 otherwise.
- Side Effects None
- Defined in
cuddSymmetry.c
static int
ddSymmSiftingBackward(
DdManager * table,
Move * moves,
int size
)
- Given a set of moves, returns the DD heap to the
position giving the minimum size. In case of ties, returns to the
closest position giving the minimum size. Returns 1 in case of
success; 0 otherwise.
- Side Effects None
- Defined in
cuddSymmetry.c
static int
ddSymmSiftingConvAux(
DdManager * table,
int x,
int xLow,
int xHigh
)
- Given xLow <= x <= xHigh moves x up and down between the
boundaries. Finds the best position and does the required changes.
Assumes that x is either an isolated variable, or it is the bottom of
a symmetry group. All symmetries may not have been found, because of
exceeded growth limit. Returns 1 if successful; 0 otherwise.
- Side Effects None
- Defined in
cuddSymmetry.c
static Move *
ddSymmSiftingDown(
DdManager * table,
int x,
int xHigh
)
- Moves x down until either it reaches the bound (xHigh)
or the size of the DD heap increases too much. Assumes that x is the
bottom of a symmetry group. Checks x for symmetry to the adjacent
variables. If symmetry is found, the symmetry group of x is merged
with the symmetry group of the other variable. Returns the set of
moves in case of success; MV_OOM if memory is full.
- Side Effects None
- Defined in
cuddSymmetry.c
static Move *
ddSymmSiftingUp(
DdManager * table,
int y,
int xLow
)
- Moves x up until either it reaches the bound (xLow) or
the size of the DD heap increases too much. Assumes that x is the top
of a symmetry group. Checks x for symmetry to the adjacent
variables. If symmetry is found, the symmetry group of x is merged
with the symmetry group of the other variable. Returns the set of
moves in case of success; MV_OOM if memory is full.
- Side Effects None
- Defined in
cuddSymmetry.c
static void
ddSymmSummary(
DdManager * table,
int lower,
int upper,
int * symvars,
int * symgroups
)
- Counts numbers of symmetric variables and symmetry
groups.
- Side Effects None
- Defined in
cuddSymmetry.c
static int
ddSymmUniqueCompare(
int * ptrX,
int * ptrY
)
- Comparison function used by qsort to order the variables
according to the number of keys in the subtables.
Returns the difference in number of keys between the two
variables being compared.
- Side Effects None
- Defined in
cuddSymmetry.c
static int
ddTreeSiftingAux(
DdManager * table,
MtrNode * treenode,
Cudd_ReorderingType method
)
- Recursively visits the group tree and reorders each
group in postorder fashion. Returns 1 if successful; 0 otherwise.
- Side Effects None
- Defined in
cuddGroup.c
static Move*
ddUndoMoves(
DdManager * table,
Move * moves
)
- Given a set of moves, returns the DD heap to the
order in effect before the moves. Returns 1 in case of success;
0 otherwise.
- Side Effects None
- Defined in
cuddLinear.c
static int
ddUniqueCompareGroup(
int * ptrX,
int * ptrY
)
- Comparison function used by qsort to order the variables
according to the number of keys in the subtables. Returns the
difference in number of keys between the two variables being
compared.
- Side Effects None
- Defined in
cuddGroup.c
static int
ddUniqueCompare(
int * ptrX,
int * ptrY
)
- Comparison function used by qsort to order the
variables according to the number of keys in the subtables.
Returns the difference in number of keys between the two
variables being compared.
- Side Effects None
- Defined in
cuddReorder.c
static void
ddUpdateInteract(
DdManager * table,
int * support
)
- If support[i
- Side Effects None
- Defined in
cuddInteract.c
static int
ddUpdateMtrTree(
DdManager * table,
MtrNode * treenode,
int * perm,
int * invperm
)
- Updates the BDD variable group tree before a shuffle.
Returns 1 if successful; 0 otherwise.
- Side Effects Changes the BDD variable group tree.
- Defined in
cuddReorder.c
static int
ddVarGroupCheck(
DdManager * table,
int x,
int y
)
- Checks for grouping of x and y. Returns 1 in
case of grouping; 0 otherwise. This function is used for lazy sifting.
- Side Effects None
- Defined in
cuddGroup.c
static int
ddWindow2(
DdManager * table,
int low,
int high
)
- Reorders by applying a sliding window of width 2.
Tries both permutations of the variables in a window
that slides from low to high. Assumes that no dead nodes are
present. Returns 1 in case of success; 0 otherwise.
- Side Effects None
- Defined in
cuddWindow.c
static int
ddWindow3(
DdManager * table,
int low,
int high
)
- Reorders by applying a sliding window of width 3.
Tries all possible permutations to the variables in a
window that slides from low to high. Assumes that no dead nodes are
present. Returns 1 in case of success; 0 otherwise.
- Side Effects None
- Defined in
cuddWindow.c
static int
ddWindow4(
DdManager * table,
int low,
int high
)
- Reorders by applying a sliding window of width 4.
Tries all possible permutations to the variables in a
window that slides from low to high. Assumes that no dead nodes are
present. Returns 1 in case of success; 0 otherwise.
- Side Effects None
- Defined in
cuddWindow.c
static int
ddWindowConv2(
DdManager * table,
int low,
int high
)
- Reorders by repeatedly applying a sliding window of width
2. Tries both permutations of the variables in a window
that slides from low to high. Assumes that no dead nodes are
present. Uses an event-driven approach to determine convergence.
Returns 1 in case of success; 0 otherwise.
- Side Effects None
- Defined in
cuddWindow.c
static int
ddWindowConv3(
DdManager * table,
int low,
int high
)
- Reorders by repeatedly applying a sliding window of width
3. Tries all possible permutations to the variables in a
window that slides from low to high. Assumes that no dead nodes are
present. Uses an event-driven approach to determine convergence.
Returns 1 in case of success; 0 otherwise.
- Side Effects None
- Defined in
cuddWindow.c
static int
ddWindowConv4(
DdManager * table,
int low,
int high
)
- Reorders by repeatedly applying a sliding window of width
4. Tries all possible permutations to the variables in a
window that slides from low to high. Assumes that no dead nodes are
present. Uses an event-driven approach to determine convergence.
Returns 1 in case of success; 0 otherwise.
- Side Effects None
- Defined in
cuddWindow.c
static void
debugCheckParent(
DdManager * table,
DdNode * node
)
- Searches all the subtables above node. Very expensive.
The same check is now implemented more efficiently in ddDebugCheck.
- Side Effects None
- See Also
debugFindParent
- Defined in
cuddCheck.c
static void
debugFindParent(
DdManager * table,
DdNode * node
)
- Searches the subtables above node for its parents.
- Side Effects None
- Defined in
cuddCheck.c
static int
dp2(
DdManager * dd,
DdNode * f,
st_table * t
)
- Performs the recursive step of cuddP. Returns 1 in case
of success; 0 otherwise.
- Side Effects None
- Defined in
cuddUtil.c
static DdTlcInfo *
emptyClauseSet(
)
- Returns a pointer to an empty set of clauses if
successful; NULL otherwise. No bit vector for the phases is
allocated.
- Side Effects None
- Defined in
cuddEssent.c
static int
equalp(
DdHalfWord var1a,
short phase1a,
DdHalfWord var1b,
short phase1b,
DdHalfWord var2a,
short phase2a,
DdHalfWord var2b,
short phase2b
)
- Returns true iff the two arguments are identical
clauses. Since literals are sorted, we only need to compare
literals in the same position.
- Side Effects None
- See Also
beforep
- Defined in
cuddEssent.c
static double
find_average_fitness(
)
- Returns the average fitness of the population.
- Side Effects None
- Defined in
cuddGenetic.c
static int
find_best(
)
- Returns the index of the fittest individual.
- Side Effects None
- Defined in
cuddGenetic.c
static void
fixVarTree(
MtrNode * treenode,
int * perm,
int size
)
- Fixes a variable group tree.
- Side Effects Changes the variable group tree.
- Defined in
cuddAPI.c
static void
freeMatrix(
DdHalfWord ** matrix
)
- Frees a two-dimensional matrix allocated by getMatrix.
- Side Effects None
- See Also
getMatrix
- Defined in
cuddExact.c
static enum st_retval
freePathPair(
char * key,
char * value,
char * arg
)
- Frees the entries of the visited symbol table. Returns
ST_CONTINUE.
- Side Effects None
- Defined in
cuddSat.c
static NodeData *
gatherInfoAux(
DdNode * node, function to analyze
ApproxInfo * info, info on BDD
int parity gather parity information
)
- Recursively counts minterms and computes reference
counts of each node in the BDD. Similar to the cuddCountMintermAux
which recursively counts the number of minterms for the dag rooted
at each node in terms of the total number of variables (max). It assumes
that the node pointer passed to it is regular and it maintains the
invariant.
- Side Effects None
- See Also
gatherInfo
- Defined in
cuddApprox.c
static ApproxInfo *
gatherInfo(
DdManager * dd, manager
DdNode * node, function to be analyzed
int numVars, number of variables node depends on
int parity gather parity information
)
- Counts minterms and computes reference counts of each
node in the BDD . The minterm count is separately computed for the
node and its complement. This is to avoid cancellation
errors. Returns a pointer to the data structure holding the
information gathered if successful; NULL otherwise.
- Side Effects None
- See Also
cuddUnderApprox
gatherInfoAux
- Defined in
cuddApprox.c
static int
gcd(
int x,
int y
)
- Returns the gcd of two integers. Uses the binary GCD
algorithm described in Cormen, Leiserson, and Rivest.
- Side Effects None
- Defined in
cuddExact.c
static DdNode *
getCube(
DdManager * manager,
st_table * visited,
DdNode * f,
int cost
)
- Build a BDD for a largest cube of f.
Given the minimum length from the root, and the minimum
lengths for each node (in visited), apply triangulation at each node.
Of the two children of each node on a shortest path, at least one is
on a shortest path. In case of ties the procedure chooses the THEN
children.
Returns a pointer to the cube BDD representing the path if
successful; NULL otherwise.
- Side Effects None
- Defined in
cuddSat.c
static cuddPathPair
getLargest(
DdNode * root,
st_table * visited
)
- Finds the size of the largest cube(s) in a DD.
This problem is translated into finding the shortest paths from a node
when both THEN and ELSE arcs have unit lengths.
Uses a local symbol table to store the lengths for each
node. Only the lengths for the regular nodes are entered in the table,
because those for the complement nodes are simply obtained by swapping
the two lenghts.
Returns a pair of lengths: the length of the shortest path to 1;
and the length of the shortest path to 0. This is done so as to take
complement arcs into account.
- Side Effects none
- Defined in
cuddSat.c
static int
getLevelKeys(
DdManager * table,
int l
)
- Returns the number of nodes at one level of a unique table.
The projection function, if isolated, is not counted.
- Side Effects None
- Defined in
cuddExact.c
static DdHalfWord **
getMatrix(
int rows, number of rows
int cols number of columns
)
- Allocates a two-dimensional matrix of ints.
Returns the pointer to the matrix if successful; NULL otherwise.
- Side Effects None
- See Also
freeMatrix
- Defined in
cuddExact.c
static int
getMaxBinomial(
int n
)
- Computes the maximum value of (n choose k) for a given
n. The maximum value occurs for k = n/2 when n is even, or k =
(n-1)/2 when n is odd. The algorithm used in this procedure avoids
intermediate overflow problems. It is based on the identity
binomial(n,k) = n/k * binomial(n-1,k-1).
Returns the computed value if successful; -1 if out of range.
- Side Effects None
- Defined in
cuddExact.c
static DdNode *
getPath(
DdManager * manager,
st_table * visited,
DdNode * f,
int * weight,
int cost
)
- Build a BDD for a shortest path of f.
Given the minimum length from the root, and the minimum
lengths for each node (in visited), apply triangulation at each node.
Of the two children of each node on a shortest path, at least one is
on a shortest path. In case of ties the procedure chooses the THEN
children.
Returns a pointer to the cube BDD representing the path if
successful; NULL otherwise.
- Side Effects None
- Defined in
cuddSat.c
static cuddPathPair
getShortest(
DdNode * root,
int * cost,
int * support,
st_table * visited
)
- Finds the length of the shortest path(s) in a DD.
Uses a local symbol table to store the lengths for each
node. Only the lengths for the regular nodes are entered in the table,
because those for the complement nodes are simply obtained by swapping
the two lenghts.
Returns a pair of lengths: the length of the shortest path to 1;
and the length of the shortest path to 0. This is done so as to take
complement arcs into account.
- Side Effects Accumulates the support of the DD in support.
- Defined in
cuddSat.c
static void
hashDelete(
DdLevelQueue * queue,
DdQueueItem * item
)
- Removes an item from the hash table of a level queue.
Nothing is done if the item is not in the table.
- Side Effects None
- See Also
cuddLevelQueueDequeue
hashInsert
- Defined in
cuddLevelQ.c
static int
hashInsert(
DdLevelQueue * queue,
DdQueueItem * item
)
- Inserts an item in the hash table of a level queue. Returns
1 if successful; 0 otherwise. No check is performed to see if an item with
the same key is already in the hash table.
- Side Effects None
- See Also
cuddLevelQueueEnqueue
- Defined in
cuddLevelQ.c
static DdQueueItem *
hashLookup(
DdLevelQueue * queue,
void * key
)
- Looks up a key in the hash table of a level queue. Returns
a pointer to the item with the given key if the key is found; NULL
otherwise.
- Side Effects None
- See Also
cuddLevelQueueEnqueue
hashInsert
- Defined in
cuddLevelQ.c
static int
hashResize(
DdLevelQueue * queue
)
- Resizes the hash table of a level queue. Returns 1 if
successful; 0 otherwise.
- Side Effects None
- See Also
hashInsert
- Defined in
cuddLevelQ.c
static int
impliedp(
DdHalfWord var1,
short phase1,
DdHalfWord var2,
short phase2,
BitVector * olv,
BitVector * olp
)
- Returns true iff either literal of a clause is in a set
of literals. The first four arguments specify the clause. The
remaining two arguments specify the literal set.
- Side Effects None
- Defined in
cuddEssent.c
static DdHalfWord *
initSymmInfo(
DdManager * table,
int lower,
int upper
)
- Translates the symmetry information stored in the next
field of each subtable from level to indices. This procedure is called
immediately after symmetric sifting, so that the next fields are correct.
By translating this informaton in terms of indices, we make it independent
of subsequent reorderings. The format used is that of the next fields:
a circular list where each variable points to the next variable in the
same symmetry group. Only the entries between lower and upper are
considered. The procedure returns a pointer to an array
holding the symmetry information if successful; NULL otherwise.
- Side Effects None
- See Also
checkSymmInfo
- Defined in
cuddExact.c
static int
largest(
)
- Finds the largest DD in the population. If an order is
repeated, it avoids choosing the copy that is in the computed table
(it has repeat[i
- Side Effects None
- Defined in
cuddGenetic.c
static int
make_random(
DdManager * table,
int lower
)
- Generates the random sequences for the initial population.
The sequences are permutations of the indices between lower and
upper in the current order.
- Side Effects None
- Defined in
cuddGenetic.c
static DdNode *
mintermsFromUniverse(
DdManager * manager,
DdNode ** vars,
int numVars,
double n,
int index
)
- Recursive procedure to extract n mintems from constant 1.
- Side Effects None
- Defined in
cuddSplit.c
static int
oneliteralp(
DdHalfWord var
)
- Returns true iff the argument is a one-literal clause.
A one-litaral clause has the constant FALSE as second literal.
Since the constant TRUE is never used, it is sufficient to test for
a constant.
- Side Effects None
- Defined in
cuddEssent.c
static void
pushDown(
DdHalfWord * order,
int j,
int level
)
- Pushes a variable in the order down to position "level."
- Side Effects None
- Defined in
cuddExact.c
static int
rand_int(
int a
)
- Generates a random number between 0 and the integer a.
- Side Effects None
- Defined in
cuddGenetic.c
static double
random_generator(
)
- Returns a double precision value between 0.0 and 1.0.
- Side Effects None
- Defined in
cuddAnneal.c
static int
restoreOrder(
DdManager * table,
int * array,
int lower,
int upper
)
- Restores the variable order in array by a series of sifts up.
Returns 1 in case of success; 0 otherwise.
- Side Effects None
- Defined in
cuddAnneal.c
static int
roulette(
int * p1,
int * p2
)
- Selects two distinct parents with the roulette wheel method.
- Side Effects The indices of the selected parents are returned as side
effects.
- Defined in
cuddGenetic.c
static DdNode *
selectMintermsFromUniverse(
DdManager * manager,
int * varSeen,
double n
)
- This function prepares an array of variables which have not been
encountered so far when traversing the procedure cuddSplitSetRecur. This
array is then used to extract the required number of minterms from a constant
1. The algorithm guarantees that the size of BDD will be utmost log(n).
- Side Effects None
- Defined in
cuddSplit.c
static int
sentinelp(
DdHalfWord var1,
DdHalfWord var2
)
- Returns true iff the argument is the sentinel clause.
A sentinel clause has both variables equal to 0.
- Side Effects None
- Defined in
cuddEssent.c
static DdNode *
separateCube(
DdManager * dd,
DdNode * f,
CUDD_VALUE_TYPE * distance
)
- Separates cube from distance. Returns the cube if
successful; NULL otherwise.
- Side Effects The distance is returned as a side effect.
- See Also
cuddBddClosestCube
createResult
- Defined in
cuddPriority.c
static int
siftBackwardProb(
DdManager * table,
Move * moves,
int size,
double temp
)
- Otherwise, "tosses a coin" to decide whether to keep
the current configuration or return the DD to the original
one. Returns 1 in case of success; 0 otherwise.
- Side Effects None
- Defined in
cuddAnneal.c
static int
sift_up(
DdManager * table,
int x,
int x_low
)
- Takes a variable from position x and sifts it up to
position x_low; x_low should be less than x. Returns 1 if successful;
0 otherwise
- Side Effects None
- Defined in
cuddGenetic.c
static enum st_retval
stPathTableDdFree(
char * key,
char * value,
char * arg
)
- None
- Side Effects None
- Defined in
cuddSubsetSP.c
static enum st_retval
st_zdd_count_dbl_free(
char * key,
char * value,
char * arg
)
- Frees the memory associated with the computed table of
Cudd_zddCountDouble.
- Side Effects None
- Defined in
cuddZddCount.c
static enum st_retval
st_zdd_countfree(
char * key,
char * value,
char * arg
)
- Frees the memory associated with the computed table of
Cudd_zddCount.
- Side Effects None
- Defined in
cuddZddCount.c
static int
stopping_criterion(
int c1,
int c2,
int c3,
int c4,
double temp
)
- If temperature is STOP_TEMP or there is no improvement
then terminates. Returns 1 if the termination criterion is met; 0
otherwise.
- Side Effects None
- Defined in
cuddAnneal.c
static DdTlcInfo *
tlcInfoAlloc(
)
- Returns a pointer to a DdTlcInfo Structure if successful;
NULL otherwise.
- Side Effects None
- See Also
Cudd_tlcInfoFree
- Defined in
cuddEssent.c
static int
updateEntry(
DdManager * table,
DdHalfWord * order,
int level,
int cost,
DdHalfWord ** orders,
int * costs,
int subsets,
char * mask,
int lower,
int upper
)
- Updates entry for a subset. Finds the subset, if it exists.
If the new order for the subset has lower cost, or if the subset did not
exist, it stores the new order and cost. Returns the number of subsets
currently in the table.
- Side Effects None
- Defined in
cuddExact.c
static void
updateParity(
DdNode * node, function to analyze
ApproxInfo * info, info on BDD
int newparity new parity for node
)
- Recursively update the parity of the paths reaching a node.
Assumes that node is regular and propagates the invariant.
- Side Effects None
- See Also
gatherInfoAux
- Defined in
cuddApprox.c
static int
updateRefs(
DdManager * dd,
DdNode * f,
DdNode * skip,
ApproxInfo * info,
DdLevelQueue * queue
)
- Update function reference counts to account for replacement.
Returns the number of nodes saved if successful; 0 otherwise.
- Side Effects None
- See Also
UAmarkNodes
RAmarkNodes
- Defined in
cuddApprox.c
static int
updateUB(
DdManager * table,
int oldBound,
DdHalfWord * bestOrder,
int lower,
int upper
)
- Updates the upper bound and saves the best order seen so far.
Returns the current value of the upper bound.
- Side Effects None
- Defined in
cuddExact.c
static int
zddCountInternalMtrNodes(
DdManager * table,
MtrNode * treenode
)
- Counts the number of internal nodes of the group tree.
Returns the count.
- Side Effects None
- Defined in
cuddZddGroup.c
static void
zddFindNodeHiLo(
DdManager * table,
MtrNode * treenode,
int * lower,
int * upper
)
- Finds the lower and upper bounds of the group represented
by treenode. The high and low fields of treenode are indices. From
those we need to derive the current positions, and find maximum and
minimum.
- Side Effects The bounds are returned as side effects.
- Defined in
cuddZddGroup.c
static void
zddFixTree(
DdManager * table,
MtrNode * treenode
)
- Fixes the ZDD variable group tree after a
shuffle. Assumes that the order of the variables in a terminal node
has not been changed.
- Side Effects Changes the ZDD variable group tree.
- Defined in
cuddZddReord.c
static int
zddGroupMoveBackward(
DdManager * table,
int x,
int y
)
- Undoes the swap two groups. Returns 1 in case of
success; 0 otherwise.
- Side Effects None
- Defined in
cuddZddGroup.c
static int
zddGroupMove(
DdManager * table,
int x,
int y,
Move ** moves
)
- Swaps two groups and records the move. Returns the
number of keys in the DD table in case of success; 0 otherwise.
- Side Effects None
- Defined in
cuddZddGroup.c
static int
zddGroupSiftingAux(
DdManager * table,
int x,
int xLow,
int xHigh
)
- Sifts one variable up and down until it has taken all
positions. Checks for aggregation. There may be at most two sweeps,
even if the group grows. Assumes that x is either an isolated
variable, or it is the bottom of a group. All groups may not have
been found. The variable being moved is returned to the best position
seen during sifting. Returns 1 in case of success; 0 otherwise.
- Side Effects None
- Defined in
cuddZddGroup.c
static int
zddGroupSiftingBackward(
DdManager * table,
Move * moves,
int size
)
- Determines the best position for a variables and returns
it there. Returns 1 in case of success; 0 otherwise.
- Side Effects None
- Defined in
cuddZddGroup.c
static int
zddGroupSiftingDown(
DdManager * table,
int x,
int xHigh,
Move ** moves
)
- Sifts down a variable until it reaches position xHigh.
Assumes that x is the bottom of a group (or a singleton). Records
all the moves. Returns 1 in case of success; 0 otherwise.
- Side Effects None
- Defined in
cuddZddGroup.c
static int
zddGroupSiftingUp(
DdManager * table,
int y,
int xLow,
Move ** moves
)
- Sifts up a variable until either it reaches position
xLow or the size of the DD heap increases too much. Assumes that y is
the top of a group (or a singleton). Checks y for aggregation to the
adjacent variables. Records all the moves that are appended to the
list of moves received as input and returned as a side effect.
Returns 1 in case of success; 0 otherwise.
- Side Effects None
- Defined in
cuddZddGroup.c
static int
zddGroupSifting(
DdManager * table,
int lower,
int upper
)
- Sifts from treenode->low to treenode->high. If
croupcheck == CUDD_GROUP_CHECK7, it checks for group creation at the
end of the initial sifting. If a group is created, it is then sifted
again. After sifting one variable, the group that contains it is
dissolved. Returns 1 in case of success; 0 otherwise.
- Side Effects None
- Defined in
cuddZddGroup.c
static void
zddMergeGroups(
DdManager * table,
MtrNode * treenode,
int low,
int high
)
- Creates a single group from low to high and adjusts the
idex field of the tree node.
- Side Effects None
- Defined in
cuddZddGroup.c
static DdNode *
zddPortFromBddStep(
DdManager * dd,
DdNode * B,
int expected
)
- Performs the recursive step of Cudd_zddPortFromBdd.
- Side Effects None
- Defined in
cuddZddPort.c
static DdNode *
zddPortToBddStep(
DdManager * dd, manager
DdNode * f, ZDD to be converted
int depth recursion depth
)
- Performs the recursive step of Cudd_zddPortToBdd.
- Side Effects None
- Defined in
cuddZddPort.c
static void
zddPrintCoverAux(
DdManager * zdd, manager
DdNode * node, current node
int level, depth in the recursion
int * list current recursion path
)
- Performs the recursive step of Cudd_zddPrintCover.
- Side Effects None
- Defined in
cuddZddUtil.c
static int
zddReorderChildren(
DdManager * table,
MtrNode * treenode,
Cudd_ReorderingType method
)
- Reorders the children of a group tree node according to
the options. After reordering puts all the variables in the group
and/or its descendents in a single group. This allows hierarchical
reordering. If the variables in the group do not exist yet, simply
does nothing. Returns 1 if successful; 0 otherwise.
- Side Effects None
- Defined in
cuddZddGroup.c
static int
zddReorderPostprocess(
DdManager * table
)
- Shrinks almost empty subtables at the end of reordering to
guarantee that they have a reasonable load factor. However, if there many
nodes are being reclaimed, then no resizing occurs. Returns 1 in case of
success; 0 otherwise.
- Side Effects None
- Defined in
cuddZddReord.c
static void
zddReorderPreprocess(
DdManager * table
)
- Prepares the ZDD heap for dynamic reordering. Does
garbage collection, to guarantee that there are no dead nodes;
and clears the cache, which is invalidated by dynamic reordering.
- Side Effects None
- Defined in
cuddZddReord.c
static int
zddShuffle(
DdManager * table,
int * permutation
)
- Reorders ZDD variables according to a given permutation.
The i-th permutation array contains the index of the variable that
should be brought to the i-th level. zddShuffle assumes that no
dead nodes are present. The reordering is achieved by a series of
upward sifts. Returns 1 if successful; 0 otherwise.
- Side Effects None
- Defined in
cuddZddReord.c
static int
zddSiftUp(
DdManager * table,
int x,
int xLow
)
- Takes a ZDD variable from position x and sifts it up to
position xLow; xLow should be less than or equal to x.
Returns 1 if successful; 0 otherwise
- Side Effects None
- Defined in
cuddZddReord.c
static Move *
zddSwapAny(
DdManager * table,
int x,
int y
)
- Swaps any two variables. Returns the set of moves.
- Side Effects None
- Defined in
cuddZddReord.c
static int
zddTreeSiftingAux(
DdManager * table,
MtrNode * treenode,
Cudd_ReorderingType method
)
- Recursively visits the group tree and reorders each
group in postorder fashion. Returns 1 if successful; 0 otherwise.
- Side Effects None
- Defined in
cuddZddGroup.c
static int
zddUniqueCompareGroup(
int * ptrX,
int * ptrY
)
- Comparison function used by qsort to order the variables
according to the number of keys in the subtables. Returns the
difference in number of keys between the two variables being
compared.
- Side Effects None
- Defined in
cuddZddGroup.c
static void
zddVarToConst(
DdNode * f,
DdNode ** gp,
DdNode ** hp,
DdNode * base,
DdNode * empty
)
- Replaces variables with constants if possible (part of
canonical form).
- Side Effects None
- Defined in
cuddZddSetop.c
static int
zdd_group_move_backward(
DdManager * table,
int x,
int y
)
- Undoes the swap of two groups. x is assumed to be the
bottom variable of the first group. y is assumed to be the top
variable of the second group. Returns 1 if successful; 0 otherwise.
- Side Effects None
- Defined in
cuddZddSymm.c
static int
zdd_group_move(
DdManager * table,
int x,
int y,
Move ** moves
)
- Swaps two groups. x is assumed to be the bottom variable
of the first group. y is assumed to be the top variable of the second
group. Updates the list of moves. Returns the number of keys in the
table if successful; 0 otherwise.
- Side Effects None
- Defined in
cuddZddSymm.c
static void
zdd_print_minterm_aux(
DdManager * zdd, manager
DdNode * node, current node
int level, depth in the recursion
int * list current recursion path
)
- Performs the recursive step of Cudd_zddPrintMinterm.
- Side Effects None
- Defined in
cuddZddUtil.c
static DdNode *
zdd_subset0_aux(
DdManager * zdd,
DdNode * P,
DdNode * zvar
)
- Performs the recursive step of Cudd_zddSubset0.
- Side Effects None
- Defined in
cuddZddSetop.c
static DdNode *
zdd_subset1_aux(
DdManager * zdd,
DdNode * P,
DdNode * zvar
)
- Performs the recursive step of Cudd_zddSubset1.
- Side Effects None
- Defined in
cuddZddSetop.c
static int
zp2(
DdManager * zdd,
DdNode * f,
st_table * t
)
- Performs the recursive step of cuddZddP. Returns 1 in
case of success; 0 otherwise.
- Side Effects None
- Defined in
cuddZddUtil.c
(
)
- Adds node to the head of the free list. Does not
deallocate memory chunks that become free. This function is also
used by the dynamic reordering functions.
- Side Effects None
- See Also
cuddAllocNode
cuddDynamicAllocNode
cuddDeallocMove
- Defined in
cuddInt.h
(
)
- Adds node to the head of the free list. Does not
deallocate memory chunks that become free. This function is also
used by the dynamic reordering functions.
- Side Effects None
- See Also
cuddDeallocNode
cuddDynamicAllocNode
- Defined in
cuddInt.h
(
)
- Clears the 4 least significant bits of a pointer.
- Side Effects none
- Defined in
cuddInt.h
(
)
- Complements a DD if condition c is true; c should be
either 0 or 1, because it is used directly (for efficiency). If in
doubt on the values c may take, use "(c) ? Cudd_Not(node) : node".
- Side Effects none
- See Also
Cudd_Not
- Defined in
cudd.h
(
)
- Complements a DD by flipping the complement attribute of
the pointer (the least significant bit).
- Side Effects none
- See Also
Cudd_NotCond
- Defined in
cudd.h
(
)
- Computes hash function for keys of three operands.
- Side Effects None
- See Also
ddLCHash2
ddLCHash
- Defined in
cuddLCache.c
(
)
- Computes hash function for keys of two operands.
- Side Effects None
- See Also
ddLCHash3
ddLCHash
- Defined in
cuddLCache.c
(
)
- Computes the absolute value of a number.
- Side Effects none
- Defined in
cuddInt.h
(
)
- Computes the maximum of two numbers.
- Side Effects none
- See Also
ddMin
- Defined in
cuddInt.h
(
)
- Computes the minimum of two numbers.
- Side Effects none
- See Also
ddMax
- Defined in
cuddInt.h
(
)
- Decreases the reference count of node. It is primarily
used in recursive procedures to decrease the ref count of a result
node before returning it. This accomplishes the goal of removing the
protection applied by a previous cuddRef. This being a macro, it is
faster than Cudd_Deref, but it cannot be used in constructs like
cuddDeref(a = b()).
- Side Effects none
- See Also
Cudd_Deref
- Defined in
cuddInt.h
(
)
- Enforces DD_MINUS_INF_VAL <= x <= DD_PLUS_INF_VAL.
Furthermore, if x <= DD_MINUS_INF_VAL/2, x is set to
DD_MINUS_INF_VAL. Similarly, if DD_PLUS_INF_VAL/2 <= x, x is set to
DD_PLUS_INF_VAL. Normally this macro is a NOOP. However, if
HAVE_IEEE_754 is not defined, it makes sure that a value does not
get larger than infinity in absolute value, and once it gets to
infinity, stays there. If the value overflows before this macro is
applied, no recovery is possible.
- Side Effects none
- Defined in
cuddInt.h
(
)
- Extract the least significant digit of a double digit. Used
in the manipulation of arbitrary precision integers.
- Side Effects None
- See Also
DD_MSDIGIT
- Defined in
cuddInt.h
(
)
- Extract the most significant digit of a double digit. Used
in the manipulation of arbitrary precision integers.
- Side Effects None
- See Also
DD_LSDIGIT
- Defined in
cuddInt.h
(
)
- Finds the current position of ZDD variable index in the
order. This macro duplicates the functionality of Cudd_ReadPermZdd,
but it does not check for out-of-bounds indices and it is more
efficient.
- Side Effects none
- See Also
Cudd_ReadPermZdd
- Defined in
cuddInt.h
(
)
- Finds the current position of variable index in the
order. This macro duplicates the functionality of Cudd_ReadPerm,
but it does not check for out-of-bounds indices and it is more
efficient.
- Side Effects none
- See Also
Cudd_ReadPerm
- Defined in
cuddInt.h
(
)
- Hash function for the cache for functions with two
operands.
- Side Effects none
- See Also
ddHash
ddCHash
- Defined in
cuddInt.h
(
)
- Hash function for the cache.
- Side Effects none
- See Also
ddHash
ddCHash2
- Defined in
cuddInt.h
(
)
- Hash function for the table of a level queue.
- Side Effects None
- See Also
hashInsert
hashLookup
hashDelete
- Defined in
cuddLevelQ.c
(
)
- Hash function for the unique table.
- Side Effects none
- See Also
ddCHash
ddCHash2
- Defined in
cuddInt.h
(
)
- Increases the reference count of a node, if it is not
saturated. This being a macro, it is faster than Cudd_Ref, but it
cannot be used in constructs like cuddRef(a = b()).
- Side Effects none
- See Also
Cudd_Ref
- Defined in
cuddInt.h
(
)
- Iterates over the cubes of a decision diagram f.
- DdManager *manager;
- DdNode *f;
- DdGen *gen;
- int *cube;
- CUDD_VALUE_TYPE value;
Cudd_ForeachCube allocates and frees the generator. Therefore the
application should not try to do that. Also, the cube is freed at the
end of Cudd_ForeachCube and hence is not available outside of the loop.
CAUTION: It is assumed that dynamic reordering will not occur while
there are open generators. It is the user's responsibility to make sure
that dynamic reordering does not occur. As long as new nodes are not created
during generation, and dynamic reordering is not called explicitly,
dynamic reordering will not occur. Alternatively, it is sufficient to
disable dynamic reordering. It is a mistake to dispose of a diagram
on which generation is ongoing.
- Side Effects none
- See Also
Cudd_ForeachNode
Cudd_FirstCube
Cudd_NextCube
Cudd_GenFree
Cudd_IsGenEmpty
Cudd_AutodynDisable
- Defined in
cudd.h
(
)
- Iterates over the nodes of a decision diagram f.
- DdManager *manager;
- DdNode *f;
- DdGen *gen;
- DdNode *node;
The nodes are returned in a seemingly random order.
Cudd_ForeachNode allocates and frees the generator. Therefore the
application should not try to do that.
CAUTION: It is assumed that dynamic reordering will not occur while
there are open generators. It is the user's responsibility to make sure
that dynamic reordering does not occur. As long as new nodes are not created
during generation, and dynamic reordering is not called explicitly,
dynamic reordering will not occur. Alternatively, it is sufficient to
disable dynamic reordering. It is a mistake to dispose of a diagram
on which generation is ongoing.
- Side Effects none
- See Also
Cudd_ForeachCube
Cudd_FirstNode
Cudd_NextNode
Cudd_GenFree
Cudd_IsGenEmpty
Cudd_AutodynDisable
- Defined in
cudd.h
(
)
- Iterates over the paths of a ZDD f.
- DdManager *manager;
- DdNode *f;
- DdGen *gen;
- int *path;
Cudd_zddForeachPath allocates and frees the generator. Therefore the
application should not try to do that. Also, the path is freed at the
end of Cudd_zddForeachPath and hence is not available outside of the loop.
CAUTION: It is assumed that dynamic reordering will not occur while
there are open generators. It is the user's responsibility to make sure
that dynamic reordering does not occur. As long as new nodes are not created
during generation, and dynamic reordering is not called explicitly,
dynamic reordering will not occur. Alternatively, it is sufficient to
disable dynamic reordering. It is a mistake to dispose of a diagram
on which generation is ongoing.
- Side Effects none
- See Also
Cudd_zddFirstPath
Cudd_zddNextPath
Cudd_GenFree
Cudd_IsGenEmpty
Cudd_AutodynDisable
- Defined in
cudd.h
(
)
- Iterates over the primes of a Boolean function producing
a prime and irredundant cover.
- DdManager *manager;
- DdNode *l;
- DdNode *u;
- DdGen *gen;
- int *cube;
The Boolean function is described by an upper bound and a lower bound. If
the function is completely specified, the two bounds coincide.
Cudd_ForeachPrime allocates and frees the generator. Therefore the
application should not try to do that. Also, the cube is freed at the
end of Cudd_ForeachPrime and hence is not available outside of the loop.
CAUTION: It is a mistake to change a diagram on which generation is ongoing.
- Side Effects none
- See Also
Cudd_ForeachCube
Cudd_FirstPrime
Cudd_NextPrime
Cudd_GenFree
Cudd_IsGenEmpty
- Defined in
cudd.h
(
)
- Outputs a line of stats if DD_COUNT and DD_STATS are
defined. Increments the number of recursive calls if DD_COUNT is
defined.
- Side Effects None
- Defined in
cuddInt.h
(
)
- Returns 1 if a pointer is complemented.
- Side Effects none
- See Also
Cudd_Regular
Cudd_Complement
- Defined in
cudd.h
(
)
- Returns 1 if the absolute value of the difference of the two
arguments x and y is less than e.
- Side Effects none
- Defined in
cuddInt.h
(
)
- Returns 1 if the node is a constant node (rather than an
internal node). All constant nodes have the same index
(CUDD_CONST_INDEX). The pointer passed to Cudd_IsConstant may be either
regular or complemented.
- Side Effects none
- Defined in
cudd.h
(
)
- Returns 1 if the node is a constant node (rather than an
internal node). All constant nodes have the same index
(CUDD_CONST_INDEX). The pointer passed to cuddIsConstant must be regular.
- Side Effects none
- See Also
Cudd_IsConstant
- Defined in
cuddInt.h
(
)
- Returns the arithmetic 0 constant node. This is different
from the logical zero. The latter is obtained by
Cudd_Not(DD_ONE(dd)).
- Side Effects none
- See Also
DD_ONE
Cudd_Not
DD_PLUS_INFINITY
DD_MINUS_INFINITY
- Defined in
cuddInt.h
(
)
- Returns the complemented version of a pointer.
- Side Effects none
- See Also
Cudd_Regular
Cudd_IsComplement
- Defined in
cudd.h
(
)
- Returns the constant 1 node.
- Side Effects none
- See Also
DD_ZERO
DD_PLUS_INFINITY
DD_MINUS_INFINITY
- Defined in
cuddInt.h
(
)
- Returns the current position in the order of variable
index. This macro is obsolete and is kept for compatibility. New
applications should use Cudd_ReadPerm instead.
- Side Effects none
- See Also
Cudd_ReadPerm
- Defined in
cudd.h
(
)
- Returns the else child of an internal node. If
node
is a constant node, the result is unpredictable.
The pointer passed to cuddE must be regular.
- Side Effects none
- See Also
Cudd_E
- Defined in
cuddInt.h
(
)
- Returns the else child of an internal node. If
node
is a constant node, the result is unpredictable.
- Side Effects none
- See Also
Cudd_T
Cudd_V
- Defined in
cudd.h
(
)
- Returns the minus infinity constant node.
- Side Effects none
- See Also
DD_ONE
DD_ZERO
DD_PLUS_INFINITY
- Defined in
cuddInt.h
(
)
- Returns the plus infinity constant node.
- Side Effects none
- See Also
DD_ONE
DD_ZERO
DD_MINUS_INFINITY
- Defined in
cuddInt.h
(
)
- Returns the regular version of a pointer.
- Side Effects none
- See Also
Cudd_Complement
Cudd_IsComplement
- Defined in
cudd.h
(
)
- Returns the then child of an internal node. If
node
is a constant node, the result is unpredictable.
The pointer passed to cuddT must be regular.
- Side Effects none
- See Also
Cudd_T
- Defined in
cuddInt.h
(
)
- Returns the then child of an internal node. If
node
is a constant node, the result is unpredictable.
- Side Effects none
- See Also
Cudd_E
Cudd_V
- Defined in
cudd.h
(
)
- Returns the value of a constant node. If
node
is an internal node, the result is unpredictable.
The pointer passed to cuddV must be regular.
- Side Effects none
- See Also
Cudd_V
- Defined in
cuddInt.h
(
)
- Returns the value of a constant node. If
node
is an internal node, the result is unpredictable.
- Side Effects none
- See Also
Cudd_T
Cudd_E
- Defined in
cudd.h
(
)
- Saturating decrement operator.
- Side Effects none
- See Also
cuddSatInc
- Defined in
cuddInt.h
(
)
- Saturating increment operator.
- Side Effects none
- See Also
cuddSatDec
- Defined in
cuddInt.h