PolyBoRi
|
This class defines a C++ interface to CUDD's
decicion diagram manager.
More...
#include <CCuddInterface.h>
Public Member Functions | |
CCuddInterface (size_type numVars=0, size_type numVarsZ=0, size_type numSlots=CUDD_UNIQUE_SLOTS, size_type cacheSize=CUDD_CACHE_SLOTS, unsigned long maxMemory=0) | |
Initialize CUDD-like decision diagram manager. | |
CCuddInterface (const self &rhs) | |
Copy constructor. | |
CCuddInterface (mgrcore_ptr rhs) | |
Construct interface for already initialized manager. | |
~CCuddInterface () | |
Destructor. | |
errorfunc_type | setHandler (errorfunc_type newHandler) |
Define function for error handling. | |
errorfunc_type | getHandler () const |
Extract function for error handling. | |
mgrcore_type | getManager () const |
Get pure CUDD structure. | |
mgrcore_ptr | managerCore () const |
Get (shared) pointer to initialized manager. | |
void | info () const |
Print statistical information. | |
void | checkReturnValue (const node_type result) const |
void | checkReturnValue (const int result) const |
self & | operator= (const self &right) |
Assignment operation. | |
CCuddZDD | zddVar (idx_type idx) const |
Get ZDD variable. | |
CCuddZDD | zddOne (idx_type iMax) const |
Get 1-terminal for ZDDs. | |
CCuddZDD | zddZero () const |
Get 0-terminal for ZDDs. | |
CCuddZDD | zddOne () const |
Get 1-terminal for ZDDs. | |
**void | setName (idx_type idx, const_varname_reference varname) |
Set name of variable with index idx. | |
const_varname_reference | getName (idx_type idx) const |
Get name of variable with index idx. | |
dd_type | getVar (idx_type idx) const |
size_type | nVariables () const |
Get number of managed variables. | |
Manage eloquence | |
void | makeVerbose () |
void | makeTerse () |
bool | isVerbose () const |
Member functions mimicking/interfacing with CUDD procedures | |
| |
int | ReorderingStatusZdd (Cudd_ReorderingType *method) const |
idx_type | ReadPermZdd (idx_type i) const |
idx_type | ReadInvPermZdd (idx_type i) const |
void | AddHook (DD_HFP f, Cudd_HookType where) |
void | RemoveHook (DD_HFP f, Cudd_HookType where) |
int | IsInHook (DD_HFP f, Cudd_HookType where) const |
void | EnableReorderingReporting () |
void | DisableReorderingReporting () |
void | DebugCheck () |
void | CheckKeys () |
void | PrintLinear () |
int | ReadLinear (int x, int y) |
size_type | Prime (size_type pr) const |
void | PrintVersion (FILE *fp) const |
MtrNode * | MakeZddTreeNode (size_type low, size_type size, size_type type) |
void | zddPrintSubtable () const |
void | zddReduceHeap (Cudd_ReorderingType heuristic, int minsize) |
void | zddShuffleHeap (int *permutation) |
void | zddSymmProfile (int lower, int upper) const |
int | SharingSize (dd_type *nodes, int nlen) const |
Protected Member Functions | |
dd_type | getDiagram (node_type result) const |
Convert to decision diagram. | |
dd_type | checkedResult (node_type result) const |
Generate check result of previous node operation and convert. | |
idx_type | checkedResult (idx_type result) const |
Generate check numerical result of previous operation. | |
dd_type | apply (unary_int_function func, idx_type idx) const |
Apply function to given index. | |
dd_type | apply (void_function func) const |
Call function. |
This class defines a C++ interface to CUDD's
decicion diagram manager.
The purpose of this wrapper is just to provide an efficient and save way of handling the decision diagram management. It corrects some short-comings of CUDD's built-in interface.
Define type for getting names of variables.
Define type for storing names of variables.
|
inline |
Initialize CUDD-like decision diagram manager.
|
inline |
Copy constructor.
|
inline |
Construct interface for already initialized manager.
|
inline |
Destructor.
|
inline |
|
inlineprotected |
Apply function to given index.
|
inlineprotected |
Call function.
Generate check result of previous node operation and convert.
Generate check numerical result of previous operation.
|
inline |
|
inline |
|
inline |
References UNLIKELY.
|
inline |
|
inline |
|
inline |
Convert to decision diagram.
|
inline |
Extract function for error handling.
|
inline |
Get pure CUDD structure.
|
inline |
Get name of variable with index idx.
Referenced by polybori::CIndexCacheHandle< NaviType >::toNode().
|
inline |
Print statistical information.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Get (shared) pointer to initialized manager.
Referenced by polybori::extract_manager(), and polybori::get_mgr_core().
|
inline |
Get number of managed variables.
Referenced by polybori::CIndexHandle< NaviType >::fromNode(), and polybori::CIndexCacheHandle< NaviType >::toNode().
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Define function for error handling.
|
inline |
Set name of variable with index idx.
@note Preprocessor generated members @code
BOOST_PP_SEQ_FOR_EACH(PB_CUDDMGR_SET, size_type, (SetMinHit)(SetLooseUpTo)(SetMaxCacheHard)(SetMaxLive) )
BOOST_PP_SEQ_FOR_EACH(PB_CUDDMGR_SET, int, (SetSiftMaxVar)(SetSiftMaxSwap)(SetRecomb)(SetSymmviolation) (SetArcviolation)(SetPopulationSize)(SetNumberXovers) )
BOOST_PP_SEQ_FOR_EACH(PB_CUDDMGR_SET, FILE*, (SetStdout)(SetStderr))
BOOST_PP_SEQ_FOR_EACH(PB_CUDDMGR_SWITCH, BOOST_PP_NIL, (zddRealignEnable)(zddRealignDisable) (AutodynDisableZdd)(FreeZddTree) (EnableGarbageCollection)(DisableGarbageCollection) (TurnOnCountDead)(TurnOffCountDead)(ClearErrorCode) )
BOOST_PP_SEQ_FOR_EACH(PB_CUDDMGR_READ, double, (ReadCacheUsedSlots)(ReadCacheLookUps)(ReadCacheHits) (ReadSwapSteps)(ReadMaxGrowth)(AverageDistance) )
BOOST_PP_SEQ_FOR_EACH(PB_CUDDMGR_READ, size_type, (ReadCacheSlots)(ReadMinHit)(ReadLooseUpTo)(ReadMaxCache) (ReadMaxCacheHard)(ReadSlots)(ReadKeys)(ReadDead)(ReadMinDead) (ReadNextReordering)(ReadMaxLive) )
BOOST_PP_SEQ_FOR_EACH(PB_CUDDMGR_READ, int, (zddRealignmentEnabled)(ReadZddSize)(ReadReorderings)(ReadSiftMaxVar) (ReadSiftMaxSwap)(ReadGarbageCollections)(GarbageCollectionEnabled) (DeadAreCounted)(ReadRecomb) (ReadPopulationSize)(ReadSymmviolation)(ReadArcviolation) (ReadNumberXovers)(ReorderingReporting)(ReadErrorCode) )
BOOST_PP_SEQ_FOR_EACH(PB_CUDDMGR_READ, long, (ReadReorderingTime)(ReadGarbageCollectionTime) (ReadPeakNodeCount)(zddReadNodeCount) )
BOOST_PP_SEQ_FOR_EACH(PB_CUDDMGR_READ, large_size_type, (ReadMemoryInUse)(ReadMaxMemory) )
BOOST_PP_SEQ_FOR_EACH(PB_CUDDMGR_READ, FILE*, (ReadStdout)(ReadStderr))
void AutodynEnableZdd ( Cudd_ReorderingType arg) { BOOST_PP_CAT(Cudd_, AutodynEnableZdd )(getManager(), arg); } void SetMaxMemory ( unsigned long arg) { BOOST_PP_CAT(Cudd_, SetMaxMemory )(getManager(), arg); } void SetMaxGrowth ( double arg) { BOOST_PP_CAT(Cudd_, SetMaxGrowth )(getManager(), arg); } void SetZddTree ( MtrNode* arg) { BOOST_PP_CAT(Cudd_, SetZddTree )(getManager(), arg); } /**
|
inline |
|
inline |
Get 1-terminal for ZDDs.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Get 0-terminal for ZDDs.
Referenced by polybori::CIndexCacheHandle< NaviType >::toNode().