#include "extraBdd.h"
Go to the source code of this file.
Functions | |
| void | ddSupportStep2 (DdNode *f, int *support) |
| void | ddClearFlag2 (DdNode *f) |
| DdNode * | Extra_TransferPermute (DdManager *ddSource, DdManager *ddDestination, DdNode *f, int *Permute) |
| DdNode * | Extra_TransferLevelByLevel (DdManager *ddSource, DdManager *ddDestination, DdNode *f) |
| DdNode * | Extra_bddRemapUp (DdManager *dd, DdNode *bF) |
| DdNode * | Extra_bddMove (DdManager *dd, DdNode *bF, int nVars) |
| void | Extra_StopManager (DdManager *dd) |
| void | Extra_bddPrint (DdManager *dd, DdNode *F) |
| void | Extra_bddPrintSupport (DdManager *dd, DdNode *F) |
| int | Extra_bddSuppSize (DdManager *dd, DdNode *bSupp) |
| int | Extra_bddSuppContainVar (DdManager *dd, DdNode *bS, DdNode *bVar) |
| int | Extra_bddSuppOverlapping (DdManager *dd, DdNode *S1, DdNode *S2) |
| int | Extra_bddSuppDifferentVars (DdManager *dd, DdNode *S1, DdNode *S2, int DiffMax) |
| int | Extra_bddSuppCheckContainment (DdManager *dd, DdNode *bL, DdNode *bH, DdNode **bLarge, DdNode **bSmall) |
| int * | Extra_SupportArray (DdManager *dd, DdNode *f, int *support) |
| int * | Extra_VectorSupportArray (DdManager *dd, DdNode **F, int n, int *support) |
| DdNode * | Extra_bddFindOneCube (DdManager *dd, DdNode *bF) |
| DdNode * | Extra_bddGetOneCube (DdManager *dd, DdNode *bFunc) |
| DdNode * | Extra_bddComputeRangeCube (DdManager *dd, int iStart, int iStop) |
| DdNode * | Extra_bddBitsToCube (DdManager *dd, int Code, int CodeWidth, DdNode **pbVars, int fMsbFirst) |
| DdNode * | Extra_bddSupportNegativeCube (DdManager *dd, DdNode *f) |
| int | Extra_bddIsVar (DdNode *bFunc) |
| DdNode * | Extra_bddCreateAnd (DdManager *dd, int nVars) |
| DdNode * | Extra_bddCreateOr (DdManager *dd, int nVars) |
| DdNode * | Extra_bddCreateExor (DdManager *dd, int nVars) |
| DdNode * | Extra_zddPrimes (DdManager *dd, DdNode *F) |
| void | Extra_bddPermuteArray (DdManager *manager, DdNode **bNodesIn, DdNode **bNodesOut, int nNodes, int *permut) |
| DdNode * | Extra_bddComputeCube (DdManager *dd, DdNode **bXVars, int nVars) |
| DdNode * | Extra_bddChangePolarity (DdManager *dd, DdNode *bFunc, DdNode *bVars) |
| int | Extra_bddVarIsInCube (DdNode *bCube, int iVar) |
| DdNode * | Extra_bddAndPermute (DdManager *ddF, DdNode *bF, DdManager *ddG, DdNode *bG, int *pPermute) |
| DdNode * | extraBddMove (DdManager *dd, DdNode *bF, DdNode *bDist) |
| void | extraDecomposeCover (DdManager *dd, DdNode *zC, DdNode **zC0, DdNode **zC1, DdNode **zC2) |
| int | Extra_bddCountCubes (DdManager *dd, DdNode **pFuncs, int nFuncs, int fMode, int nLimit, int *pGuide) |
| DdNode * | extraComposeCover (DdManager *dd, DdNode *zC0, DdNode *zC1, DdNode *zC2, int TopVar) |
| DdNode * | extraBddChangePolarity (DdManager *dd, DdNode *bFunc, DdNode *bVars) |
| void | Extra_TestAndPerm (DdManager *ddF, DdNode *bF, DdNode *bG) |
| void | Extra_zddDumpPla (DdManager *dd, DdNode *F, int nVars, char *pFileName) |
| void | Extra_GraphExperiment () |
| DdNode * | extraZddCombination (DdManager *dd, int *VarValues, int nVars) |
| DdNode * | Extra_zddCombination (DdManager *dd, int *VarValues, int nVars) |
| DdNode * | Extra_zddRandomSet (DdManager *dd, int n, int k, double d) |
| void | Extra_ZddTest () |
| DdNode * | extraBddTuples (DdManager *dd, DdNode *bVarsK, DdNode *bVarsN) |
| DdNode * | Extra_bddTuples (DdManager *dd, int K, DdNode *VarsN) |
| void ddClearFlag2 | ( | DdNode * | f | ) |
Function********************************************************************
Synopsis [Performs a DFS from f, clearing the LSB of the next pointers.]
Description []
SideEffects [None]
SeeAlso [ddSupportStep ddDagInt]
Definition at line 1724 of file extraBddMisc.c.


| void ddSupportStep2 | ( | DdNode * | f, |
| int * | support ) |
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 1693 of file extraBddMisc.c.


| DdNode * Extra_bddAndPermute | ( | DdManager * | ddF, |
| DdNode * | bF, | ||
| DdManager * | ddG, | ||
| DdNode * | bG, | ||
| int * | pPermute ) |
Function*************************************************************
Synopsis [Computes the AND of two BDD with different orders.]
Description [Derives the result of Boolean AND of bF and bG in ddF. The array pPermute gives the mapping of variables of ddG into that of ddF.]
SideEffects []
SeeAlso []
Definition at line 1090 of file extraBddMisc.c.

| DdNode * Extra_bddBitsToCube | ( | DdManager * | dd, |
| int | Code, | ||
| int | CodeWidth, | ||
| DdNode ** | pbVars, | ||
| int | fMsbFirst ) |
Function********************************************************************
Synopsis [Computes the cube of BDD variables corresponding to bits it the bit-code]
Description [Returns a bdd composed of elementary bdds found in array BddVars[] such that the bdd vars encode the number Value of bit length CodeWidth (if fMsbFirst is 1, the most significant bit is encoded with the first bdd variable). If the variables BddVars are not specified, takes the first CodeWidth variables of the manager]
SideEffects []
SeeAlso []
Definition at line 730 of file extraBddMisc.c.

| DdNode * Extra_bddChangePolarity | ( | DdManager * | dd, |
| DdNode * | bFunc, | ||
| DdNode * | bVars ) |
Function********************************************************************
Synopsis [Changes the polarity of vars listed in the cube.]
Description []
SideEffects []
SeeAlso []
Definition at line 1029 of file extraBddMisc.c.


| DdNode * Extra_bddComputeCube | ( | DdManager * | dd, |
| DdNode ** | bXVars, | ||
| int | nVars ) |
Function********************************************************************
Synopsis [Computes the positive polarty cube composed of the first vars in the array.]
Description []
SideEffects []
SeeAlso []
Definition at line 1001 of file extraBddMisc.c.

| DdNode * Extra_bddComputeRangeCube | ( | DdManager * | dd, |
| int | iStart, | ||
| int | iStop ) |
Function********************************************************************
Synopsis [Performs the reordering-sensitive step of Extra_bddMove().]
Description []
SideEffects []
SeeAlso []
Definition at line 699 of file extraBddMisc.c.
| int Extra_bddCountCubes | ( | DdManager * | dd, |
| DdNode ** | pFuncs, | ||
| int | nFuncs, | ||
| int | fMode, | ||
| int | nLimit, | ||
| int * | pGuide ) |
Definition at line 1485 of file extraBddMisc.c.


| DdNode * Extra_bddCreateAnd | ( | DdManager * | dd, |
| int | nVars ) |
Function********************************************************************
Synopsis [Creates AND composed of the first nVars of the manager.]
Description []
SideEffects []
SeeAlso []
Definition at line 858 of file extraBddMisc.c.

| DdNode * Extra_bddCreateExor | ( | DdManager * | dd, |
| int | nVars ) |
Function********************************************************************
Synopsis [Creates EXOR composed of the first nVars of the manager.]
Description []
SideEffects []
SeeAlso []
Definition at line 908 of file extraBddMisc.c.

| DdNode * Extra_bddCreateOr | ( | DdManager * | dd, |
| int | nVars ) |
Function********************************************************************
Synopsis [Creates OR composed of the first nVars of the manager.]
Description []
SideEffects []
SeeAlso []
Definition at line 883 of file extraBddMisc.c.

| DdNode * Extra_bddFindOneCube | ( | DdManager * | dd, |
| DdNode * | bF ) |
Function********************************************************************
Synopsis [Find any cube belonging to the on-set of the function.]
Description []
SideEffects []
SeeAlso []
Definition at line 605 of file extraBddMisc.c.

| DdNode * Extra_bddGetOneCube | ( | DdManager * | dd, |
| DdNode * | bFunc ) |
Function********************************************************************
Synopsis [Returns one cube contained in the given BDD.]
Description [This function returns the cube with the smallest bits-to-integer value.]
SideEffects []
Definition at line 645 of file extraBddMisc.c.


| int Extra_bddIsVar | ( | DdNode * | bFunc | ) |
Function********************************************************************
Synopsis [Returns 1 if the BDD is the BDD of elementary variable.]
Description []
SideEffects []
SeeAlso []
Definition at line 839 of file extraBddMisc.c.
| DdNode * Extra_bddMove | ( | DdManager * | dd, |
| DdNode * | bF, | ||
| int | nVars ) |
Function********************************************************************
Synopsis [Moves the BDD by the given number of variables up or down.]
Description []
SideEffects []
SeeAlso [Extra_bddShift]
Definition at line 187 of file extraBddMisc.c.


| void Extra_bddPermuteArray | ( | DdManager * | manager, |
| DdNode ** | bNodesIn, | ||
| DdNode ** | bNodesOut, | ||
| int | nNodes, | ||
| int * | permut ) |
Function********************************************************************
Synopsis [Permutes the variables of the array of BDDs.]
Description [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. The DDs in the resulting array are already referenced.]
SideEffects [None]
SeeAlso [Cudd_addPermute Cudd_bddSwapVariables]
Definition at line 961 of file extraBddMisc.c.

| void Extra_bddPrint | ( | DdManager * | dd, |
| DdNode * | F ) |
Function********************************************************************
Synopsis [Outputs the BDD in a readable format.]
Description []
SideEffects [None]
SeeAlso []
Definition at line 246 of file extraBddMisc.c.

| void Extra_bddPrintSupport | ( | DdManager * | dd, |
| DdNode * | F ) |
Function********************************************************************
Synopsis [Outputs the BDD in a readable format.]
Description []
SideEffects [None]
SeeAlso []
Definition at line 302 of file extraBddMisc.c.


| DdNode * Extra_bddRemapUp | ( | DdManager * | dd, |
| DdNode * | bF ) |
Function********************************************************************
Synopsis [Remaps the function to depend on the topmost variables on the manager.]
Description []
SideEffects []
SeeAlso []
Definition at line 145 of file extraBddMisc.c.

| int Extra_bddSuppCheckContainment | ( | DdManager * | dd, |
| DdNode * | bL, | ||
| DdNode * | bH, | ||
| DdNode ** | bLarge, | ||
| DdNode ** | bSmall ) |
Function********************************************************************
Synopsis [Checks the support containment.]
Description [This function returns 1 if one support is contained in another. In this case, bLarge (bSmall) is assigned to point to the larger (smaller) support. If the supports are identical, return 0 and does not assign the supports!]
SideEffects []
SeeAlso []
Definition at line 443 of file extraBddMisc.c.
| int Extra_bddSuppContainVar | ( | DdManager * | dd, |
| DdNode * | bS, | ||
| DdNode * | bVar ) |
Function********************************************************************
Synopsis [Returns 1 if the support contains the given BDD variable.]
Description []
SideEffects []
SeeAlso []
Definition at line 346 of file extraBddMisc.c.
| int Extra_bddSuppDifferentVars | ( | DdManager * | dd, |
| DdNode * | S1, | ||
| DdNode * | S2, | ||
| int | DiffMax ) |
Function********************************************************************
Synopsis [Returns the number of different vars in two supports.]
Description [Counts the number of variables that appear in one support and does not appear in other support. If the number exceeds DiffMax, returns DiffMax.]
SideEffects []
SeeAlso []
Definition at line 393 of file extraBddMisc.c.

| DdNode * Extra_bddSupportNegativeCube | ( | DdManager * | dd, |
| DdNode * | f ) |
Function********************************************************************
Synopsis [Finds the support as a negative polarity cube.]
Description [Finds the variables on which a DD depends. Returns a BDD consisting of the product of the variables in the negative polarity if successful; NULL otherwise.]
SideEffects [None]
SeeAlso [Cudd_VectorSupport Cudd_Support]
Definition at line 764 of file extraBddMisc.c.


| int Extra_bddSuppOverlapping | ( | DdManager * | dd, |
| DdNode * | S1, | ||
| DdNode * | S2 ) |
Function********************************************************************
Synopsis [Returns 1 if two supports represented as BDD cubes are overlapping.]
Description []
SideEffects []
SeeAlso []
Definition at line 365 of file extraBddMisc.c.
| int Extra_bddSuppSize | ( | DdManager * | dd, |
| DdNode * | bSupp ) |
Function********************************************************************
Synopsis [Returns the size of the support.]
Description []
SideEffects []
SeeAlso []
Definition at line 321 of file extraBddMisc.c.

| DdNode * Extra_bddTuples | ( | DdManager * | dd, |
| int | K, | ||
| DdNode * | VarsN ) |
Function********************************************************************
Synopsis [Builds BDD representing the set of fixed-size variable tuples.]
Description [Creates BDD of all combinations of variables in Support that have k vars in them.]
SideEffects []
SeeAlso []
Definition at line 2691 of file extraBddMisc.c.

| int Extra_bddVarIsInCube | ( | DdNode * | bCube, |
| int | iVar ) |
Function*************************************************************
Synopsis [Checks if the given variable belongs to the cube.]
Description [Return -1 if the var does not appear in the cube. Otherwise, returns polarity (0 or 1) of the var in the cube.]
SideEffects []
SeeAlso []
Definition at line 1056 of file extraBddMisc.c.
| void Extra_GraphExperiment | ( | ) |
Function*************************************************************
Synopsis [Constructing ZDD of a graph.]
Description []
SideEffects []
SeeAlso []
Definition at line 2347 of file extraBddMisc.c.
| void Extra_StopManager | ( | DdManager * | dd | ) |
Function*************************************************************
Synopsis []
Description []
SideEffects []
SeeAlso []
Definition at line 223 of file extraBddMisc.c.

| int * Extra_SupportArray | ( | DdManager * | dd, |
| DdNode * | f, | ||
| int * | support ) |
Function********************************************************************
Synopsis [Finds variables on which the DD depends and returns them as am array.]
Description [Finds the variables on which the DD depends. Returns an array with entries set to 1 for those variables that belong to the support; NULL otherwise. The array is allocated by the user and should have at least as many entries as the maximum number of variables in BDD and ZDD parts of the manager.]
SideEffects [None]
SeeAlso [Cudd_Support Cudd_VectorSupport Cudd_ClassifySupport]
Definition at line 537 of file extraBddMisc.c.


| void Extra_TestAndPerm | ( | DdManager * | ddF, |
| DdNode * | bF, | ||
| DdNode * | bG ) |
Function*************************************************************
Synopsis [Testbench.]
Description [This procedure takes BDD manager ddF and two BDDs in this manager (bF and bG). It creates a new manager ddG, transfers bG into it and then reorders it, resulting in bG2. Then it tries to compute the product of bF and bG2 in ddF.]
SideEffects []
SeeAlso []
Definition at line 2250 of file extraBddMisc.c.

| DdNode * Extra_TransferLevelByLevel | ( | DdManager * | ddSource, |
| DdManager * | ddDestination, | ||
| DdNode * | f ) |
Function********************************************************************
Synopsis [Transfers the BDD from one manager into another level by level.]
Description [Transfers the BDD from one manager into another while preserving the correspondence between variables level by level.]
SideEffects [None]
SeeAlso []
Definition at line 112 of file extraBddMisc.c.


| DdNode * Extra_TransferPermute | ( | DdManager * | ddSource, |
| DdManager * | ddDestination, | ||
| DdNode * | f, | ||
| int * | Permute ) |
AutomaticEnd Function********************************************************************
Synopsis [Convert a {A,B}DD from a manager to another with variable remapping.]
Description [Convert a {A,B}DD from a manager to another one. The orders of the variables in the two managers may be different. Returns a pointer to the {A,B}DD in the destination manager if successful; NULL otherwise. The i-th entry in the array Permute tells what is the index of the i-th variable from the old manager in the new manager.]
SideEffects [None]
SeeAlso []
Definition at line 87 of file extraBddMisc.c.

| int * Extra_VectorSupportArray | ( | DdManager * | dd, |
| DdNode ** | F, | ||
| int | n, | ||
| int * | support ) |
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 572 of file extraBddMisc.c.


| DdNode * Extra_zddCombination | ( | DdManager * | dd, |
| int * | VarValues, | ||
| int | nVars ) |
Function********************************************************************
Synopsis [Creates ZDD of the combination containing given variables.]
Description [Creates ZDD of the combination containing given variables. VarValues contains 1 for a variable that belongs to the combination and 0 for a varible that does not belong. nVars is number of ZDD variables in the array.]
SideEffects [New ZDD variables are created if indices of the variables present in the combination are larger than the currently allocated number of ZDD variables.]
SeeAlso []
Definition at line 2451 of file extraBddMisc.c.


| void Extra_zddDumpPla | ( | DdManager * | dd, |
| DdNode * | F, | ||
| int | nVars, | ||
| char * | pFileName ) |
Function*************************************************************
Synopsis [Writes ZDD into a PLA file.]
Description []
SideEffects []
SeeAlso []
Definition at line 2307 of file extraBddMisc.c.
| DdNode * Extra_zddPrimes | ( | DdManager * | dd, |
| DdNode * | F ) |
Function********************************************************************
Synopsis [Computes the set of primes as a ZDD.]
Description []
SideEffects []
SeeAlso []
Definition at line 933 of file extraBddMisc.c.
| DdNode * Extra_zddRandomSet | ( | DdManager * | dd, |
| int | n, | ||
| int | k, | ||
| double | d ) |
Function********************************************************************
Synopsis [Generates a random set of combinations.]
Description [Given a set of n elements, each of which is encoded using one ZDD variable, this function generates a random set of k subsets (combinations of elements) with density d. Assumes that k and n are positive integers. Returns NULL if density is less than 0.0 or more than 1.0.]
SideEffects [Allocates new ZDD variables if their current number is less than n.]
SeeAlso []
Definition at line 2480 of file extraBddMisc.c.


| void Extra_ZddTest | ( | ) |
Function********************************************************************
Synopsis []
Description []
SideEffects []
SeeAlso []
Definition at line 2565 of file extraBddMisc.c.

| DdNode * extraBddChangePolarity | ( | DdManager * | dd, |
| DdNode * | bFunc, | ||
| DdNode * | bVars ) |
Function********************************************************************
Synopsis [Performs the reordering-sensitive step of Extra_bddChangePolarity().]
Description []
SideEffects []
SeeAlso []
Definition at line 2041 of file extraBddMisc.c.


| DdNode * extraBddMove | ( | DdManager * | dd, |
| DdNode * | bF, | ||
| DdNode * | bDist ) |
Function********************************************************************
Synopsis [Performs the reordering-sensitive step of Extra_bddMove().]
Description []
SideEffects []
SeeAlso []
Definition at line 1128 of file extraBddMisc.c.


| DdNode * extraBddTuples | ( | DdManager * | dd, |
| DdNode * | bVarsK, | ||
| DdNode * | bVarsN ) |
Function********************************************************************
Synopsis [Performs the reordering-sensitive step of Extra_bddTuples().]
Description [Generates in a bottom-up fashion BDD for all combinations composed of k variables out of variables belonging to bVarsN.]
SideEffects []
SeeAlso []
Definition at line 2597 of file extraBddMisc.c.


| DdNode * extraComposeCover | ( | DdManager * | dd, |
| DdNode * | zC0, | ||
| DdNode * | zC1, | ||
| DdNode * | zC2, | ||
| int | TopVar ) |
Function********************************************************************
Synopsis [Composed three subcovers into one ZDD.]
Description []
SideEffects [None]
SeeAlso []
Definition at line 1754 of file extraBddMisc.c.
| void extraDecomposeCover | ( | DdManager * | dd, |
| DdNode * | zC, | ||
| DdNode ** | zC0, | ||
| DdNode ** | zC1, | ||
| DdNode ** | zC2 ) |
Function********************************************************************
Synopsis [Finds three cofactors of the cover w.r.t. to the topmost variable.]
Description [Finds three cofactors of the cover w.r.t. to the topmost variable. Does not check the cover for being a constant. Assumes that ZDD variables encoding positive and negative polarities are adjacent in the variable order. Is different from cuddZddGetCofactors3() in that it does not compute the cofactors w.r.t. the given variable but takes the cofactors with respent to the topmost variable. This function is more efficient when used in recursive procedures because it does not require referencing of the resulting cofactors (compare cuddZddProduct() and extraZddPrimeProduct()).]
SideEffects [None]
SeeAlso [cuddZddGetCofactors3]
Definition at line 1217 of file extraBddMisc.c.
| DdNode * extraZddCombination | ( | DdManager * | dd, |
| int * | VarValues, | ||
| int | nVars ) |
Function********************************************************************
Synopsis [Performs the reordering-sensitive step of Extra_zddCombination().]
Description [Generates in a bottom-up fashion ZDD for one combination whose var values are given in the array VarValues. If necessary, creates new variables on the fly.]
SideEffects []
SeeAlso []
Definition at line 2399 of file extraBddMisc.c.
