#include <math.h>
#include "cudd.h"
#include "st.h"
Go to the source code of this file.
Data Structures | |
struct | DdGen |
struct | DdHook |
struct | DdLocalCacheItem |
struct | DdLocalCache |
struct | DdHashItem |
struct | DdHashTable |
struct | DdCache |
struct | DdSubtable |
struct | DdManager |
struct | Move |
struct | DdQueueItem |
struct | DdLevelQueue |
Defines | |
#define | DD_INLINE |
#define | DD_UNUSED |
#define | DD_MAXREF ((DdHalfWord) ~0) |
#define | DD_DEFAULT_RESIZE 10 |
#define | DD_MEM_CHUNK 1022 |
#define | DD_ONE_VAL (1.0) |
#define | DD_ZERO_VAL (0.0) |
#define | DD_EPSILON (1.0e-12) |
#define | DD_PLUS_INF_VAL (10e301) |
#define | DD_CRI_HI_MARK (10e150) |
#define | DD_CRI_LO_MARK (-(DD_CRI_HI_MARK)) |
#define | DD_MINUS_INF_VAL (-(DD_PLUS_INF_VAL)) |
#define | DD_NON_CONSTANT ((DdNode *) 1) |
#define | DD_MAX_SUBTABLE_DENSITY 4 |
#define | DD_GC_FRAC_LO DD_MAX_SUBTABLE_DENSITY * 0.25 |
#define | DD_GC_FRAC_HI DD_MAX_SUBTABLE_DENSITY * 1.0 |
#define | DD_GC_FRAC_MIN 0.2 |
#define | DD_MIN_HIT 30 |
#define | DD_MAX_LOOSE_FRACTION 5 |
#define | DD_MAX_CACHE_FRACTION 3 |
#define | DD_STASH_FRACTION 64 |
#define | DD_MAX_CACHE_TO_SLOTS_RATIO 4 |
#define | DD_SIFT_MAX_VAR 1000 |
#define | DD_SIFT_MAX_SWAPS 2000000 |
#define | DD_DEFAULT_RECOMB 0 |
#define | DD_MAX_REORDER_GROWTH 1.2 |
#define | DD_FIRST_REORDER 4004 |
#define | DD_DYN_RATIO 2 |
#define | DD_P1 12582917 |
#define | DD_P2 4256249 |
#define | DD_P3 741457 |
#define | DD_P4 1618033999 |
#define | DD_ADD_ITE_TAG 0x02 |
#define | DD_BDD_AND_ABSTRACT_TAG 0x06 |
#define | DD_BDD_XOR_EXIST_ABSTRACT_TAG 0x0a |
#define | DD_BDD_ITE_TAG 0x0e |
#define | DD_ADD_BDD_DO_INTERVAL_TAG 0x22 |
#define | DD_BDD_CLIPPING_AND_ABSTRACT_UP_TAG 0x26 |
#define | DD_BDD_CLIPPING_AND_ABSTRACT_DOWN_TAG 0x2a |
#define | DD_BDD_COMPOSE_RECUR_TAG 0x2e |
#define | DD_ADD_COMPOSE_RECUR_TAG 0x42 |
#define | DD_ADD_NON_SIM_COMPOSE_TAG 0x46 |
#define | DD_EQUIV_DC_TAG 0x4a |
#define | DD_ZDD_ITE_TAG 0x4e |
#define | DD_ADD_ITE_CONSTANT_TAG 0x62 |
#define | DD_ADD_EVAL_CONST_TAG 0x66 |
#define | DD_BDD_ITE_CONSTANT_TAG 0x6a |
#define | DD_ADD_OUT_SUM_TAG 0x6e |
#define | DD_BDD_LEQ_UNLESS_TAG 0x82 |
#define | DD_ADD_TRIANGLE_TAG 0x86 |
#define | CUDD_GEN_CUBES 0 |
#define | CUDD_GEN_NODES 1 |
#define | CUDD_GEN_ZDD_PATHS 2 |
#define | CUDD_GEN_EMPTY 0 |
#define | CUDD_GEN_NONEMPTY 1 |
#define | cuddDeallocNode(unique, node) |
#define | cuddRef(n) cuddSatInc(Cudd_Regular(n)->ref) |
#define | cuddDeref(n) cuddSatDec(Cudd_Regular(n)->ref) |
#define | cuddIsConstant(node) ((node)->index == CUDD_CONST_INDEX) |
#define | cuddT(node) ((node)->type.kids.T) |
#define | cuddE(node) ((node)->type.kids.E) |
#define | cuddV(node) ((node)->type.value) |
#define | cuddI(dd, index) (((index)==CUDD_CONST_INDEX)?(int)(index):(dd)->perm[(index)]) |
#define | cuddIZ(dd, index) (((index)==CUDD_CONST_INDEX)?(int)(index):(dd)->permZ[(index)]) |
#define | ddHash(f, g, s) ((((unsigned)(f) * DD_P1 + (unsigned)(g)) * DD_P2) >> (s)) |
#define | ddCHash(o, f, g, h, s) |
#define | ddCHash2(o, f, g, s) (((((unsigned)(f) + (unsigned)(o)) * DD_P1 + (unsigned)(g)) * DD_P2) >> (s)) |
#define | cuddClean(p) ((DdNode *)((ptruint)(p) & ~0xf)) |
#define | ddMin(x, y) (((y) < (x)) ? (y) : (x)) |
#define | ddMax(x, y) (((y) > (x)) ? (y) : (x)) |
#define | ddAbs(x) (((x)<0) ? -(x) : (x)) |
#define | ddEqualVal(x, y, e) (ddAbs((x)-(y))<(e)) |
#define | cuddSatInc(x) ((x) += (x) != (DdHalfWord)DD_MAXREF) |
#define | cuddSatDec(x) ((x) -= (x) != (DdHalfWord)DD_MAXREF) |
#define | DD_ONE(dd) ((dd)->one) |
#define | DD_ZERO(dd) ((dd)->zero) |
#define | DD_PLUS_INFINITY(dd) ((dd)->plusinfinity) |
#define | DD_MINUS_INFINITY(dd) ((dd)->minusinfinity) |
#define | cuddAdjust(x) ((x) = ((x) >= DD_CRI_HI_MARK) ? DD_PLUS_INF_VAL : (((x) <= DD_CRI_LO_MARK) ? DD_MINUS_INF_VAL : (x))) |
#define | DD_LSDIGIT(x) ((x) & DD_APA_MASK) |
#define | DD_MSDIGIT(x) ((x) >> DD_APA_BITS) |
#define | statLine(dd) |
Typedefs | |
typedef int | ptrint |
typedef unsigned int | ptruint |
typedef DdNode * | DdNodePtr |
Functions | |
EXTERN DdNode *cuddAddExistAbstractRecur | ARGS ((DdManager *manager, DdNode *f, DdNode *cube)) |
EXTERN DdNode *cuddAddApplyRecur | ARGS ((DdManager *dd, DdNode *(*)(DdManager *, DdNode **, DdNode **), DdNode *f, DdNode *g)) |
EXTERN DdNode *cuddAddMonadicApplyRecur | ARGS ((DdManager *dd, DdNode *(*op)(DdManager *, DdNode *), DdNode *f)) |
EXTERN DdNode *cuddAddScalarInverseRecur | ARGS ((DdManager *dd, DdNode *f, DdNode *epsilon)) |
EXTERN DdNode *cuddAddIteRecur | ARGS ((DdManager *dd, DdNode *f, DdNode *g, DdNode *h)) |
EXTERN DdNode *cuddAddCmplRecur | ARGS ((DdManager *dd, DdNode *f)) |
EXTERN DdNode *cuddAddRoundOffRecur | ARGS ((DdManager *dd, DdNode *f, double trunc)) |
EXTERN DdNode *cuddUnderApprox | ARGS ((DdManager *dd, DdNode *f, int numVars, int threshold, int safe, double quality)) |
EXTERN DdNode *cuddRemapUnderApprox | ARGS ((DdManager *dd, DdNode *f, int numVars, int threshold, double quality)) |
EXTERN DdNode *cuddBiasedUnderApprox | ARGS ((DdManager *dd, DdNode *f, DdNode *b, int numVars, int threshold, double quality1, double quality0)) |
EXTERN DdNode *cuddBddAndAbstractRecur | ARGS ((DdManager *manager, DdNode *f, DdNode *g, DdNode *cube)) |
EXTERN int cuddAnnealing | ARGS ((DdManager *table, int lower, int upper)) |
EXTERN DdNode *cuddBddBooleanDiffRecur | ARGS ((DdManager *manager, DdNode *f, DdNode *var)) |
EXTERN DdNode *cuddBddIntersectRecur | ARGS ((DdManager *dd, DdNode *f, DdNode *g)) |
EXTERN DdNode *cuddBddAndRecur | ARGS ((DdManager *manager, DdNode *f, DdNode *g)) |
EXTERN DdNode *cuddBddTransfer | ARGS ((DdManager *ddS, DdManager *ddD, DdNode *f)) |
EXTERN int cuddInitCache | ARGS ((DdManager *unique, unsigned int cacheSize, unsigned int maxCacheSize)) |
EXTERN void cuddCacheInsert | ARGS ((DdManager *table, ptruint op, DdNode *f, DdNode *g, DdNode *h, DdNode *data)) |
EXTERN void cuddCacheInsert2 | ARGS ((DdManager *table, DdNode *(*)(DdManager *, DdNode *, DdNode *), DdNode *f, DdNode *g, DdNode *data)) |
EXTERN void cuddCacheInsert1 | ARGS ((DdManager *table, DdNode *(*)(DdManager *, DdNode *), DdNode *f, DdNode *data)) |
EXTERN DdNode *cuddCacheLookup | ARGS ((DdManager *table, ptruint op, DdNode *f, DdNode *g, DdNode *h)) |
EXTERN DdNode *cuddCacheLookup2 | ARGS ((DdManager *table, DdNode *(*)(DdManager *, DdNode *, DdNode *), DdNode *f, DdNode *g)) |
EXTERN DdNode *cuddCacheLookup1 | ARGS ((DdManager *table, DdNode *(*)(DdManager *, DdNode *), DdNode *f)) |
EXTERN int cuddCacheProfile | ARGS ((DdManager *table, FILE *fp)) |
EXTERN void cuddCacheResize | ARGS ((DdManager *table)) |
EXTERN int cuddComputeFloorLog2 | ARGS ((unsigned int value)) |
EXTERN int cuddHeapProfile | ARGS ((DdManager *dd)) |
EXTERN void cuddPrintNode | ARGS ((DdNode *f, FILE *fp)) |
EXTERN void cuddPrintVarGroups | ARGS ((DdManager *dd, MtrNode *root, int zdd, int silent)) |
EXTERN DdNode *cuddBddClippingAnd | ARGS ((DdManager *dd, DdNode *f, DdNode *g, int maxDepth, int direction)) |
EXTERN DdNode *cuddBddClippingAndAbstract | ARGS ((DdManager *dd, DdNode *f, DdNode *g, DdNode *cube, int maxDepth, int direction)) |
EXTERN void cuddGetBranches | ARGS ((DdNode *g, DdNode **g1, DdNode **g0)) |
EXTERN int cuddCheckCube | ARGS ((DdManager *dd, DdNode *g)) |
EXTERN DdNode *cuddBddComposeRecur | ARGS ((DdManager *dd, DdNode *f, DdNode *g, DdNode *proj)) |
EXTERN DdNode *cuddBddConstrainRecur | ARGS ((DdManager *dd, DdNode *f, DdNode *c)) |
EXTERN int cuddTreeSifting | ARGS ((DdManager *table, Cudd_ReorderingType method)) |
EXTERN int cuddZddInitUniv | ARGS ((DdManager *zdd)) |
EXTERN void cuddSetInteract | ARGS ((DdManager *table, int x, int y)) |
EXTERN DdLocalCache *cuddLocalCacheInit | ARGS ((DdManager *manager, unsigned int keySize, unsigned int cacheSize, unsigned int maxCacheSize)) |
EXTERN void cuddLocalCacheQuit | ARGS ((DdLocalCache *cache)) |
EXTERN void cuddLocalCacheInsert | ARGS ((DdLocalCache *cache, DdNodePtr *key, DdNode *value)) |
EXTERN DdNode *cuddLocalCacheLookup | ARGS ((DdLocalCache *cache, DdNodePtr *key)) |
EXTERN void cuddLocalCacheClearDead | ARGS ((DdManager *manager)) |
EXTERN DdHashTable *cuddHashTableInit | ARGS ((DdManager *manager, unsigned int keySize, unsigned int initSize)) |
EXTERN void cuddHashTableQuit | ARGS ((DdHashTable *hash)) |
EXTERN int cuddHashTableInsert | ARGS ((DdHashTable *hash, DdNodePtr *key, DdNode *value, ptrint count)) |
EXTERN DdNode *cuddHashTableLookup | ARGS ((DdHashTable *hash, DdNodePtr *key)) |
EXTERN int cuddHashTableInsert1 | ARGS ((DdHashTable *hash, DdNode *f, DdNode *value, ptrint count)) |
EXTERN DdNode *cuddHashTableLookup1 | ARGS ((DdHashTable *hash, DdNode *f)) |
EXTERN int cuddHashTableInsert2 | ARGS ((DdHashTable *hash, DdNode *f, DdNode *g, DdNode *value, ptrint count)) |
EXTERN DdNode *cuddHashTableLookup2 | ARGS ((DdHashTable *hash, DdNode *f, DdNode *g)) |
EXTERN int cuddHashTableInsert3 | ARGS ((DdHashTable *hash, DdNode *f, DdNode *g, DdNode *h, DdNode *value, ptrint count)) |
EXTERN DdNode *cuddHashTableLookup3 | ARGS ((DdHashTable *hash, DdNode *f, DdNode *g, DdNode *h)) |
EXTERN DdLevelQueue *cuddLevelQueueInit | ARGS ((int levels, int itemSize, int numBuckets)) |
EXTERN void cuddLevelQueueQuit | ARGS ((DdLevelQueue *queue)) |
EXTERN void *cuddLevelQueueEnqueue | ARGS ((DdLevelQueue *queue, void *key, int level)) |
EXTERN void cuddLevelQueueDequeue | ARGS ((DdLevelQueue *queue, int level)) |
EXTERN DdNode *cuddCProjectionRecur | ARGS ((DdManager *dd, DdNode *R, DdNode *Y, DdNode *Ysupp)) |
EXTERN DdNode *cuddBddClosestCube | ARGS ((DdManager *dd, DdNode *f, DdNode *g, CUDD_VALUE_TYPE bound)) |
EXTERN void cuddReclaim | ARGS ((DdManager *table, DdNode *n)) |
EXTERN int cuddSwapping | ARGS ((DdManager *table, int lower, int upper, Cudd_ReorderingType heuristic)) |
EXTERN int cuddNextHigh | ARGS ((DdManager *table, int x)) |
EXTERN DdNode *cuddBddMakePrime | ARGS ((DdManager *dd, DdNode *cube, DdNode *f)) |
EXTERN DdNode *cuddSolveEqnRecur | ARGS ((DdManager *bdd, DdNode *F, DdNode *Y, DdNode **G, int n, int *yIndex, int i)) |
EXTERN DdNode *cuddVerifySol | ARGS ((DdManager *bdd, DdNode *F, DdNode **G, int *yIndex, int n)) |
EXTERN DdNode *cuddSubsetHeavyBranch | ARGS ((DdManager *dd, DdNode *f, int numVars, int threshold)) |
EXTERN DdNode *cuddSubsetShortPaths | ARGS ((DdManager *dd, DdNode *f, int numVars, int threshold, int hardlimit)) |
EXTERN DdNode *cuddAllocNode | ARGS ((DdManager *unique)) |
EXTERN DdManager *cuddInitTable | ARGS ((unsigned int numVars, unsigned int numVarsZ, unsigned int numSlots, unsigned int looseUpTo)) |
EXTERN int cuddGarbageCollect | ARGS ((DdManager *unique, int clearCache)) |
EXTERN DdNode *cuddZddGetNode | ARGS ((DdManager *zdd, int id, DdNode *T, DdNode *E)) |
EXTERN DdNode *cuddZddGetNodeIVO | ARGS ((DdManager *dd, int index, DdNode *g, DdNode *h)) |
EXTERN DdNode *cuddUniqueInter | ARGS ((DdManager *unique, int index, DdNode *T, DdNode *E)) |
EXTERN DdNode *cuddUniqueConst | ARGS ((DdManager *unique, CUDD_VALUE_TYPE value)) |
EXTERN void cuddRehash | ARGS ((DdManager *unique, int i)) |
EXTERN int cuddInsertSubtables | ARGS ((DdManager *unique, int n, int level)) |
EXTERN int cuddDestroySubtables | ARGS ((DdManager *unique, int n)) |
EXTERN int cuddResizeTableZdd | ARGS ((DdManager *unique, int index)) |
EXTERN int cuddWindowReorder | ARGS ((DdManager *table, int low, int high, Cudd_ReorderingType submethod)) |
EXTERN int cuddZddGetCofactors3 | ARGS ((DdManager *dd, DdNode *f, int v, DdNode **f1, DdNode **f0, DdNode **fd)) |
EXTERN int cuddZddGetCofactors2 | ARGS ((DdManager *dd, DdNode *f, int v, DdNode **f1, DdNode **f0)) |
EXTERN DdNode *cuddZddComplement | ARGS ((DdManager *dd, DdNode *node)) |
EXTERN int | cuddZddGetPosVarIndex (DdManager *dd, int index) |
EXTERN int | cuddZddGetNegVarIndex (DdManager *dd, int index) |
EXTERN int | cuddZddGetPosVarLevel (DdManager *dd, int index) |
EXTERN int | cuddZddGetNegVarLevel (DdManager *dd, int index) |
EXTERN DdNode *cuddZddIsop | ARGS ((DdManager *dd, DdNode *L, DdNode *U, DdNode **zdd_I)) |
EXTERN DdNode *cuddBddIsop | ARGS ((DdManager *dd, DdNode *L, DdNode *U)) |
EXTERN int cuddZddUniqueCompare | ARGS ((int *ptr_x, int *ptr_y)) |
EXTERN DdNode *cuddZddUnion | ARGS ((DdManager *zdd, DdNode *P, DdNode *Q)) |
EXTERN DdNode *cuddZddChangeAux | ARGS ((DdManager *zdd, DdNode *P, DdNode *zvar)) |
EXTERN DdNode *cuddZddSubset1 | ARGS ((DdManager *dd, DdNode *P, int var)) |
EXTERN int cuddZddP | ARGS ((DdManager *zdd, DdNode *f)) |
#define cuddAdjust | ( | x | ) | ((x) = ((x) >= DD_CRI_HI_MARK) ? DD_PLUS_INF_VAL : (((x) <= DD_CRI_LO_MARK) ? DD_MINUS_INF_VAL : (x))) |
Macro***********************************************************************
Synopsis [Enforces DD_MINUS_INF_VAL <= x <= DD_PLUS_INF_VAL.]
Description [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.]
SideEffects [none]
SeeAlso []
#define cuddDeallocNode | ( | unique, | |||
node | ) |
(node)->next = (unique)->nextFree; \ (unique)->nextFree = node;
Macro***********************************************************************
Synopsis [Adds node to the head of the free list.]
Description [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.]
SideEffects [None]
SeeAlso [cuddAllocNode cuddDynamicAllocNode]
#define cuddDeref | ( | n | ) | cuddSatDec(Cudd_Regular(n)->ref) |
Macro***********************************************************************
Synopsis [Decreases the reference count of a node, if it is not saturated.]
Description [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()).]
SideEffects [none]
SeeAlso [Cudd_Deref]
#define cuddE | ( | node | ) | ((node)->type.kids.E) |
Macro***********************************************************************
Synopsis [Returns the else child of an internal node.]
Description [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.]
SideEffects [none]
SeeAlso [Cudd_E]
#define cuddI | ( | dd, | |||
index | ) | (((index)==CUDD_CONST_INDEX)?(int)(index):(dd)->perm[(index)]) |
Macro***********************************************************************
Synopsis [Finds the current position of variable index in the order.]
Description [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.]
SideEffects [none]
SeeAlso [Cudd_ReadPerm]
#define cuddIsConstant | ( | node | ) | ((node)->index == CUDD_CONST_INDEX) |
Macro***********************************************************************
Synopsis [Returns 1 if the node is a constant node.]
Description [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.]
SideEffects [none]
SeeAlso [Cudd_IsConstant]
#define cuddIZ | ( | dd, | |||
index | ) | (((index)==CUDD_CONST_INDEX)?(int)(index):(dd)->permZ[(index)]) |
Macro***********************************************************************
Synopsis [Finds the current position of ZDD variable index in the order.]
Description [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.]
SideEffects [none]
SeeAlso [Cudd_ReadPermZdd]
#define cuddRef | ( | n | ) | cuddSatInc(Cudd_Regular(n)->ref) |
Macro***********************************************************************
Synopsis [Increases the reference count of a node, if it is not saturated.]
Description [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()).]
SideEffects [none]
SeeAlso [Cudd_Ref]
#define cuddSatDec | ( | x | ) | ((x) -= (x) != (DdHalfWord)DD_MAXREF) |
#define cuddSatInc | ( | x | ) | ((x) += (x) != (DdHalfWord)DD_MAXREF) |
#define cuddT | ( | node | ) | ((node)->type.kids.T) |
Macro***********************************************************************
Synopsis [Returns the then child of an internal node.]
Description [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.]
SideEffects [none]
SeeAlso [Cudd_T]
#define cuddV | ( | node | ) | ((node)->type.value) |
Macro***********************************************************************
Synopsis [Returns the value of a constant node.]
Description [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.]
SideEffects [none]
SeeAlso [Cudd_V]
#define DD_INLINE |
CHeaderFile*****************************************************************
FileName [cuddInt.h]
PackageName [cudd]
Synopsis [Internal data structures of the CUDD package.]
Description []
SeeAlso []
Author [Fabio Somenzi]
Copyright [This file was created at the University of Colorado at Boulder. The University of Colorado at Boulder makes no warranty about the suitability of this software for any purpose. It is presented on an AS IS basis.]
Revision [
]
#define DD_LSDIGIT | ( | x | ) | ((x) & DD_APA_MASK) |
Macro***********************************************************************
Synopsis [Extract the least significant digit of a double digit.]
Description [Extract the least significant digit of a double digit. Used in the manipulation of arbitrary precision integers.]
SideEffects [None]
SeeAlso [DD_MSDIGIT]
#define DD_MAXREF ((DdHalfWord) ~0) |
#define DD_MINUS_INFINITY | ( | dd | ) | ((dd)->minusinfinity) |
#define DD_MSDIGIT | ( | x | ) | ((x) >> DD_APA_BITS) |
Macro***********************************************************************
Synopsis [Extract the most significant digit of a double digit.]
Description [Extract the most significant digit of a double digit. Used in the manipulation of arbitrary precision integers.]
SideEffects [None]
SeeAlso [DD_LSDIGIT]
#define DD_ONE | ( | dd | ) | ((dd)->one) |
#define DD_PLUS_INFINITY | ( | dd | ) | ((dd)->plusinfinity) |
#define DD_ZERO | ( | dd | ) | ((dd)->zero) |
Macro***********************************************************************
Synopsis [Returns the arithmetic 0 constant node.]
Description [Returns the arithmetic 0 constant node. This is different from the logical zero. The latter is obtained by Cudd_Not(DD_ONE(dd)).]
SideEffects [none]
SeeAlso [DD_ONE Cudd_Not DD_PLUS_INFINITY DD_MINUS_INFINITY]
#define ddAbs | ( | x | ) | (((x)<0) ? -(x) : (x)) |
#define ddCHash | ( | o, | |||
f, | |||||
g, | |||||
h, | |||||
s | ) |
#define ddCHash2 | ( | o, | |||
f, | |||||
g, | |||||
s | ) | (((((unsigned)(f) + (unsigned)(o)) * DD_P1 + (unsigned)(g)) * DD_P2) >> (s)) |
#define ddEqualVal | ( | x, | |||
y, | |||||
e | ) | (ddAbs((x)-(y))<(e)) |
#define ddHash | ( | f, | |||
g, | |||||
s | ) | ((((unsigned)(f) * DD_P1 + (unsigned)(g)) * DD_P2) >> (s)) |
#define ddMax | ( | x, | |||
y | ) | (((y) > (x)) ? (y) : (x)) |
#define ddMin | ( | x, | |||
y | ) | (((y) < (x)) ? (y) : (x)) |
#define statLine | ( | dd | ) |
Macro***********************************************************************
Synopsis [Outputs a line of stats.]
Description [Outputs a line of stats if DD_COUNT and DD_STATS are defined. Increments the number of recursive calls if DD_COUNT is defined.]
SideEffects [None]
SeeAlso []
EXTERN int cuddZddUniqueCompare ARGS | ( | (int *ptr_x, int *ptr_y) | ) |
EXTERN int cuddZddGetCofactors2 ARGS | ( | (DdManager *dd, DdNode *f, int v, DdNode **f1, DdNode **f0) | ) |
EXTERN int cuddZddGetCofactors3 ARGS | ( | (DdManager *dd, DdNode *f, int v, DdNode **f1, DdNode **f0, DdNode **fd) | ) |
EXTERN int cuddWindowReorder ARGS | ( | (DdManager *table, int low, int high, Cudd_ReorderingType submethod) | ) |
EXTERN int cuddResizeTableZdd ARGS | ( | (DdManager *unique, int index) | ) |
EXTERN int cuddDestroySubtables ARGS | ( | (DdManager *unique, int n) | ) |
EXTERN int cuddInsertSubtables ARGS | ( | (DdManager *unique, int n, int level) | ) |
EXTERN void cuddShrinkSubtable ARGS | ( | (DdManager *unique, int i) | ) |
EXTERN int cuddGarbageCollectZdd ARGS | ( | (DdManager *unique, int clearCache) | ) |
EXTERN DdManager* cuddInitTable ARGS | ( | (unsigned int numVars, unsigned int numVarsZ, unsigned int numSlots, unsigned int looseUpTo) | ) |
EXTERN DdNode* cuddSubsetShortPaths ARGS | ( | (DdManager *dd, DdNode *f, int numVars, int threshold, int hardlimit) | ) |
EXTERN DdNode* cuddSubsetHeavyBranch ARGS | ( | (DdManager *dd, DdNode *f, int numVars, int threshold) | ) |
EXTERN DdNode* cuddSolveEqnRecur ARGS | ( | (DdManager *bdd, DdNode *F, DdNode *Y, DdNode **G, int n, int *yIndex, int i) | ) |
EXTERN int cuddZddNextLow ARGS | ( | (DdManager *table, int x) | ) |
EXTERN int cuddZddSwapping ARGS | ( | (DdManager *table, int lower, int upper, Cudd_ReorderingType heuristic) | ) |
EXTERN DdNode* cuddBddClosestCube ARGS | ( | (DdManager *dd, DdNode *f, DdNode *g, CUDD_VALUE_TYPE bound) | ) |
EXTERN void cuddLevelQueueDequeue ARGS | ( | (DdLevelQueue *queue, int level) | ) |
EXTERN void* cuddLevelQueueEnqueue ARGS | ( | (DdLevelQueue *queue, void *key, int level) | ) |
EXTERN void cuddLevelQueueQuit ARGS | ( | (DdLevelQueue *queue) | ) |
EXTERN DdLevelQueue* cuddLevelQueueInit ARGS | ( | (int levels, int itemSize, int numBuckets) | ) |
EXTERN DdNode* cuddHashTableLookup3 ARGS | ( | (DdHashTable *hash, DdNode *f, DdNode *g, DdNode *h) | ) |
EXTERN int cuddHashTableInsert3 ARGS | ( | (DdHashTable *hash, DdNode *f, DdNode *g, DdNode *h, DdNode *value, ptrint count) | ) |
EXTERN DdNode* cuddHashTableLookup2 ARGS | ( | (DdHashTable *hash, DdNode *f, DdNode *g) | ) |
EXTERN int cuddHashTableInsert2 ARGS | ( | (DdHashTable *hash, DdNode *f, DdNode *g, DdNode *value, ptrint count) | ) |
EXTERN DdNode* cuddHashTableLookup1 ARGS | ( | (DdHashTable *hash, DdNode *f) | ) |
EXTERN int cuddHashTableInsert1 ARGS | ( | (DdHashTable *hash, DdNode *f, DdNode *value, ptrint count) | ) |
EXTERN DdNode* cuddHashTableLookup ARGS | ( | (DdHashTable *hash, DdNodePtr *key) | ) |
EXTERN int cuddHashTableInsert ARGS | ( | (DdHashTable *hash, DdNodePtr *key, DdNode *value, ptrint count) | ) |
static DD_INLINE DdHashItem *cuddHashTableAlloc ARGS | ( | (DdHashTable *hash) | ) |
EXTERN DdHashTable* cuddHashTableInit ARGS | ( | (DdManager *manager, unsigned int keySize, unsigned int initSize) | ) |
EXTERN void cuddLocalCacheClearDead ARGS | ( | (DdManager *manager) | ) |
EXTERN DdNode* cuddLocalCacheLookup ARGS | ( | (DdLocalCache *cache, DdNodePtr *key) | ) |
EXTERN void cuddLocalCacheInsert ARGS | ( | (DdLocalCache *cache, DdNodePtr *key, DdNode *value) | ) |
static void cuddLocalCacheRemoveFromList ARGS | ( | (DdLocalCache *cache) | ) |
EXTERN DdLocalCache* cuddLocalCacheInit ARGS | ( | (DdManager *manager, unsigned int keySize, unsigned int cacheSize, unsigned int maxCacheSize) | ) |
EXTERN void cuddSetInteract ARGS | ( | (DdManager *table, int x, int y) | ) |
EXTERN void cuddZddFreeUniv ARGS | ( | (DdManager *zdd) | ) |
EXTERN int cuddZddTreeSifting ARGS | ( | (DdManager *table, Cudd_ReorderingType method) | ) |
EXTERN DdNode* cuddBddClippingAndAbstract ARGS | ( | (DdManager *dd, DdNode *f, DdNode *g, DdNode *cube, int maxDepth, int direction) | ) |
EXTERN DdNode* cuddBddClippingAnd ARGS | ( | (DdManager *dd, DdNode *f, DdNode *g, int maxDepth, int direction) | ) |
EXTERN void cuddPrintNode ARGS | ( | (DdNode *f, FILE *fp) | ) |
EXTERN int cuddHeapProfile ARGS | ( | (DdManager *dd) | ) |
EXTERN int cuddComputeFloorLog2 ARGS | ( | (unsigned int value) | ) |
EXTERN void cuddCacheResize ARGS | ( | (DdManager *table) | ) |
EXTERN int cuddCacheProfile ARGS | ( | (DdManager *table, FILE *fp) | ) |
EXTERN DdNode *cuddCacheLookup1Zdd ARGS | ( | (DdManager *table, DdNode *(*)(DdManager *, DdNode *), DdNode *f) | ) |
EXTERN DdNode *cuddCacheLookup2Zdd ARGS | ( | (DdManager *table, DdNode *(*)(DdManager *, DdNode *, DdNode *), DdNode *f, DdNode *g) | ) |
EXTERN DdNode *cuddConstantLookup ARGS | ( | (DdManager *table, ptruint op, DdNode *f, DdNode *g, DdNode *h) | ) |
EXTERN void cuddCacheInsert1 ARGS | ( | (DdManager *table, DdNode *(*)(DdManager *, DdNode *), DdNode *f, DdNode *data) | ) |
EXTERN void cuddCacheInsert2 ARGS | ( | (DdManager *table, DdNode *(*)(DdManager *, DdNode *, DdNode *), DdNode *f, DdNode *g, DdNode *data) | ) |
EXTERN void cuddCacheInsert ARGS | ( | (DdManager *table, ptruint op, DdNode *f, DdNode *g, DdNode *h, DdNode *data) | ) |
EXTERN int cuddInitCache ARGS | ( | (DdManager *unique, unsigned int cacheSize, unsigned int maxCacheSize) | ) |
EXTERN int cuddAnnealing ARGS | ( | (DdManager *table, int lower, int upper) | ) |
EXTERN DdNode* cuddBddAndAbstractRecur ARGS | ( | (DdManager *manager, DdNode *f, DdNode *g, DdNode *cube) | ) |
EXTERN DdNode* cuddBiasedUnderApprox ARGS | ( | (DdManager *dd, DdNode *f, DdNode *b, int numVars, int threshold, double quality1, double quality0) | ) |
EXTERN DdNode* cuddRemapUnderApprox ARGS | ( | (DdManager *dd, DdNode *f, int numVars, int threshold, double quality) | ) |
EXTERN DdNode* cuddUnderApprox ARGS | ( | (DdManager *dd, DdNode *f, int numVars, int threshold, int safe, double quality) | ) |
EXTERN DdNode* cuddAddMonadicApplyRecur ARGS | ( | (DdManager *dd, DdNode *(*op)(DdManager *, DdNode *), DdNode *f) | ) |
EXTERN DdNode* cuddAddApplyRecur ARGS | ( | (DdManager *dd, DdNode *(*)(DdManager *, DdNode **, DdNode **), DdNode *f, DdNode *g) | ) |
AutomaticStart
EXTERN int cuddZddGetNegVarIndex | ( | DdManager * | dd, | |
int | index | |||
) |
Function********************************************************************
Synopsis [Returns the index of negative ZDD variable.]
Description [Returns the index of negative ZDD variable.]
SideEffects []
SeeAlso []
Definition at line 1555 of file cuddZddFuncs.c.
EXTERN int cuddZddGetNegVarLevel | ( | DdManager * | dd, | |
int | index | |||
) |
Function********************************************************************
Synopsis [Returns the level of negative ZDD variable.]
Description [Returns the level of negative ZDD variable.]
SideEffects []
SeeAlso []
Definition at line 1597 of file cuddZddFuncs.c.
01600 { 01601 int nv = cuddZddGetNegVarIndex(dd, index); 01602 return(dd->permZ[nv]); 01603 } /* end of cuddZddGetNegVarLevel */
EXTERN int cuddZddGetPosVarIndex | ( | DdManager * | dd, | |
int | index | |||
) |
Function********************************************************************
Synopsis [Returns the index of positive ZDD variable.]
Description [Returns the index of positive ZDD variable.]
SideEffects []
SeeAlso []
Definition at line 1534 of file cuddZddFuncs.c.
EXTERN int cuddZddGetPosVarLevel | ( | DdManager * | dd, | |
int | index | |||
) |
Function********************************************************************
Synopsis [Returns the level of positive ZDD variable.]
Description [Returns the level of positive ZDD variable.]
SideEffects []
SeeAlso []
Definition at line 1576 of file cuddZddFuncs.c.
01579 { 01580 int pv = cuddZddGetPosVarIndex(dd, index); 01581 return(dd->permZ[pv]); 01582 } /* end of cuddZddGetPosVarLevel */