SVF
|
Go to the source code of this file.
Classes | |
union | hack |
Typedefs | |
typedef union hack | hack |
Functions | |
static void | ddRehashZdd (DdManager *unique, int i) |
static int | ddResizeTable (DdManager *unique, int index, int amount) |
static int | cuddFindParent (DdManager *table, DdNode *node) |
static DD_INLINE void | ddFixLimits (DdManager *unique) |
static void | ddPatchTree (DdManager *dd, MtrNode *treenode) |
static void | ddReportRefMess (DdManager *unique, int i, const char *caller) |
unsigned int | Cudd_Prime (unsigned int p) |
int | Cudd_Reserve (DdManager *manager, int amount) |
DdNode * | cuddAllocNode (DdManager *unique) |
DdManager * | cuddInitTable (unsigned int numVars, unsigned int numVarsZ, unsigned int numSlots, unsigned int looseUpTo) |
void | cuddFreeTable (DdManager *unique) |
int | cuddGarbageCollect (DdManager *unique, int clearCache) |
DdNode * | cuddZddGetNode (DdManager *zdd, int id, DdNode *T, DdNode *E) |
DdNode * | cuddZddGetNodeIVO (DdManager *dd, int index, DdNode *g, DdNode *h) |
DdNode * | cuddUniqueInter (DdManager *unique, int index, DdNode *T, DdNode *E) |
DdNode * | cuddUniqueInterIVO (DdManager *unique, int index, DdNode *T, DdNode *E) |
DdNode * | cuddUniqueInterZdd (DdManager *unique, int index, DdNode *T, DdNode *E) |
DdNode * | cuddUniqueConst (DdManager *unique, CUDD_VALUE_TYPE value) |
void | cuddRehash (DdManager *unique, int i) |
void | cuddShrinkSubtable (DdManager *unique, int i) |
int | cuddInsertSubtables (DdManager *unique, int n, int level) |
int | cuddDestroySubtables (DdManager *unique, int n) |
int | cuddResizeTableZdd (DdManager *unique, int index) |
void | cuddSlowTableGrowth (DdManager *unique) |
Variables | |
static char rcsid [] | DD_UNUSED = "$Id: cuddTable.c,v 1.126 2012/02/05 01:07:19 fabio Exp $" |
CFile***********************************************************************
FileName [cuddTable.c]
PackageName [cudd]
Synopsis [Unique table management functions.]
Description [External procedures included in this module:
Internal procedures included in this module:
Static procedures included in this module:
]
SeeAlso []
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.]
unsigned int Cudd_Prime | ( | unsigned int | p | ) |
AutomaticEnd Function********************************************************************
Synopsis [Returns the next prime >= p.]
Description []
SideEffects [None]
Definition at line 185 of file cuddTable.c.
int Cudd_Reserve | ( | DdManager * | manager, |
int | amount | ||
) |
Function********************************************************************
Synopsis [Expand manager without creating variables.]
Description [Expand a manager by a specified number of subtables without actually creating new variables. This function can be used to reduce the frequency of resizing when an estimate of the number of variables is available. One would call this function instead of passing the number of variables to Cudd_Init if variables should not be created right away of if the estimate on their number became available only after the manager has been created. Returns 1 if successful; 0 otherwise.]
SideEffects [None]
SeeAlso [Cudd_Init]
Definition at line 230 of file cuddTable.c.
Function********************************************************************
Synopsis [Fast storage allocation for DdNodes in the table.]
Description [Fast storage allocation for DdNodes in the table. The first 4 bytes of a chunk contain a pointer to the next block; the rest contains DD_MEM_CHUNK spaces for DdNodes. Returns a pointer to a new node if successful; NULL is memory is full.]
SideEffects [None]
SeeAlso [cuddDynamicAllocNode]
Definition at line 266 of file cuddTable.c.
int cuddDestroySubtables | ( | DdManager * | unique, |
int | n | ||
) |
Function********************************************************************
Synopsis [Destroys the n most recently created subtables in a unique table.]
Description [Destroys the n most recently created subtables in a unique table. n should be positive. The subtables should not contain any live nodes, except the (isolated) projection function. The projection functions are freed. Returns 1 if successful; 0 otherwise.]
SideEffects [The variable map used for fast variable substitution is destroyed if it exists. In this case the cache is also cleared.]
SeeAlso [cuddInsertSubtables Cudd_SetVarMap]
Definition at line 2137 of file cuddTable.c.
Function********************************************************************
Synopsis [Searches the subtables above node for a parent.]
Description [Searches the subtables above node for a parent. Returns 1 as soon as one parent is found. Returns 0 is the search is fruitless.]
SideEffects [None]
SeeAlso []
Definition at line 2796 of file cuddTable.c.
void cuddFreeTable | ( | DdManager * | unique | ) |
Function********************************************************************
Synopsis [Frees the resources associated to a unique table.]
Description []
SideEffects [None]
SeeAlso [cuddInitTable]
Definition at line 692 of file cuddTable.c.
int cuddGarbageCollect | ( | DdManager * | unique, |
int | clearCache | ||
) |
Function********************************************************************
Synopsis [Performs garbage collection on the unique tables.]
Description [Performs garbage collection on the BDD and ZDD unique tables. If clearCache is 0, the cache is not cleared. This should only be specified if the cache has been cleared right before calling cuddGarbageCollect. (As in the case of dynamic reordering.) Returns the total number of deleted nodes.]
SideEffects [None]
SeeAlso []
Definition at line 762 of file cuddTable.c.
DdManager* cuddInitTable | ( | unsigned int | numVars, |
unsigned int | numVarsZ, | ||
unsigned int | numSlots, | ||
unsigned int | looseUpTo | ||
) |
Function********************************************************************
Synopsis [Creates and initializes the unique table.]
Description [Creates and initializes the unique table. Returns a pointer to the table if successful; NULL otherwise.]
SideEffects [None]
SeeAlso [Cudd_Init cuddFreeTable]
Definition at line 380 of file cuddTable.c.
int cuddInsertSubtables | ( | DdManager * | unique, |
int | n, | ||
int | level | ||
) |
Function********************************************************************
Synopsis [Inserts n new subtables in a unique table at level.]
Description [Inserts n new subtables in a unique table at level. The number n should be positive, and level should be an existing level. Returns 1 if successful; 0 otherwise.]
SideEffects [None]
SeeAlso [cuddDestroySubtables]
Definition at line 1824 of file cuddTable.c.
void cuddRehash | ( | DdManager * | unique, |
int | i | ||
) |
Function********************************************************************
Synopsis [Rehashes a unique subtable.]
Description [Doubles the size of a unique subtable and rehashes its contents.]
SideEffects [None]
SeeAlso []
Definition at line 1559 of file cuddTable.c.
int cuddResizeTableZdd | ( | DdManager * | unique, |
int | index | ||
) |
Function********************************************************************
Synopsis [Increases the number of ZDD subtables in a unique table so that it meets or exceeds index.]
Description [Increases the number of ZDD subtables in a unique table so that it meets or exceeds index. When new ZDD variables are created, it is possible to preserve the functions unchanged, or it is possible to preserve the covers unchanged, but not both. cuddResizeTableZdd preserves the covers. Returns 1 if successful; 0 otherwise.]
SideEffects [None]
SeeAlso [ddResizeTable]
Definition at line 2270 of file cuddTable.c.
void cuddShrinkSubtable | ( | DdManager * | unique, |
int | i | ||
) |
Function********************************************************************
Synopsis [Shrinks a subtable.]
Description [Shrinks a subtable.]
SideEffects [None]
SeeAlso [cuddRehash]
Definition at line 1731 of file cuddTable.c.
void cuddSlowTableGrowth | ( | DdManager * | unique | ) |
Function********************************************************************
Synopsis [Adjusts parameters of a table to slow down its growth.]
Description []
SideEffects [None]
SeeAlso []
Definition at line 2414 of file cuddTable.c.
DdNode* cuddUniqueConst | ( | DdManager * | unique, |
CUDD_VALUE_TYPE | value | ||
) |
Function********************************************************************
Synopsis [Checks the unique table for the existence of a constant node.]
Description [Checks the unique table for the existence of a constant node. If it does not exist, it creates a new one. Does not modify the reference count of whatever is returned. A newly created internal node comes back with a reference count 0. Returns a pointer to the new node.]
SideEffects [None]
Definition at line 1479 of file cuddTable.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. If it does not exist, it creates a new one. Does not modify the reference count of whatever is returned. A newly created internal node comes back with a reference count 0. For a newly created node, increments the reference counts of what T and E point to. Returns a pointer to the new node if successful; NULL if memory is exhausted or if reordering took place.]
SideEffects [None]
SeeAlso [cuddUniqueInterZdd]
Definition at line 1137 of file cuddTable.c.
Function********************************************************************
Synopsis [Wrapper for cuddUniqueInter that is independent of variable ordering.]
Description [Wrapper for cuddUniqueInter that is independent of variable ordering (IVO). This function does not require parameter index to precede the indices of the top nodes of T and E in the variable order. Returns a pointer to the result node under normal conditions; NULL if reordering occurred or memory was exhausted.]
SideEffects [None]
SeeAlso [cuddUniqueInter Cudd_MakeBddFromZddCover]
Definition at line 1333 of file cuddTable.c.
Function********************************************************************
Synopsis [Checks the unique table for the existence of an internal ZDD node.]
Description [Checks the unique table for the existence of an internal ZDD node. If it does not exist, it creates a new one. Does not modify the reference count of whatever is returned. A newly created internal node comes back with a reference count 0. For a newly created node, increments the reference counts of what T and E point to. Returns a pointer to the new node if successful; NULL if memory is exhausted or if reordering took place.]
SideEffects [None]
SeeAlso [cuddUniqueInter]
Definition at line 1372 of file cuddTable.c.
Function********************************************************************
Synopsis [Wrapper for cuddUniqueInterZdd.]
Description [Wrapper for cuddUniqueInterZdd, which applies the ZDD reduction rule. Returns a pointer to the result node under normal conditions; NULL if reordering occurred or memory was exhausted.]
SideEffects [None]
SeeAlso [cuddUniqueInterZdd]
Definition at line 1050 of file cuddTable.c.
Function********************************************************************
Synopsis [Wrapper for cuddUniqueInterZdd that is independent of variable ordering.]
Description [Wrapper for cuddUniqueInterZdd that is independent of variable ordering (IVO). This function does not require parameter index to precede the indices of the top nodes of g and h in the variable order. Returns a pointer to the result node under normal conditions; NULL if reordering occurred or memory was exhausted.]
SideEffects [None]
SeeAlso [cuddZddGetNode cuddZddIsop]
Definition at line 1083 of file cuddTable.c.
Function********************************************************************
Synopsis [Adjusts the values of table limits.]
Description [Adjusts the values of table fields controlling the. sizes of subtables and computed table. If the computed table is too small according to the new values, it is resized.]
SideEffects [Modifies manager fields. May resize computed table.]
SeeAlso []
Definition at line 2843 of file cuddTable.c.
Function********************************************************************
Synopsis [Fixes a variable tree after the insertion of new subtables.]
Description [Fixes a variable tree after the insertion of new subtables. After such an insertion, the low fields of the tree below the insertion point are inconsistent.]
SideEffects [None]
SeeAlso []
Definition at line 3118 of file cuddTable.c.
|
static |
AutomaticStart
Function********************************************************************
Synopsis [Rehashes a ZDD unique subtable.]
Description []
SideEffects [None]
SeeAlso [cuddRehash]
Definition at line 2451 of file cuddTable.c.
|
static |
Function********************************************************************
Synopsis [Reports problem in garbage collection.]
Description []
SideEffects [None]
SeeAlso [cuddGarbageCollect cuddGarbageCollectZdd]
Definition at line 3195 of file cuddTable.c.
|
static |
Function********************************************************************
Synopsis [Increases the number of subtables in a unique table so that it meets or exceeds index.]
Description [Increases the number of subtables in a unique table so that it meets or exceeds index. The parameter amount determines how much spare space is allocated to prevent too frequent resizing. If index is negative, the table is resized, but no new variables are created. Returns 1 if successful; 0 otherwise.]
SideEffects [None]
SeeAlso [Cudd_Reserve cuddResizeTableZdd]
Definition at line 2555 of file cuddTable.c.
|
static |
Definition at line 121 of file cuddTable.c.