abc-master
|
Go to the source code of this file.
Data Structures | |
struct | cloudManager |
struct | cloudNode |
struct | cloudCacheEntry1 |
struct | cloudCacheEntry2 |
struct | cloudCacheEntry3 |
Macros | |
#define | CLOUD_NODE_BITS 23 |
#define | CLOUD_CONST_INDEX ((unsigned)0x0fffffff) |
#define | CLOUD_MARK_ON ((unsigned)0x10000000) |
#define | CLOUD_MARK_OFF ((unsigned)0xefffffff) |
#define | cloudHashBuddy2(x, y, s) ((((x)+(y))*((x)+(y)+1)/2) & ((1<<(32-(s)))-1)) |
#define | cloudHashBuddy3(x, y, z, s) (cloudHashBuddy2((cloudHashBuddy2((x),(y),(s))),(z),(s)) & ((1<<(32-(s)))-1)) |
#define | DD_P1 12582917 |
#define | DD_P2 4256249 |
#define | DD_P3 741457 |
#define | DD_P4 1618033999 |
#define | cloudHashCudd2(f, g, s) ((((unsigned)(ABC_PTRUINT_T)(f) * DD_P1 + (unsigned)(ABC_PTRUINT_T)(g)) * DD_P2) >> (s)) |
#define | cloudHashCudd3(f, g, h, s) (((((unsigned)(ABC_PTRUINT_T)(f) * DD_P1 + (unsigned)(ABC_PTRUINT_T)(g)) * DD_P2 + (unsigned)(ABC_PTRUINT_T)(h)) * DD_P3) >> (s)) |
#define | Cloud_Regular(p) ((CloudNode*)(((ABC_PTRUINT_T)(p)) & ~01)) |
#define | Cloud_Not(p) ((CloudNode*)(((ABC_PTRUINT_T)(p)) ^ 01)) |
#define | Cloud_NotCond(p, c) ((CloudNode*)(((ABC_PTRUINT_T)(p)) ^ (c))) |
#define | Cloud_IsComplement(p) ((int)(((ABC_PTRUINT_T)(p)) & 01)) |
#define | Cloud_IsConstant(p) (((Cloud_Regular(p))->v & CLOUD_MARK_OFF) == CLOUD_CONST_INDEX) |
#define | cloudIsConstant(p) (((p)->v & CLOUD_MARK_OFF) == CLOUD_CONST_INDEX) |
#define | Cloud_V(p) ((Cloud_Regular(p))->v) |
#define | Cloud_E(p) ((Cloud_Regular(p))->e) |
#define | Cloud_T(p) ((Cloud_Regular(p))->t) |
#define | cloudV(p) ((p)->v) |
#define | cloudE(p) ((p)->e) |
#define | cloudT(p) ((p)->t) |
#define | cloudNodeMark(p) ((p)->v |= CLOUD_MARK_ON) |
#define | cloudNodeUnmark(p) ((p)->v &= CLOUD_MARK_OFF) |
#define | cloudNodeIsMarked(p) ((int)((p)->v & CLOUD_MARK_ON)) |
#define | cloudCacheLookup1(p, sign, f) (((p)->s == (sign) && (p)->a == (f))? ((p)->r): (0)) |
#define | cloudCacheLookup2(p, sign, f, g) (((p)->s == (sign) && (p)->a == (f) && (p)->b == (g))? ((p)->r): (0)) |
#define | cloudCacheLookup3(p, sign, f, g, h) (((p)->s == (sign) && (p)->a == (f) && (p)->b == (g) && (p)->c == (h))? ((p)->r): (0)) |
#define | cloudCacheInsert1(p, sign, f, r) (((p)->s = (sign)), ((p)->a = (f)), ((p)->r = (r))) |
#define | cloudCacheInsert2(p, sign, f, g, r) (((p)->s = (sign)), ((p)->a = (f)), ((p)->b = (g)), ((p)->r = (r))) |
#define | cloudCacheInsert3(p, sign, f, g, h, r) (((p)->s = (sign)), ((p)->a = (f)), ((p)->b = (g)), ((p)->c = (h)), ((p)->r = (r))) |
#define | CLOUD_ASSERT(p) assert((p) >= dd->tUnique && (p) < dd->tUnique+dd->nNodesAlloc) |
Typedefs | |
typedef typedefABC_NAMESPACE_HEADER_START struct cloudManager | CloudManager |
typedef unsigned | CloudVar |
typedef unsigned | CloudSign |
typedef struct cloudNode | CloudNode |
typedef struct cloudCacheEntry1 | CloudCacheEntry1 |
typedef struct cloudCacheEntry2 | CloudCacheEntry2 |
typedef struct cloudCacheEntry3 | CloudCacheEntry3 |
Enumerations | |
enum | CloudOper { CLOUD_OPER_AND, CLOUD_OPER_XOR, CLOUD_OPER_BDIFF, CLOUD_OPER_LEQ } |
#define Cloud_E | ( | p | ) | ((Cloud_Regular(p))->e) |
#define Cloud_IsConstant | ( | p | ) | (((Cloud_Regular(p))->v & CLOUD_MARK_OFF) == CLOUD_CONST_INDEX) |
#define Cloud_T | ( | p | ) | ((Cloud_Regular(p))->t) |
#define Cloud_V | ( | p | ) | ((Cloud_Regular(p))->v) |
#define cloudHashBuddy2 | ( | x, | |
y, | |||
s | |||
) | ((((x)+(y))*((x)+(y)+1)/2) & ((1<<(32-(s)))-1)) |
#define cloudHashBuddy3 | ( | x, | |
y, | |||
z, | |||
s | |||
) | (cloudHashBuddy2((cloudHashBuddy2((x),(y),(s))),(z),(s)) & ((1<<(32-(s)))-1)) |
#define cloudIsConstant | ( | p | ) | (((p)->v & CLOUD_MARK_OFF) == CLOUD_CONST_INDEX) |
#define cloudNodeIsMarked | ( | p | ) | ((int)((p)->v & CLOUD_MARK_ON)) |
#define cloudNodeMark | ( | p | ) | ((p)->v |= CLOUD_MARK_ON) |
#define cloudNodeUnmark | ( | p | ) | ((p)->v &= CLOUD_MARK_OFF) |
typedef struct cloudCacheEntry1 CloudCacheEntry1 |
typedef struct cloudCacheEntry2 CloudCacheEntry2 |
typedef struct cloudCacheEntry3 CloudCacheEntry3 |
typedef typedefABC_NAMESPACE_HEADER_START struct cloudManager CloudManager |
CFile****************************************************************
FileName [cloud.h]
PackageName [Fast application-specific BDD package.]
Synopsis [Interface of the package.]
Author [Alan Mishchenko alanm] i@ec e.pdx .edu
Affiliation [ECE Department. Portland State University, Portland, Oregon.]
Date [Ver. 1.0. Started - June 10, 2002.]
Revision [
]
enum CloudOper |
Enumerator | |
---|---|
CLOUD_OPER_AND | |
CLOUD_OPER_XOR | |
CLOUD_OPER_BDIFF | |
CLOUD_OPER_LEQ |
CloudNode* Cloud_bddAnd | ( | CloudManager * | dd, |
CloudNode * | f, | ||
CloudNode * | g | ||
) |
Function********************************************************************
Synopsis [Performs the AND or two BDDs]
Description []
SideEffects []
SeeAlso []
Definition at line 489 of file cloud.c.
CloudNode* Cloud_bddOr | ( | CloudManager * | dd, |
CloudNode * | f, | ||
CloudNode * | g | ||
) |
Function********************************************************************
Synopsis [Performs the OR or two BDDs]
Description []
SideEffects []
SeeAlso []
Definition at line 511 of file cloud.c.
void Cloud_bddPrint | ( | CloudManager * | dd, |
CloudNode * | Func | ||
) |
Function********************************************************************
Synopsis [Prints the BDD as a set of disjoint cubes to the standard output.]
Description []
SideEffects []
Definition at line 866 of file cloud.c.
void Cloud_bddPrintCube | ( | CloudManager * | dd, |
CloudNode * | bCube | ||
) |
Function********************************************************************
Synopsis [Prints one cube.]
Description []
SideEffects []
Definition at line 900 of file cloud.c.
void Cloud_CacheAllocate | ( | CloudManager * | dd, |
CloudOper | oper, | ||
int | logratio | ||
) |
Function********************************************************************
Synopsis [This optional function allocates operation cache of the given size.]
Description [Cache for each operation is allocated independently when the first operation of the given type is performed. The user can allocate cache of his/her preferred size by calling Cloud_CacheAllocate before the first operation of the given type is performed, but this call is optional. Argument "logratio" gives the binary logarithm of the ratio of the size of the unique table to that of cache. For example, if "logratio" is equal to 3, and the unique table will be 2^3=8 times larger than cache; so, if unique table is 2^23 = 8,388,608 nodes, the cache size will be 2^3=8 times smaller and equal to 2^20 = 1,048,576 entries.]
SideEffects []
SeeAlso []
Definition at line 195 of file cloud.c.
int Cloud_DagCollect | ( | CloudManager * | dd, |
CloudNode * | n | ||
) |
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 []
SeeAlso []
Definition at line 772 of file cloud.c.
int Cloud_DagSize | ( | CloudManager * | dd, |
CloudNode * | n | ||
) |
CloudNode* Cloud_GetOneCube | ( | CloudManager * | dd, |
CloudNode * | bFunc | ||
) |
Function********************************************************************
Synopsis [Returns one cube contained in the given BDD.]
Description []
SideEffects []
Definition at line 817 of file cloud.c.
CloudManager* Cloud_Init | ( | int | nVars, |
int | nBits | ||
) |
FUNCTION DECLARATIONS ///.
FUNCTION DECLARATIONS ///.
Function********************************************************************
Synopsis [Starts the cloud manager.]
Description [The first arguments is the number of elementary variables used. The second arguments is the number of bits of the unsigned integer used to represent nodes in the unique table. If the second argument is 0, the package assumes 23 to represent nodes, which is equivalent to 2^23 = 8,388,608 nodes.]
SideEffects []
SeeAlso []
Definition at line 70 of file cloud.c.
CloudNode* Cloud_MakeNode | ( | CloudManager * | dd, |
CloudVar | v, | ||
CloudNode * | t, | ||
CloudNode * | e | ||
) |
Function********************************************************************
Synopsis [Returns or creates a new node]
Description [Checks the unique table for the existance of the node. If the node is present, returns the node. If the node is absent, creates a new node.]
SideEffects []
SeeAlso []
Definition at line 254 of file cloud.c.
void Cloud_PrintHashTable | ( | CloudManager * | dd | ) |
void Cloud_PrintInfo | ( | CloudManager * | dd | ) |
void Cloud_Quit | ( | CloudManager * | dd | ) |
Function********************************************************************
Synopsis [Stops the cloud manager.]
Description [The first arguments tells show many elementary variables are used. The second arguments tells how many bits of the unsigned integer are used to represent regular nodes in the unique table.]
SideEffects []
SeeAlso []
void Cloud_Restart | ( | CloudManager * | dd | ) |
int Cloud_SharingSize | ( | CloudManager * | dd, |
CloudNode ** | pn, | ||
int | nn | ||
) |
Function********************************************************************
Synopsis [Counts the number of nodes in an array of DDs.]
Description [Counts the number of nodes in a DD. Returns the number of nodes in the graph rooted at node.]
SideEffects []
SeeAlso []
Definition at line 796 of file cloud.c.
CloudNode* Cloud_Support | ( | CloudManager * | dd, |
CloudNode * | n | ||
) |
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 []
Definition at line 618 of file cloud.c.
int Cloud_SupportSize | ( | CloudManager * | dd, |
CloudNode * | n | ||
) |
Function********************************************************************
Synopsis [Counts the variables on which a DD depends.]
Description [Counts the variables on which a DD depends. Returns the number of the variables if successful; Cloud_OUT_OF_MEM otherwise.]
SideEffects [None]
SeeAlso []
Definition at line 658 of file cloud.c.