SVF
|
Go to the source code of this file.
Macros | |
#define | MODULUS1 2147483563 |
#define | LEQA1 40014 |
#define | LEQQ1 53668 |
#define | LEQR1 12211 |
#define | MODULUS2 2147483399 |
#define | LEQA2 40692 |
#define | LEQQ2 52774 |
#define | LEQR2 3791 |
#define | STAB_SIZE 64 |
#define | STAB_DIV (1 + (MODULUS1 - 1) / STAB_SIZE) |
#define | bang(f) ((Cudd_IsComplement(f)) ? '!' : ' ') |
Variables | |
static char rcsid [] | DD_UNUSED = "$Id: cuddUtil.c,v 1.83 2012/02/05 01:07:19 fabio Exp $" |
static DdNode * | background |
static DdNode * | zero |
static long | cuddRand = 0 |
static long | cuddRand2 |
static long | shuffleSelect |
static long | shuffleTable [STAB_SIZE] |
#define bang | ( | f | ) | ((Cudd_IsComplement(f)) ? '!' : ' ') |
Definition at line 160 of file cuddUtil.c.
#define LEQA1 40014 |
Definition at line 122 of file cuddUtil.c.
#define LEQA2 40692 |
Definition at line 126 of file cuddUtil.c.
#define LEQQ1 53668 |
Definition at line 123 of file cuddUtil.c.
#define LEQQ2 52774 |
Definition at line 127 of file cuddUtil.c.
#define LEQR1 12211 |
Definition at line 124 of file cuddUtil.c.
#define LEQR2 3791 |
Definition at line 128 of file cuddUtil.c.
#define MODULUS1 2147483563 |
CFile***********************************************************************
FileName [cuddUtil.c]
PackageName [cudd]
Synopsis [Utility functions.]
Description [External procedures included in this module:
Internal procedures included in this module:
Static procedures included in this module:
]
Author [Fabio Somenzi]
Copyright [Copyright (c) 1995-2012, Regents of the University of Colorado
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
Neither the name of the University of Colorado nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.]
Definition at line 121 of file cuddUtil.c.
#define MODULUS2 2147483399 |
Definition at line 125 of file cuddUtil.c.
Definition at line 130 of file cuddUtil.c.
#define STAB_SIZE 64 |
Definition at line 129 of file cuddUtil.c.
Function********************************************************************
Synopsis [Computes the cube of an array of ADD variables.]
Description [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.]
SideEffects [none]
SeeAlso [Cudd_bddComputeCube]
Definition at line 2254 of file cuddUtil.c.
double Cudd_AverageDistance | ( | DdManager * | dd | ) |
Function********************************************************************
Synopsis [Computes the average distance between adjacent nodes.]
Description [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.]
SideEffects [None]
SeeAlso []
Definition at line 2622 of file cuddUtil.c.
Function********************************************************************
Synopsis [Computes the cube of an array of BDD variables.]
Description [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.]
SideEffects [None]
SeeAlso [Cudd_addComputeCube Cudd_IndicesToCube Cudd_CubeArrayToBdd]
Definition at line 2204 of file cuddUtil.c.
Function********************************************************************
Synopsis [Picks k on-set minterms evenly distributed from given DD.]
Description [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:
f
may be the constant 0; f
. ]
SideEffects [None]
SeeAlso [Cudd_bddPickOneMinterm Cudd_bddPickOneCube]
Definition at line 1401 of file cuddUtil.c.
Function********************************************************************
Synopsis [Picks one on-set cube randomly from the given DD.]
Description [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.]
SideEffects [None]
SeeAlso [Cudd_bddPickOneMinterm]
Definition at line 1229 of file cuddUtil.c.
Function********************************************************************
Synopsis [Picks one on-set minterm randomly from the given DD.]
Description [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:
f
may be the constant 0; f
. ]
SideEffects [None]
SeeAlso [Cudd_bddPickOneCube]
Definition at line 1299 of file cuddUtil.c.
Function********************************************************************
Synopsis [Prints a sum of prime implicants of a BDD.]
Description [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.]
SideEffects [None]
SeeAlso [Cudd_PrintMinterm]
Definition at line 257 of file cuddUtil.c.
Function********************************************************************
Synopsis [Builds a positional array from the BDD of a cube.]
Description [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.]
SideEffects [The result is in the array passed by reference.]
SeeAlso [Cudd_CubeArrayToBdd]
Definition at line 2354 of file cuddUtil.c.
int Cudd_ClassifySupport | ( | DdManager * | dd, |
DdNode * | f, | ||
DdNode * | g, | ||
DdNode ** | common, | ||
DdNode ** | onlyF, | ||
DdNode ** | onlyG | ||
) |
Function********************************************************************
Synopsis [Classifies the variables in the support of two DDs.]
Description [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.]
SideEffects [The cubes of the three classes of variables are returned as side effects.]
SeeAlso [Cudd_Support Cudd_VectorSupport]
Definition at line 1101 of file cuddUtil.c.
int Cudd_CountLeaves | ( | DdNode * | node | ) |
Function********************************************************************
Synopsis [Counts the number of leaves in a DD.]
Description [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.]
SideEffects [None]
SeeAlso [Cudd_PrintDebug]
Definition at line 1202 of file cuddUtil.c.
Function********************************************************************
Synopsis [Counts the number of minterms of a DD.]
Description [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.]
SideEffects [None]
SeeAlso [Cudd_PrintDebug Cudd_CountPath]
Definition at line 582 of file cuddUtil.c.
double Cudd_CountPath | ( | DdNode * | node | ) |
Function********************************************************************
Synopsis [Counts the number of paths of a DD.]
Description [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.]
SideEffects [None]
SeeAlso [Cudd_CountMinterm]
Definition at line 627 of file cuddUtil.c.
double Cudd_CountPathsToNonZero | ( | DdNode * | node | ) |
Function********************************************************************
Synopsis [Counts the number of paths to a non-zero terminal of a DD.]
Description [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.]
SideEffects [None]
SeeAlso [Cudd_CountMinterm Cudd_CountPath]
Definition at line 711 of file cuddUtil.c.
Function********************************************************************
Synopsis [Builds the BDD of a cube from a positional array.]
Description [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.]
SideEffects [None]
SeeAlso [Cudd_bddComputeCube Cudd_IndicesToCube Cudd_BddToCubeArray]
Definition at line 2306 of file cuddUtil.c.
int Cudd_DagSize | ( | DdNode * | node | ) |
Function********************************************************************
Synopsis [Counts the number of nodes in a DD.]
Description [Counts the number of nodes in a DD. Returns the number of nodes in the graph rooted at node.]
SideEffects [None]
SeeAlso [Cudd_SharingSize Cudd_PrintDebug]
Definition at line 446 of file cuddUtil.c.
Function********************************************************************
Synopsis [Computes the density of a BDD or ADD.]
Description [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.]
SideEffects [None]
SeeAlso [Cudd_CountMinterm Cudd_DagSize]
Definition at line 2810 of file cuddUtil.c.
Function********************************************************************
Synopsis [Counts the number of minterms of a DD with extended precision.]
Description [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.]
SideEffects [None]
SeeAlso [Cudd_PrintDebug Cudd_CountPath]
Definition at line 661 of file cuddUtil.c.
Function********************************************************************
Synopsis [Estimates the number of nodes in a cofactor of a DD.]
Description [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 not 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.]
SideEffects [None]
SeeAlso [Cudd_DagSize Cudd_EstimateCofactorSimple]
Definition at line 481 of file cuddUtil.c.
int Cudd_EstimateCofactorSimple | ( | DdNode * | node, |
int | i | ||
) |
Function********************************************************************
Synopsis [Estimates the number of nodes in a cofactor of a DD.]
Description [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.]
SideEffects [None]
SeeAlso [Cudd_DagSize]
Definition at line 521 of file cuddUtil.c.
DdGen* Cudd_FirstCube | ( | DdManager * | dd, |
DdNode * | f, | ||
int ** | cube, | ||
CUDD_VALUE_TYPE * | value | ||
) |
Function********************************************************************
Synopsis [Finds the first cube of a decision diagram.]
Description [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.]
SideEffects [The first cube and its value are returned as side effects.]
SeeAlso [Cudd_ForeachCube Cudd_NextCube Cudd_GenFree Cudd_IsGenEmpty Cudd_FirstNode]
Definition at line 1806 of file cuddUtil.c.
Function********************************************************************
Synopsis [Finds the first node of a decision diagram.]
Description [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.]
SideEffects [The first node is returned as a side effect.]
SeeAlso [Cudd_ForeachNode Cudd_NextNode Cudd_GenFree Cudd_IsGenEmpty Cudd_FirstCube]
Definition at line 2408 of file cuddUtil.c.
Function********************************************************************
Synopsis [Finds the first prime of a Boolean function.]
Description [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.]
SideEffects [The first cube is returned as side effect.]
SeeAlso [Cudd_ForeachPrime Cudd_NextPrime Cudd_GenFree Cudd_IsGenEmpty Cudd_FirstCube Cudd_FirstNode]
Definition at line 2036 of file cuddUtil.c.
int Cudd_GenFree | ( | DdGen * | gen | ) |
Function********************************************************************
Synopsis [Frees a CUDD generator.]
Description [Frees a CUDD generator. Always returns 0, so that it can be used in mis-like foreach constructs.]
SideEffects [None]
SeeAlso [Cudd_ForeachCube Cudd_ForeachNode Cudd_FirstCube Cudd_NextCube Cudd_FirstNode Cudd_NextNode Cudd_IsGenEmpty]
Definition at line 2499 of file cuddUtil.c.
Function********************************************************************
Synopsis [Builds a cube of BDD variables from an array of indices.]
Description [Builds a cube of BDD variables from an array of indices. Returns a pointer to the result if successful; NULL otherwise.]
SideEffects [None]
SeeAlso [Cudd_bddComputeCube Cudd_CubeArrayToBdd]
Definition at line 2561 of file cuddUtil.c.
int Cudd_IsGenEmpty | ( | DdGen * | gen | ) |
Function********************************************************************
Synopsis [Queries the status of a generator.]
Description [Queries the status of a generator. Returns 1 if the generator is empty or NULL; 0 otherswise.]
SideEffects [None]
SeeAlso [Cudd_ForeachCube Cudd_ForeachNode Cudd_FirstCube Cudd_NextCube Cudd_FirstNode Cudd_NextNode Cudd_GenFree]
Definition at line 2539 of file cuddUtil.c.
int Cudd_NextCube | ( | DdGen * | gen, |
int ** | cube, | ||
CUDD_VALUE_TYPE * | value | ||
) |
Function********************************************************************
Synopsis [Generates the next cube of a decision diagram onset.]
Description [Generates the next cube of a decision diagram onset, using generator gen. Returns 0 if the enumeration is completed; 1 otherwise.]
SideEffects [The cube and its value are returned as side effects. The generator is modified.]
SeeAlso [Cudd_ForeachCube Cudd_FirstCube Cudd_GenFree Cudd_IsGenEmpty Cudd_NextNode]
Definition at line 1925 of file cuddUtil.c.
Function********************************************************************
Synopsis [Finds the next node of a decision diagram.]
Description [Finds the node of a decision diagram, using generator gen. Returns 0 if the enumeration is completed; 1 otherwise.]
SideEffects [The next node is returned as a side effect.]
SeeAlso [Cudd_ForeachNode Cudd_FirstNode Cudd_GenFree Cudd_IsGenEmpty Cudd_NextCube]
Definition at line 2467 of file cuddUtil.c.
int Cudd_NextPrime | ( | DdGen * | gen, |
int ** | cube | ||
) |
Function********************************************************************
Synopsis [Generates the next prime of a Boolean function.]
Description [Generates the next cube of a Boolean function, using generator gen. Returns 0 if the enumeration is completed; 1 otherwise.]
SideEffects [The cube and is returned as side effects. The generator is modified.]
SeeAlso [Cudd_ForeachPrime Cudd_FirstPrime Cudd_GenFree Cudd_IsGenEmpty Cudd_NextCube Cudd_NextNode]
Definition at line 2138 of file cuddUtil.c.
void Cudd_OutOfMem | ( | long | size | ) |
Function********************************************************************
Synopsis [Warns that a memory allocation failed.]
Description [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.]
SideEffects [None]
SeeAlso []
Definition at line 2845 of file cuddUtil.c.
Function********************************************************************
Synopsis [Prints to the standard output a DD and its statistics.]
Description [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:
For the purpose of counting the number of minterms, the function is supposed to depend on n variables. Returns 1 if successful; 0 otherwise.]
SideEffects [None]
SeeAlso [Cudd_DagSize Cudd_CountLeaves Cudd_CountMinterm Cudd_PrintMinterm]
Definition at line 386 of file cuddUtil.c.
AutomaticEnd Function********************************************************************
Synopsis [Prints a disjoint sum of products.]
Description [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.]
SideEffects [None]
SeeAlso [Cudd_PrintDebug Cudd_bddPrintCover]
Definition at line 220 of file cuddUtil.c.
void Cudd_PrintVersion | ( | FILE * | fp | ) |
Function********************************************************************
Synopsis [Prints the package version number.]
Description []
SideEffects [None]
SeeAlso []
Definition at line 2600 of file cuddUtil.c.
long Cudd_Random | ( | void | ) |
Function********************************************************************
Synopsis [Portable random number generator.]
Description [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.]
SideEffects [None]
SeeAlso [Cudd_Srandom]
Definition at line 2710 of file cuddUtil.c.
int Cudd_SharingSize | ( | DdNode ** | nodeArray, |
int | n | ||
) |
Function********************************************************************
Synopsis [Counts the number of nodes in an array of DDs.]
Description [Counts the number of nodes in an array of DDs. Shared nodes are counted only once. Returns the total number of nodes.]
SideEffects [None]
SeeAlso [Cudd_DagSize]
Definition at line 548 of file cuddUtil.c.
void Cudd_Srandom | ( | long | seed | ) |
Function********************************************************************
Synopsis [Initializer for the portable random number generator.]
Description [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.]
SideEffects [None]
SeeAlso [Cudd_Random]
Definition at line 2772 of file cuddUtil.c.
DdNode* Cudd_SubsetWithMaskVars | ( | DdManager * | dd, |
DdNode * | f, | ||
DdNode ** | vars, | ||
int | nvars, | ||
DdNode ** | maskVars, | ||
int | mvars | ||
) |
Function********************************************************************
Synopsis [Extracts a subset from a BDD.]
Description [Extracts a subset from a BDD in the following procedure.
SideEffects [None]
SeeAlso []
Definition at line 1610 of file cuddUtil.c.
Function********************************************************************
Synopsis [Finds the variables on which a DD depends.]
Description [Finds the variables on which a DD depends. Returns a BDD consisting of the product of the variables if successful; NULL otherwise.]
SideEffects [None]
SeeAlso [Cudd_VectorSupport Cudd_ClassifySupport]
Definition at line 789 of file cuddUtil.c.
Function********************************************************************
Synopsis [Finds the variables on which a DD depends.]
Description [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.]
SideEffects [None]
SeeAlso [Cudd_Support Cudd_SupportIndices Cudd_ClassifySupport]
Definition at line 842 of file cuddUtil.c.
Function********************************************************************
Synopsis [Finds the variables on which a DD depends.]
Description [Finds the variables on which a DD depends. Returns the number of variables if successful; CUDD_OUT_OF_MEM otherwise.]
SideEffects [The indices of the support variables are returned as side effects. If the function is constant, no array is allocated.]
SeeAlso [Cudd_Support Cudd_SupportIndex Cudd_VectorSupportIndices]
Definition at line 744 of file cuddUtil.c.
Function********************************************************************
Synopsis [Counts the variables on which a DD depends.]
Description [Returns the variables on which a DD depends.]
SideEffects [None]
SeeAlso [Cudd_Support Cudd_SupportIndices]
Definition at line 882 of file cuddUtil.c.
Function********************************************************************
Synopsis [Finds the variables on which a set of DDs depends.]
Description [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.]
SideEffects [None]
SeeAlso [Cudd_Support Cudd_ClassifySupport]
Definition at line 966 of file cuddUtil.c.
Function********************************************************************
Synopsis [Finds the variables on which a set of DDs depends.]
Description [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.]
SideEffects [None]
SeeAlso [Cudd_SupportIndex Cudd_VectorSupport Cudd_VectorSupportIndices]
Definition at line 1017 of file cuddUtil.c.
Function********************************************************************
Synopsis [Finds the variables on which a set of DDs depends.]
Description [Finds the variables on which a set of DDs depends. The set must contain either BDDs and ADDs, or ZDDs. Returns the number of variables if successful; CUDD_OUT_OF_MEM otherwise.]
SideEffects [The indices of the support variables are returned as side effects. If the function is constant, no array is allocated.]
SeeAlso [Cudd_Support Cudd_SupportIndex Cudd_VectorSupportIndices]
Definition at line 912 of file cuddUtil.c.
Function********************************************************************
Synopsis [Counts the variables on which a set of DDs depends.]
Description [Returns the variables on which a set of DDs depends. The set must contain either BDDs and ADDs, or ZDDs.]
SideEffects [None]
SeeAlso [Cudd_VectorSupport Cudd_SupportSize]
Definition at line 1063 of file cuddUtil.c.
Function********************************************************************
Synopsis [Recursively collects all the nodes of a DD in a symbol table.]
Description [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.]
SideEffects [None]
SeeAlso []
Definition at line 2933 of file cuddUtil.c.
|
static |
Function********************************************************************
Synopsis [Performs the recursive step of Cudd_CofactorEstimate.]
Description [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.]
SideEffects [None]
SeeAlso []
Definition at line 3248 of file cuddUtil.c.
|
static |
Function********************************************************************
Synopsis [Performs the recursive step of Cudd_CofactorEstimateSimple.]
Description [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.]
SideEffects [None]
SeeAlso []
Definition at line 3407 of file cuddUtil.c.
Function********************************************************************
Synopsis [Recursively collects all the nodes of a DD in an array.]
Description [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.]
SideEffects [The number of nodes is returned as a side effect.]
SeeAlso [Cudd_FirstNode]
Definition at line 2987 of file cuddUtil.c.
Function********************************************************************
Synopsis [Performs the recursive step of cuddNodeArray.]
Description [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.]
SideEffects [None]
SeeAlso []
Definition at line 3208 of file cuddUtil.c.
Function********************************************************************
Synopsis [Prints a DD to the standard output. One line per node is printed.]
Description [Prints a DD to the standard output. One line per node is printed. Returns 1 if successful; 0 otherwise.]
SideEffects [None]
SeeAlso [Cudd_PrintDebug]
Definition at line 2874 of file cuddUtil.c.
enum st_retval cuddStCountfree | ( | char * | key, |
char * | value, | ||
char * | arg | ||
) |
Function********************************************************************
Synopsis [Frees the memory used to store the minterm counts recorded in the visited table.]
Description [Frees the memory used to store the minterm counts recorded in the visited table. Returns ST_CONTINUE.]
SideEffects [None]
Definition at line 2903 of file cuddUtil.c.
Function********************************************************************
Synopsis [Checks the unique table for the existence of an internal node.]
Description [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.]
SideEffects [None]
SeeAlso [cuddUniqueInter]
Definition at line 3348 of file cuddUtil.c.
|
static |
Function********************************************************************
Synopsis [Performs a DFS from f, clearing the LSB of the next pointers.]
Description []
SideEffects [None]
SeeAlso [ddSupportStep ddFindSupport ddLeavesInt ddDagInt]
Definition at line 3741 of file cuddUtil.c.
|
static |
Function********************************************************************
Synopsis [Clears visited flags for variables.]
Description [Clears visited flags for variables.]
SideEffects [None]
Definition at line 3998 of file cuddUtil.c.
|
static |
Function********************************************************************
Synopsis [Performs the recursive step of Cudd_CountMinterm.]
Description [Performs the recursive step of Cudd_CountMinterm. It is based on the following identity. Let |f| be the number of minterms of f. Then: <xmp> |f| = (|f0|+|f1|)/2 </xmp> 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.]
SideEffects [None]
Definition at line 3447 of file cuddUtil.c.
Function********************************************************************
Synopsis [Performs the recursive step of Cudd_CountPath.]
Description [Performs the recursive step of Cudd_CountPath. It is based on the following identity. Let |f| be the number of paths of f. Then: <xmp> |f| = |f0|+|f1| </xmp> 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.]
SideEffects [None]
Definition at line 3520 of file cuddUtil.c.
Function********************************************************************
Synopsis [Performs the recursive step of Cudd_CountPathsToNonZero.]
Description [Performs the recursive step of Cudd_CountPathsToNonZero. It is based on the following identity. Let |f| be the number of paths of f. Then: <xmp> |f| = |f0|+|f1| </xmp> where f0 and f1 are the two cofactors of f. Returns the number of paths of the function rooted at node.]
SideEffects [None]
Definition at line 3653 of file cuddUtil.c.
|
static |
Function********************************************************************
Synopsis [Performs the recursive step of Cudd_DagSize.]
Description [Performs the recursive step of Cudd_DagSize. Returns the number of nodes in the graph rooted at n.]
SideEffects [None]
Definition at line 3173 of file cuddUtil.c.
|
static |
Function********************************************************************
Synopsis [Performs the recursive step of Cudd_EpdCountMinterm.]
Description [Performs the recursive step of Cudd_EpdCountMinterm. It is based on the following identity. Let |f| be the number of minterms of f. Then: <xmp> |f| = (|f0|+|f1|)/2 </xmp> 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.]
SideEffects [None]
Definition at line 3581 of file cuddUtil.c.
|
static |
Function********************************************************************
Synopsis [Frees the memory used to store the minterm counts recorded in the visited table.]
Description [Frees the memory used to store the minterm counts recorded in the visited table. Returns ST_CONTINUE.]
SideEffects [None]
Definition at line 3928 of file cuddUtil.c.
Function********************************************************************
Synopsis [Recursively find the support of f.]
Description [Recursively find the support of f. This function uses the LSB of the next field of the nodes of f as visited flag. It also uses the LSB of the next field of the variables as flag to remember whether a certain index has already been seen. Finally, it uses the manager stack to record all seen indices.]
SideEffects [The stack pointer SP is modified by side-effect. The next fields are changed and need to be reset.]
Definition at line 3957 of file cuddUtil.c.
|
static |
Function********************************************************************
Synopsis [Performs the recursive step of Cudd_CountLeaves.]
Description [Performs the recursive step of Cudd_CountLeaves. Returns the number of leaves in the DD rooted at n.]
SideEffects [None]
SeeAlso [Cudd_CountLeaves]
Definition at line 3772 of file cuddUtil.c.
|
static |
Function********************************************************************
Synopsis [Performs the recursive step of Cudd_bddPickArbitraryMinterms.]
Description [Performs the recursive step of Cudd_bddPickArbitraryMinterms. Returns 1 if successful; 0 otherwise.]
SideEffects [none]
SeeAlso [Cudd_bddPickArbitraryMinterms]
Definition at line 3804 of file cuddUtil.c.
|
static |
Function********************************************************************
Synopsis [Finds a representative cube of a BDD.]
Description [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.]
SideEffects [Cudd_SubsetWithMaskVars Cudd_bddPickOneCube]
Definition at line 3865 of file cuddUtil.c.
Function********************************************************************
Synopsis [Performs the recursive step of Cudd_PrintMinterm.]
Description []
SideEffects [None]
Definition at line 3119 of file cuddUtil.c.
|
static |
Function********************************************************************
Synopsis [Performs the recursive step of Cudd_Support.]
Description [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.]
SideEffects [None]
SeeAlso [ddClearFlag]
Definition at line 3712 of file cuddUtil.c.
AutomaticStart
Function********************************************************************
Synopsis [Performs the recursive step of cuddP.]
Description [Performs the recursive step of cuddP. Returns 1 in case of success; 0 otherwise.]
SideEffects [None]
Definition at line 3026 of file cuddUtil.c.
|
static |
Function********************************************************************
Synopsis [Compares indices for qsort.]
Description [Compares indices for qsort. Subtracting these integers cannot produce overflow, because they are non-negative.]
SideEffects [None]
Definition at line 4024 of file cuddUtil.c.
|
static |
Definition at line 149 of file cuddUtil.c.
|
static |
Definition at line 151 of file cuddUtil.c.
|
static |
Definition at line 152 of file cuddUtil.c.
|
static |
Definition at line 146 of file cuddUtil.c.
|
static |
Definition at line 153 of file cuddUtil.c.
|
static |
Definition at line 154 of file cuddUtil.c.
|
static |
Definition at line 149 of file cuddUtil.c.