Package info.scce.addlib.dd.bdd
Class BDDManager
- java.lang.Object
-
- info.scce.addlib.dd.DDManager<BDD,BDDBackend>
-
- info.scce.addlib.dd.bdd.BDDManager
-
public class BDDManager extends DDManager<BDD,BDDBackend>
DD manager forBDD
.
-
-
Constructor Summary
Constructors Constructor Description BDDManager()
Creates a BDD manager with one of the available backends.BDDManager(BDDBackend backend)
Creates a BDD manager with the given backend.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BDD
ithVar(int var)
Creates a DD with the given variable index.BDD
ithVar(int i, BDD t, BDD e)
BDD
namedIthVar(String name, int i)
BDD
namedIthVar(String name, int i, BDD t, BDD e)
BDD
namedVar(String name)
Creates a DD with the given variable name.BDD
namedVar(String name, BDD t, BDD e)
BDD
newVar()
Creates a BDD with a new variable at the largest existing index plus 1.BDD
newVarAtLevel(int level)
Creates a BDD with a new variable at the given level and index of the largest existing index plus 1.BDD
parse(String str)
Parse a DD from the given String.BDD
readLogicZero()
Creates a BDD for the logical zero (false).BDD
readOne()
Creates a BDD for the logical one (true).-
Methods inherited from class info.scce.addlib.dd.DDManager
addVarName, checkZeroRef, createVariableName, decRefCount, disableAutomaticReordering, enableAutomaticReordering, getBackend, incRefCount, knownVarNames, ptr, quit, readPerm, reduceHeap, setNextReordering, setVariableOrder, varIdx, varName
-
-
-
-
Constructor Detail
-
BDDManager
public BDDManager()
Creates a BDD manager with one of the available backends. UseBDDManager(BDDBackend)
instead when aiming for more precise results as there are no guarantees which backend is used with the getter.
-
BDDManager
public BDDManager(BDDBackend backend)
Creates a BDD manager with the given backend.- Parameters:
backend
- Backend to use for BDDManager
-
-
Method Detail
-
readOne
public BDD readOne()
Creates a BDD for the logical one (true).- Returns:
- created BDD
-
readLogicZero
public BDD readLogicZero()
Creates a BDD for the logical zero (false).- Returns:
- created BDD
-
namedVar
public BDD namedVar(String name)
Description copied from class:DDManager
Creates a DD with the given variable name.
Undefined behavior when not all indices up to the highest are mapped and the mapping withname
does not exist yet.- Specified by:
namedVar
in classDDManager<BDD,BDDBackend>
- Parameters:
name
- Variable name for root variable- Returns:
- created DD
-
ithVar
public BDD ithVar(int var)
Description copied from class:DDManager
Creates a DD with the given variable index. If the index has not been mapped yet, it creates a mapping of the format"x"+i
.
If you create variables out of order or leave out indices, the behavior of the ADD-Lib might be undefined as it assumes all indices up to the highest to be mapped!- Specified by:
ithVar
in classDDManager<BDD,BDDBackend>
- Parameters:
var
- Index for root variable- Returns:
- created DD
-
newVar
public BDD newVar()
Creates a BDD with a new variable at the largest existing index plus 1.Only available in CUDD.
- Returns:
- created BDD
-
newVarAtLevel
public BDD newVarAtLevel(int level)
Creates a BDD with a new variable at the given level and index of the largest existing index plus 1.Only available in CUDD.
- Parameters:
level
- position of the variable- Returns:
- created BDD
-
-