abc-master
|
Go to the source code of this file.
Data Structures | |
union | hack |
Typedefs | |
typedef ABC_NAMESPACE_IMPL_START union hack | hack |
Functions | |
static void | ddRehashZdd (DdManager *unique, int i) |
static int | ddResizeTable (DdManager *unique, int index) |
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) |
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.122 2009/02/19 16:24:28 fabio Exp $" |
typedef ABC_NAMESPACE_IMPL_START union hack hack |
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-2004, 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 188 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 235 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 2108 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 2758 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 659 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 729 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 351 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 1795 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 1530 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 2241 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 1702 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 2385 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 1450 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 1128 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 1304 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 1343 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 1041 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 1074 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 2805 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 3080 of file cuddTable.c.
|
static |
AutomaticStart
Function********************************************************************
Synopsis [Rehashes a ZDD unique subtable.]
Description []
SideEffects [None]
SeeAlso [cuddRehash]
Definition at line 2422 of file cuddTable.c.
Function********************************************************************
Synopsis [Reports problem in garbage collection.]
Description []
SideEffects [None]
SeeAlso [cuddGarbageCollect cuddGarbageCollectZdd]
Definition at line 3157 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. Returns 1 if successful; 0 otherwise.]
SideEffects [None]
SeeAlso [cuddResizeTableZdd]
Definition at line 2523 of file cuddTable.c.
|
static |
Definition at line 124 of file cuddTable.c.