PolyBoRi
|
This class defines a C++ interface to CUDD's
decicion diagram manager.
More...
#include <CCuddInterface.h>
Public Types | |
typedef DdNode * | node_ptr |
Type of Cudd's decision diagrams. | |
typedef DdManager | mgr_type |
Type of Cudd decision diagram manager. | |
typedef int | cudd_idx_type |
typedef node_ptr(* | unary_int_function )(mgr_type *, cudd_idx_type) |
typedef node_ptr(* | void_function )(mgr_type *) |
typedef boost::intrusive_ptr < mgr_type > | mgr_ptr |
Smart pointer to Cudd manager. | |
Public Member Functions | |
CCuddInterface (size_type numVars, size_type numVarsZ, 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 () | |
Destructor. | |
mgr_type * | getManager () const |
Get pure CUDD structure. | |
mgr_ptr | pManager () const |
Get (shared) pointer to initialized manager. | |
self & | operator= (const self &right) |
Assignment operation. | |
node_ptr | zddVar (idx_type idx) const |
Get ZDD variable. | |
node_ptr | zddOne (idx_type iMax) const |
Get 1-terminal for ZDDs. | |
node_ptr | zddZero () const |
Get 0-terminal for ZDDs. | |
node_ptr | zddOne () const |
Get 1-terminal for ZDDs. | |
*node_ptr | getVar (idx_type idx) const |
size_type | nVariables () const |
Get number of managed variables. | |
void | cacheFlush () |
clear all temporarily stored data | |
Member functions mimicking/interfacing with CUDD procedures | |
| |
int | ReorderingStatusZdd (Cudd_ReorderingType *method) const |
idx_type | ReadPermZdd (idx_type idx) const |
idx_type | ReadInvPermZdd (idx_type idx) 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 |
Protected Member Functions | |
mgr_ptr | init (size_type numVars, size_type numVarsZ, size_type numSlots, size_type cacheSize, large_size_type maxMemory) |
initialized CUDD decision diagrma manager, check it and start reference counting | |
node_ptr | checkedResult (node_ptr result) const |
Generate check result of previous node operation and convert. | |
void | checkedResult (int result) const |
Generate check numerical result of previous operation. | |
node_ptr | apply (unary_int_function func, idx_type idx) const |
Apply function to given index. | |
node_ptr | apply (void_function func) const |
Call function. | |
void | recursiveDeref (node_ptr node) const |
Dereferencing of diagram node. | |
void | initVar (node_ptr &node, idx_type idx) const |
Generate raw variable. | |
template<class MemberFuncPtr > | |
CCallbackWrapper< MemberFuncPtr > | callBack (MemberFuncPtr ptr) |
Wrapping memeber function as functional. |
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.
typedef int polybori::CCuddInterface::cudd_idx_type |
typedef boost::intrusive_ptr<mgr_type> polybori::CCuddInterface::mgr_ptr |
Smart pointer to Cudd manager.
typedef DdManager polybori::CCuddInterface::mgr_type |
Type of Cudd decision diagram manager.
typedef DdNode* polybori::CCuddInterface::node_ptr |
Type of Cudd's decision diagrams.
typedef node_ptr(* polybori::CCuddInterface::void_function)(mgr_type *) |
polybori::CCuddInterface::CCuddInterface | ( | size_type | numVars, |
size_type | numVarsZ, | ||
size_type | numSlots = CUDD_UNIQUE_SLOTS , |
||
size_type | cacheSize = CUDD_CACHE_SLOTS , |
||
unsigned long | maxMemory = 0 |
||
) | [inline] |
Initialize CUDD-like decision diagram manager.
polybori::CCuddInterface::CCuddInterface | ( | const self & | rhs | ) | [inline] |
Copy constructor.
polybori::CCuddInterface::~CCuddInterface | ( | ) | [inline] |
Destructor.
void polybori::CCuddInterface::AddHook | ( | DD_HFP | f, |
Cudd_HookType | where | ||
) | [inline] |
node_ptr polybori::CCuddInterface::apply | ( | unary_int_function | func, |
idx_type | idx | ||
) | const [inline, protected] |
Apply function to given index.
node_ptr polybori::CCuddInterface::apply | ( | void_function | func | ) | const [inline, protected] |
Call function.
void polybori::CCuddInterface::cacheFlush | ( | ) | [inline] |
clear all temporarily stored data
CCallbackWrapper<MemberFuncPtr> polybori::CCuddInterface::callBack | ( | MemberFuncPtr | ptr | ) | [inline, protected] |
Wrapping memeber function as functional.
void polybori::CCuddInterface::checkedResult | ( | int | result | ) | const [inline, protected] |
Generate check numerical result of previous operation.
References error_text(), and UNLIKELY.
Generate check result of previous node operation and convert.
void polybori::CCuddInterface::CheckKeys | ( | ) | [inline] |
void polybori::CCuddInterface::DebugCheck | ( | ) | [inline] |
void polybori::CCuddInterface::DisableReorderingReporting | ( | ) | [inline] |
void polybori::CCuddInterface::EnableReorderingReporting | ( | ) | [inline] |
mgr_type* polybori::CCuddInterface::getManager | ( | ) | const [inline] |
Get pure CUDD structure.
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 )(*this, arg); } void SetMaxMemory ( unsigned long arg) { BOOST_PP_CAT(Cudd_, SetMaxMemory )(*this, arg); } void SetMaxGrowth ( double arg) { BOOST_PP_CAT(Cudd_, SetMaxGrowth )(*this, arg); } void SetZddTree ( MtrNode* arg) { BOOST_PP_CAT(Cudd_, SetZddTree )(*this, arg); }
References UNLIKELY.
mgr_ptr polybori::CCuddInterface::init | ( | size_type | numVars, |
size_type | numVarsZ, | ||
size_type | numSlots, | ||
size_type | cacheSize, | ||
large_size_type | maxMemory | ||
) | [inline, protected] |
initialized CUDD decision diagrma manager, check it and start reference counting
References UNLIKELY.
Generate raw variable.
int polybori::CCuddInterface::IsInHook | ( | DD_HFP | f, |
Cudd_HookType | where | ||
) | const [inline] |
MtrNode* polybori::CCuddInterface::MakeZddTreeNode | ( | size_type | low, |
size_type | size, | ||
size_type | type | ||
) | [inline] |
size_type polybori::CCuddInterface::nVariables | ( | ) | const [inline] |
Get number of managed variables.
mgr_ptr polybori::CCuddInterface::pManager | ( | ) | const [inline] |
Get (shared) pointer to initialized manager.
void polybori::CCuddInterface::PrintLinear | ( | ) | [inline] |
void polybori::CCuddInterface::PrintVersion | ( | FILE * | fp | ) | const [inline] |
int polybori::CCuddInterface::ReadLinear | ( | int | x, |
int | y | ||
) | [inline] |
void polybori::CCuddInterface::recursiveDeref | ( | node_ptr | node | ) | const [inline, protected] |
Dereferencing of diagram node.
void polybori::CCuddInterface::RemoveHook | ( | DD_HFP | f, |
Cudd_HookType | where | ||
) | [inline] |
int polybori::CCuddInterface::ReorderingStatusZdd | ( | Cudd_ReorderingType * | method | ) | const [inline] |
node_ptr polybori::CCuddInterface::zddOne | ( | ) | const [inline] |
Get 1-terminal for ZDDs.
void polybori::CCuddInterface::zddPrintSubtable | ( | ) | const [inline] |
void polybori::CCuddInterface::zddReduceHeap | ( | Cudd_ReorderingType | heuristic, |
int | minsize | ||
) | [inline] |
void polybori::CCuddInterface::zddShuffleHeap | ( | int * | permutation | ) | [inline] |
void polybori::CCuddInterface::zddSymmProfile | ( | int | lower, |
int | upper | ||
) | const [inline] |
node_ptr polybori::CCuddInterface::zddZero | ( | ) | const [inline] |
Get 0-terminal for ZDDs.