polybori::CCuddInterface Class Reference

This class defines a C++ interface to CUDD's decicion diagram manager. More...

#include <CCuddInterface.h>

List of all members.

Public Types

typedef CCuddCore::errorfunc_type errorfunc_type
typedef CCuddCore::large_size_type large_size_type
typedef CCuddCore::refcount_type refcount_type
typedef CCuddCore::node_type node_type
typedef CCuddCore::mgrcore_type mgrcore_type
typedef
CCuddCore::unary_int_function 
unary_int_function
typedef CCuddCore::void_function void_function
typedef CCuddCore::binary_function binary_function
typedef
CCuddCore::binary_int_function 
binary_int_function
typedef CCuddCore::ternary_function ternary_function
typedef
CCuddCore::int_unary_function 
int_unary_function
typedef CCuddCore::size_type size_type
typedef CCuddCore::idx_type idx_type
typedef CVariableNames variable_names_type
 Define type for storing names of variables.
typedef
variable_names_type::const_reference 
const_varname_reference
 Define type for getting names of variables.
Generic names for related data types
typedef CCuddInterface self
typedef CCuddCore core_type
typedef core_type::mgrcore_ptr mgrcore_ptr
typedef CCuddZDD dd_type
typedef self tmp_ref

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
selfoperator= (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
Note:
See preprocessor generated members below


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.


Detailed Description

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.

Attention:
This class is intented for internal use only. Use the highlevel classes CDDManager<CCuddInterface> or BoolePolyRing instead.

Member Typedef Documentation

Define type for getting names of variables.

Define type for storing names of variables.


Constructor & Destructor Documentation

polybori::CCuddInterface::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 
) [inline]

Initialize CUDD-like decision diagram manager.

polybori::CCuddInterface::CCuddInterface ( const self rhs  )  [inline]

Copy constructor.

polybori::CCuddInterface::CCuddInterface ( mgrcore_ptr  rhs  )  [inline]

Construct interface for already initialized manager.

polybori::CCuddInterface::~CCuddInterface (  )  [inline]

Destructor.


Member Function Documentation

void polybori::CCuddInterface::AddHook ( DD_HFP  f,
Cudd_HookType  where 
) [inline]

dd_type polybori::CCuddInterface::apply ( void_function  func  )  const [inline, protected]

Call function.

dd_type polybori::CCuddInterface::apply ( unary_int_function  func,
idx_type  idx 
) const [inline, protected]

Apply function to given index.

idx_type polybori::CCuddInterface::checkedResult ( idx_type  result  )  const [inline, protected]

Generate check numerical result of previous operation.

dd_type polybori::CCuddInterface::checkedResult ( node_type  result  )  const [inline, protected]

Generate check result of previous node operation and convert.

void polybori::CCuddInterface::CheckKeys (  )  [inline]

void polybori::CCuddInterface::checkReturnValue ( const int  result  )  const [inline]

References UNLIKELY.

void polybori::CCuddInterface::checkReturnValue ( const node_type  result  )  const [inline]

void polybori::CCuddInterface::DebugCheck (  )  [inline]

void polybori::CCuddInterface::DisableReorderingReporting (  )  [inline]

void polybori::CCuddInterface::EnableReorderingReporting (  )  [inline]

dd_type polybori::CCuddInterface::getDiagram ( node_type  result  )  const [inline, protected]

Convert to decision diagram.

errorfunc_type polybori::CCuddInterface::getHandler (  )  const [inline]

Extract function for error handling.

mgrcore_type polybori::CCuddInterface::getManager (  )  const [inline]

Get pure CUDD structure.

const_varname_reference polybori::CCuddInterface::getName ( idx_type  idx  )  const [inline]

Get name of variable with index idx.

dd_type polybori::CCuddInterface::getVar ( idx_type  idx  )  const [inline]

void polybori::CCuddInterface::info (  )  const [inline]

Print statistical information.

int polybori::CCuddInterface::IsInHook ( DD_HFP  f,
Cudd_HookType  where 
) const [inline]

bool polybori::CCuddInterface::isVerbose (  )  const [inline]

void polybori::CCuddInterface::makeTerse (  )  [inline]

void polybori::CCuddInterface::makeVerbose (  )  [inline]

MtrNode* polybori::CCuddInterface::MakeZddTreeNode ( size_type  low,
size_type  size,
size_type  type 
) [inline]

mgrcore_ptr polybori::CCuddInterface::managerCore (  )  const [inline]

Get (shared) pointer to initialized manager.

Referenced by polybori::extract_manager(), and polybori::get_mgr_core().

size_type polybori::CCuddInterface::nVariables (  )  const [inline]

self& polybori::CCuddInterface::operator= ( const self right  )  [inline]

Assignment operation.

References pMgr.

size_type polybori::CCuddInterface::Prime ( size_type  pr  )  const [inline]

void polybori::CCuddInterface::PrintLinear (  )  [inline]

void polybori::CCuddInterface::PrintVersion ( FILE *  fp  )  const [inline]

idx_type polybori::CCuddInterface::ReadInvPermZdd ( idx_type  i  )  const [inline]

int polybori::CCuddInterface::ReadLinear ( int  x,
int  y 
) [inline]

idx_type polybori::CCuddInterface::ReadPermZdd ( idx_type  i  )  const [inline]

void polybori::CCuddInterface::RemoveHook ( DD_HFP  f,
Cudd_HookType  where 
) [inline]

int polybori::CCuddInterface::ReorderingStatusZdd ( Cudd_ReorderingType *  method  )  const [inline]

errorfunc_type polybori::CCuddInterface::setHandler ( errorfunc_type  newHandler  )  [inline]

Define function for error handling.

* void polybori::CCuddInterface::setName ( idx_type  idx,
const_varname_reference  varname 
) [inline]

Set name of variable with index idx.

Note:
Preprocessor generated members
  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))

  BOOST_PP_SEQ_FOR_EACH(PB_CUDDMGR_READ, MtrNode*, (ReadZddTree))

  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); }

int polybori::CCuddInterface::SharingSize ( dd_type nodes,
int  nlen 
) const [inline]

CCuddZDD polybori::CCuddInterface::zddOne (  )  const [inline]

Get 1-terminal for ZDDs.

CCuddZDD polybori::CCuddInterface::zddOne ( idx_type  iMax  )  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]

CCuddZDD polybori::CCuddInterface::zddVar ( idx_type  idx  )  const [inline]

Get ZDD variable.

CCuddZDD polybori::CCuddInterface::zddZero (  )  const [inline]

Get 0-terminal for ZDDs.

Referenced by polybori::CIndexCacheHandle< NaviType >::toNode().


The documentation for this class was generated from the following file:

Generated on Thu Mar 5 02:16:44 2009 for PolyBoRi by  doxygen 1.5.8