Class JFactory
- java.lang.Object
-
- com.github.javabdd.BDDFactory
-
- com.github.javabdd.BDDFactoryIntImpl
-
- com.github.javabdd.JFactory
-
public class JFactory extends BDDFactoryIntImpl
This is a 100% Java implementation of the BDD factory. It is based on the C source code for BuDDy. As such, the implementation is very ugly, but it works. Like BuDDy, it uses a reference counting scheme for garbage collection.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.github.javabdd.BDDFactoryIntImpl
BDDFactoryIntImpl.IntBDD, BDDFactoryIntImpl.IntBDDBitVector, BDDFactoryIntImpl.IntBDDVarSet, BDDFactoryIntImpl.IntBDDVarSetWithFinalizer, BDDFactoryIntImpl.IntBDDWithFinalizer, BDDFactoryIntImpl.IntZDDVarSet, BDDFactoryIntImpl.IntZDDVarSetWithFinalizer
-
Nested classes/interfaces inherited from class com.github.javabdd.BDDFactory
BDDFactory.BDDOp, BDDFactory.CacheStats, BDDFactory.ContinuousStats, BDDFactory.GCStats, BDDFactory.MaxUsedBddNodesStats, BDDFactory.ReorderMethod, BDDFactory.ReorderStats
-
-
Field Summary
Fields Modifier and Type Field Description static boolean
FLUSH_CACHE_ON_GC
Flush the operation cache on every garbage collection.-
Fields inherited from class com.github.javabdd.BDDFactoryIntImpl
to_free, to_free_length
-
Fields inherited from class com.github.javabdd.BDDFactory
and, biimp, cachestats, continuousstats, diff, domain, fdvarnum, firstbddvar, gc_callbacks, gcstats, imp, invimp, less, maxusedbddnodesstats, nand, nor, or, reorder_callbacks, REORDER_NONE, REORDER_RANDOM, REORDER_SIFT, REORDER_SIFTITE, REORDER_WIN2, REORDER_WIN2ITE, REORDER_WIN3, REORDER_WIN3ITE, reorderstats, resize_callbacks, tokenizer, xor
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
addref_impl(int v)
void
addVarBlock(int first, int last, boolean fixed)
Adds a new variable block for reordering.protected int
apply_impl(int v1, int v2, BDDFactory.BDDOp opr)
protected int
applyAll_impl(int v1, int v2, BDDFactory.BDDOp opr, int v3)
protected int
applyEx_impl(int v1, int v2, BDDFactory.BDDOp opr, int v3)
protected int
applyUni_impl(int v1, int v2, BDDFactory.BDDOp opr, int v3)
void
autoReorder(BDDFactory.ReorderMethod method)
Enables automatic reordering.void
autoReorder(BDDFactory.ReorderMethod method, int max)
Enables automatic reordering with the given (maximum) number of reorderings.void
clearError()
Clears any outstanding error condition.void
clearVarBlocks()
Clears all the variable blocks that have been defined by calls to addVarBlock.JFactory
cloneFactory()
protected int
compose_impl(int v1, int v2, int var)
protected int
constrain_impl(int v1, int v2)
BDD
copyNode(BDD that)
Use this function to translate BDD's from a JavaFactory into its clone.protected void
delref_impl(int v)
void
disableReorder()
Disable automatic reordering until enableReorder is called.void
done()
This function frees all memory used by the BDD package and resets the package to its uninitialized state.void
enableReorder()
Enable automatic reordering after a call to disableReorder.protected int
exist_impl(int v1, int v2)
protected int
forAll_impl(int v1, int v2)
protected int
fullSatOne_impl(int v)
protected com.github.javabdd.JFactory.BddTree
getBlock(com.github.javabdd.JFactory.BddTree t, int low, int high)
int
getCacheSize()
Get the current size of the cache, in entries.int
getNodeNum()
Get the number of active nodes in use.int
getNodeTableSize()
Get the number of allocated nodes.protected com.github.javabdd.JFactory.BddTree
getParent(com.github.javabdd.JFactory.BddTree child)
protected com.github.javabdd.JFactory.BddTree
getParent(com.github.javabdd.JFactory.BddTree parent, com.github.javabdd.JFactory.BddTree child)
BDDFactory.ReorderMethod
getReorderMethod()
Returns the current reorder method as defined by autoReorder.int
getReorderTimes()
Returns the number of allowed reorderings left.protected int
high_impl(int v)
static BDDFactory
init(int nodenum, int cachesize)
protected void
initialize(int initnodesize, int cs)
Compare to bdd_init.protected int
invalid_bdd_impl()
boolean
isInitialized()
Returns true if this BDD factory is initialized, false otherwise.boolean
isZDD()
Returns true if this is a ZDD factory, false otherwise.protected int
ite_impl(int v1, int v2, int v3)
protected int
ithVar_impl(int var)
protected int
level_impl(int v)
int
level2Var(int level)
Convert from a BDD level to a BDD variable.BDD
load(BufferedReader in, int[] translate)
Loads a BDD from the given input, translating BDD variables according to the given map.protected int
low_impl(int v)
protected int
makenode_impl(int lev, int lo, int hi)
BDDPairing
makePair()
Make a new BDDPairing object.protected int
nithVar_impl(int var)
protected int
nodeCount_impl(int v)
protected int
nodeCount_impl2(int[] v)
protected int
not_impl(int v1)
protected int
one_impl()
protected double
pathCount_impl(int v)
void
printAll()
Prints all used entries in the node table.void
printOrder()
Prints an indented list of the variable blocks.void
printStat()
Print cache statistics.protected void
printTable_impl(int v)
void
reorder(BDDFactory.ReorderMethod m)
Reorder the BDD with the given method.int
reorderGain()
Calculate the gain in size after a reordering.int
reorderVerbose(int v)
Enables verbose information about reordering.protected int
replace_impl(int v, BDDPairing p)
protected int
restrict_impl(int v1, int v2)
void
reverseAllDomains()
void
reverseDomain(BDDDomain d)
protected void
reverseDomain0(BDDDomain d)
protected double
satCount_impl(int v)
protected int
satOne_impl(int v)
protected int
satOne_impl2(int v1, int v2, boolean pol)
void
save(BufferedWriter out, BDD b)
Saves a BDD to an output writer.double
setCacheRatio(double x)
Sets the cache ratio for the operator caches.int
setCacheSize(int v)
Sets cache size.void
setError(int code)
Sets the error condition.double
setIncreaseFactor(double x)
Set factor by which to increase node table after a garbage collection.int
setMaxIncrease(int x)
Set maximum number of nodes by which to increase node table after a garbage collection.int
setMaxNodeNum(int size)
Set the maximum available number of BDD nodes.double
setMinFreeNodes(double x)
Set minimum percentage of nodes to be reclaimed after a garbage collection.int
setNodeTableSize(int size)
Sets the node table size.int
setVarNum(int num)
Set the number of used BDD variables.void
setVarOrder(int[] neworder)
This function sets the current variable order to be the one defined by neworder.void
setVarOrder(String ordering)
void
setVarOrder(List<Object> domains)
Set the variable order to be the given list of domains.protected int
simplify_impl(int v1, int v2)
protected int
support_impl(int v)
void
swapVar(int v1, int v2)
Swap two variables.protected int
unique_impl(int v1, int v2)
protected int
universe_impl()
void
validateAll()
void
validateBDD(BDD b)
protected int
var_impl(int v)
int
var2Level(int var)
Convert from a BDD variable to a BDD level.void
varBlockAll()
Add a variable block for all variables.int
varNum()
Returns the number of defined variables.protected int[]
varProfile_impl(int v)
protected int
veccompose_impl(int v, BDDPairing p)
protected int
zero_impl()
-
Methods inherited from class com.github.javabdd.BDDFactoryIntImpl
deferredFree, emptySet, finalize, handleDeferredFree, ithVar, makeBDD, makeBDDVarSet, nithVar, nodeCount, one, printTable, universe, unwrap, unwrap, unwrap, zero
-
Methods inherited from class com.github.javabdd.BDDFactory
addVarBlock, bdd_default_gbchandler, bdd_default_reohandler, bdd_default_reshandler, buildCube, buildCube, buildVector, buildVector, buildVector, buildVector, clearAllDomains, constantVector, constantVector, createBitVector, createDomain, doCallbacks, extDomain, extDomain, extDomain, extDomain, extDomain, extVarNum, gbc_handler, getCacheStats, getContinuousStats, getDomain, getGCStats, getMaxUsedBddNodesStats, getProperty, getReorderStats, getVarOrder, init, load, load, loadhash_get, makePair, makePair, makePair, makeSet, makeSet, makeVarOrdering, numberOfDomains, overlapDomain, readNext, registerCallback, registerGCCallback, registerReorderCallback, registerResizeCallback, reset, resize_handler, save, save_rec, unregisterCallback, unregisterGCCallback, unregisterReorderCallback, unregisterResizeCallback
-
-
-
-
Method Detail
-
init
public static BDDFactory init(int nodenum, int cachesize)
-
makePair
public BDDPairing makePair()
Description copied from class:BDDFactory
Make a new BDDPairing object.Compare to bdd_newpair.
- Specified by:
makePair
in classBDDFactory
- Returns:
- BDD pairing
-
addref_impl
protected void addref_impl(int v)
- Specified by:
addref_impl
in classBDDFactoryIntImpl
-
delref_impl
protected void delref_impl(int v)
- Specified by:
delref_impl
in classBDDFactoryIntImpl
-
zero_impl
protected int zero_impl()
- Specified by:
zero_impl
in classBDDFactoryIntImpl
-
one_impl
protected int one_impl()
- Specified by:
one_impl
in classBDDFactoryIntImpl
-
universe_impl
protected int universe_impl()
- Overrides:
universe_impl
in classBDDFactoryIntImpl
-
invalid_bdd_impl
protected int invalid_bdd_impl()
- Specified by:
invalid_bdd_impl
in classBDDFactoryIntImpl
-
var_impl
protected int var_impl(int v)
- Specified by:
var_impl
in classBDDFactoryIntImpl
-
level_impl
protected int level_impl(int v)
- Specified by:
level_impl
in classBDDFactoryIntImpl
-
low_impl
protected int low_impl(int v)
- Specified by:
low_impl
in classBDDFactoryIntImpl
-
high_impl
protected int high_impl(int v)
- Specified by:
high_impl
in classBDDFactoryIntImpl
-
ithVar_impl
protected int ithVar_impl(int var)
- Specified by:
ithVar_impl
in classBDDFactoryIntImpl
-
nithVar_impl
protected int nithVar_impl(int var)
- Specified by:
nithVar_impl
in classBDDFactoryIntImpl
-
makenode_impl
protected int makenode_impl(int lev, int lo, int hi)
- Specified by:
makenode_impl
in classBDDFactoryIntImpl
-
ite_impl
protected int ite_impl(int v1, int v2, int v3)
- Specified by:
ite_impl
in classBDDFactoryIntImpl
-
apply_impl
protected int apply_impl(int v1, int v2, BDDFactory.BDDOp opr)
- Specified by:
apply_impl
in classBDDFactoryIntImpl
-
not_impl
protected int not_impl(int v1)
- Specified by:
not_impl
in classBDDFactoryIntImpl
-
applyAll_impl
protected int applyAll_impl(int v1, int v2, BDDFactory.BDDOp opr, int v3)
- Specified by:
applyAll_impl
in classBDDFactoryIntImpl
-
applyEx_impl
protected int applyEx_impl(int v1, int v2, BDDFactory.BDDOp opr, int v3)
- Specified by:
applyEx_impl
in classBDDFactoryIntImpl
-
applyUni_impl
protected int applyUni_impl(int v1, int v2, BDDFactory.BDDOp opr, int v3)
- Specified by:
applyUni_impl
in classBDDFactoryIntImpl
-
compose_impl
protected int compose_impl(int v1, int v2, int var)
- Specified by:
compose_impl
in classBDDFactoryIntImpl
-
constrain_impl
protected int constrain_impl(int v1, int v2)
- Specified by:
constrain_impl
in classBDDFactoryIntImpl
-
restrict_impl
protected int restrict_impl(int v1, int v2)
- Specified by:
restrict_impl
in classBDDFactoryIntImpl
-
simplify_impl
protected int simplify_impl(int v1, int v2)
- Specified by:
simplify_impl
in classBDDFactoryIntImpl
-
support_impl
protected int support_impl(int v)
- Specified by:
support_impl
in classBDDFactoryIntImpl
-
exist_impl
protected int exist_impl(int v1, int v2)
- Specified by:
exist_impl
in classBDDFactoryIntImpl
-
forAll_impl
protected int forAll_impl(int v1, int v2)
- Specified by:
forAll_impl
in classBDDFactoryIntImpl
-
unique_impl
protected int unique_impl(int v1, int v2)
- Specified by:
unique_impl
in classBDDFactoryIntImpl
-
fullSatOne_impl
protected int fullSatOne_impl(int v)
- Specified by:
fullSatOne_impl
in classBDDFactoryIntImpl
-
replace_impl
protected int replace_impl(int v, BDDPairing p)
- Specified by:
replace_impl
in classBDDFactoryIntImpl
-
veccompose_impl
protected int veccompose_impl(int v, BDDPairing p)
- Specified by:
veccompose_impl
in classBDDFactoryIntImpl
-
nodeCount_impl
protected int nodeCount_impl(int v)
- Specified by:
nodeCount_impl
in classBDDFactoryIntImpl
-
pathCount_impl
protected double pathCount_impl(int v)
- Specified by:
pathCount_impl
in classBDDFactoryIntImpl
-
satCount_impl
protected double satCount_impl(int v)
- Specified by:
satCount_impl
in classBDDFactoryIntImpl
-
satOne_impl
protected int satOne_impl(int v)
- Specified by:
satOne_impl
in classBDDFactoryIntImpl
-
satOne_impl2
protected int satOne_impl2(int v1, int v2, boolean pol)
- Specified by:
satOne_impl2
in classBDDFactoryIntImpl
-
nodeCount_impl2
protected int nodeCount_impl2(int[] v)
- Specified by:
nodeCount_impl2
in classBDDFactoryIntImpl
-
varProfile_impl
protected int[] varProfile_impl(int v)
- Specified by:
varProfile_impl
in classBDDFactoryIntImpl
-
printTable_impl
protected void printTable_impl(int v)
- Specified by:
printTable_impl
in classBDDFactoryIntImpl
-
initialize
protected void initialize(int initnodesize, int cs)
Description copied from class:BDDFactory
Compare to bdd_init.- Specified by:
initialize
in classBDDFactory
- Parameters:
initnodesize
- the initial number of BDD nodescs
- the size of caches used by the BDD operators
-
addVarBlock
public void addVarBlock(int first, int last, boolean fixed)
Description copied from class:BDDFactory
Adds a new variable block for reordering.Creates a new variable block with the variables numbered first through last, inclusive.
The fixed parameter sets the block to be fixed (no reordering of its child blocks is allowed) or free.
Compare to bdd_intaddvarblock.
- Specified by:
addVarBlock
in classBDDFactory
- Parameters:
first
- first variable numberlast
- last variable numberfixed
- fixed or free
-
varBlockAll
public void varBlockAll()
Description copied from class:BDDFactory
Add a variable block for all variables.Adds a variable block for all BDD variables declared so far. Each block contains one variable only. More variable blocks can be added later with the use of addVarBlock -- in this case the tree of variable blocks will have the blocks of single variables as the leafs.
Compare to bdd_varblockall.
- Specified by:
varBlockAll
in classBDDFactory
-
clearVarBlocks
public void clearVarBlocks()
Description copied from class:BDDFactory
Clears all the variable blocks that have been defined by calls to addVarBlock.Compare to bdd_clrvarblocks.
- Specified by:
clearVarBlocks
in classBDDFactory
-
printOrder
public void printOrder()
Description copied from class:BDDFactory
Prints an indented list of the variable blocks.Compare to bdd_printorder.
- Specified by:
printOrder
in classBDDFactory
-
getNodeTableSize
public int getNodeTableSize()
Description copied from class:BDDFactory
Get the number of allocated nodes. This includes both dead and active nodes.Compare to bdd_getallocnum.
- Specified by:
getNodeTableSize
in classBDDFactory
- Returns:
- number of allocated nodes
-
setNodeTableSize
public int setNodeTableSize(int size)
Description copied from class:BDDFactory
Sets the node table size.- Specified by:
setNodeTableSize
in classBDDFactory
- Parameters:
size
- new size of table- Returns:
- old size of table
-
setCacheSize
public int setCacheSize(int v)
Description copied from class:BDDFactory
Sets cache size.- Specified by:
setCacheSize
in classBDDFactory
- Parameters:
v
- new cache size- Returns:
- old cache size
-
isZDD
public boolean isZDD()
Description copied from class:BDDFactory
Returns true if this is a ZDD factory, false otherwise.- Overrides:
isZDD
in classBDDFactory
- Returns:
- true if this is a ZDD factory, false otherwise
-
isInitialized
public boolean isInitialized()
Description copied from class:BDDFactory
Returns true if this BDD factory is initialized, false otherwise.Compare to bdd_isrunning.
- Specified by:
isInitialized
in classBDDFactory
- Returns:
- true if this BDD factory is initialized
-
setError
public void setError(int code)
Description copied from class:BDDFactory
Sets the error condition. This will cause the BDD package to throw an exception at the next garbage collection.- Specified by:
setError
in classBDDFactory
- Parameters:
code
- the error code to set
-
clearError
public void clearError()
Description copied from class:BDDFactory
Clears any outstanding error condition.- Specified by:
clearError
in classBDDFactory
-
setMaxNodeNum
public int setMaxNodeNum(int size)
Description copied from class:BDDFactory
Set the maximum available number of BDD nodes.Compare to bdd_setmaxnodenum.
- Specified by:
setMaxNodeNum
in classBDDFactory
- Parameters:
size
- maximum number of nodes- Returns:
- old value
-
setMinFreeNodes
public double setMinFreeNodes(double x)
Description copied from class:BDDFactory
Set minimum percentage of nodes to be reclaimed after a garbage collection. If this percentage is not reclaimed, the node table will be grown. The range of x is 0..1. The default is .20.Compare to bdd_setminfreenodes.
- Specified by:
setMinFreeNodes
in classBDDFactory
- Parameters:
x
- number from 0 to 1- Returns:
- old value
-
setMaxIncrease
public int setMaxIncrease(int x)
Description copied from class:BDDFactory
Set maximum number of nodes by which to increase node table after a garbage collection.Compare to bdd_setmaxincrease.
- Specified by:
setMaxIncrease
in classBDDFactory
- Parameters:
x
- maximum number of nodes by which to increase node table- Returns:
- old value
-
setIncreaseFactor
public double setIncreaseFactor(double x)
Description copied from class:BDDFactory
Set factor by which to increase node table after a garbage collection. The amount of growth is still limited bysetMaxIncrease()
.- Specified by:
setIncreaseFactor
in classBDDFactory
- Parameters:
x
- factor by which to increase node table after GC- Returns:
- old value
-
getNodeNum
public int getNodeNum()
Description copied from class:BDDFactory
Get the number of active nodes in use. Note that dead nodes that have not been reclaimed yet by a garbage collection are counted as active.Compare to bdd_getnodenum.
- Specified by:
getNodeNum
in classBDDFactory
- Returns:
- number of active nodes in use
-
getCacheSize
public int getCacheSize()
Description copied from class:BDDFactory
Get the current size of the cache, in entries.- Specified by:
getCacheSize
in classBDDFactory
- Returns:
- size of cache
-
reorderGain
public int reorderGain()
Description copied from class:BDDFactory
Calculate the gain in size after a reordering. The value returned is (100*(A-B))/A, where A is previous number of used nodes and B is current number of used nodes.Compare to bdd_reorder_gain.
- Specified by:
reorderGain
in classBDDFactory
- Returns:
- gain in size after a reordering
-
printStat
public void printStat()
Description copied from class:BDDFactory
Print cache statistics.Compare to bdd_printstat.
- Specified by:
printStat
in classBDDFactory
-
setCacheRatio
public double setCacheRatio(double x)
Description copied from class:BDDFactory
Sets the cache ratio for the operator caches. When the node table grows, operator caches will also grow to maintain the ratio.Compare to bdd_setcacheratio.
- Specified by:
setCacheRatio
in classBDDFactory
- Parameters:
x
- cache ratio- Returns:
- old cache ratio
-
varNum
public int varNum()
Description copied from class:BDDFactory
Returns the number of defined variables.Compare to bdd_varnum.
- Specified by:
varNum
in classBDDFactory
- Returns:
- number of defined variables
-
setVarNum
public int setVarNum(int num)
Description copied from class:BDDFactory
Set the number of used BDD variables. It can be called more than one time, but only to increase the number of variables.Compare to bdd_setvarnum.
- Specified by:
setVarNum
in classBDDFactory
- Parameters:
num
- new number of BDD variables- Returns:
- old number of BDD variables
-
printAll
public void printAll()
Description copied from class:BDDFactory
Prints all used entries in the node table.Compare to bdd_printall.
- Specified by:
printAll
in classBDDFactory
-
load
public BDD load(BufferedReader in, int[] translate) throws IOException
Description copied from class:BDDFactory
Loads a BDD from the given input, translating BDD variables according to the given map.Compare to bdd_load.
- Overrides:
load
in classBDDFactory
- Parameters:
in
- readertranslate
- variable translation map- Returns:
- BDD
- Throws:
IOException
- In case of an I/O error.
-
save
public void save(BufferedWriter out, BDD b) throws IOException
Description copied from class:BDDFactory
Saves a BDD to an output writer.Compare to bdd_save.
- Overrides:
save
in classBDDFactory
- Parameters:
out
- writerb
- BDD- Throws:
IOException
- In case of an I/O error.
-
setVarOrder
public void setVarOrder(int[] neworder)
Description copied from class:BDDFactory
This function sets the current variable order to be the one defined by neworder. The variable parameter neworder is interpreted as a sequence of variable indices and the new variable order is exactly this sequence. The array must contain all the variables defined so far. If, for instance the current number of variables is 3 and neworder contains [1; 0; 2] then the new variable order is v1 < v0 < v2.Note that this operation must walk through the node table many times, and therefore it is much more efficient to call this when the node table is small.
- Specified by:
setVarOrder
in classBDDFactory
- Parameters:
neworder
- new variable order
-
level2Var
public int level2Var(int level)
Description copied from class:BDDFactory
Convert from a BDD level to a BDD variable.Compare to bdd_level2var.
- Specified by:
level2Var
in classBDDFactory
- Parameters:
level
- BDD level- Returns:
- BDD variable
-
var2Level
public int var2Level(int var)
Description copied from class:BDDFactory
Convert from a BDD variable to a BDD level.Compare to bdd_var2level.
- Specified by:
var2Level
in classBDDFactory
- Parameters:
var
- BDD variable- Returns:
- BDD level
-
getReorderTimes
public int getReorderTimes()
Description copied from class:BDDFactory
Returns the number of allowed reorderings left. This value can be defined by autoReorder.Compare to bdd_getreorder_times.
- Specified by:
getReorderTimes
in classBDDFactory
- Returns:
- number of allowed reorderings left
-
disableReorder
public void disableReorder()
Description copied from class:BDDFactory
Disable automatic reordering until enableReorder is called. Reordering is enabled by default as soon as any variable blocks have been defined.Compare to bdd_disable_reorder.
- Specified by:
disableReorder
in classBDDFactory
-
enableReorder
public void enableReorder()
Description copied from class:BDDFactory
Enable automatic reordering after a call to disableReorder.Compare to bdd_enable_reorder.
- Specified by:
enableReorder
in classBDDFactory
-
reorderVerbose
public int reorderVerbose(int v)
Description copied from class:BDDFactory
Enables verbose information about reordering. A value of zero means no information, one means some information and greater than one means lots of information.- Specified by:
reorderVerbose
in classBDDFactory
- Parameters:
v
- the new verbose level- Returns:
- the old verbose level
-
reorder
public void reorder(BDDFactory.ReorderMethod m)
Description copied from class:BDDFactory
Reorder the BDD with the given method.Compare to bdd_reorder.
- Specified by:
reorder
in classBDDFactory
- Parameters:
m
- reorder method
-
autoReorder
public void autoReorder(BDDFactory.ReorderMethod method)
Description copied from class:BDDFactory
Enables automatic reordering. If method is REORDER_NONE then automatic reordering is disabled.Compare to bdd_autoreorder.
- Specified by:
autoReorder
in classBDDFactory
- Parameters:
method
- reorder method
-
autoReorder
public void autoReorder(BDDFactory.ReorderMethod method, int max)
Description copied from class:BDDFactory
Enables automatic reordering with the given (maximum) number of reorderings. If method is REORDER_NONE then automatic reordering is disabled.Compare to bdd_autoreorder_times.
- Specified by:
autoReorder
in classBDDFactory
- Parameters:
method
- reorder methodmax
- maximum number of reorderings
-
swapVar
public void swapVar(int v1, int v2)
Description copied from class:BDDFactory
Swap two variables.Compare to bdd_swapvar.
- Specified by:
swapVar
in classBDDFactory
- Parameters:
v1
- first variablev2
- second variable
-
getReorderMethod
public BDDFactory.ReorderMethod getReorderMethod()
Description copied from class:BDDFactory
Returns the current reorder method as defined by autoReorder.Compare to bdd_getreorder_method.
- Specified by:
getReorderMethod
in classBDDFactory
- Returns:
- ReorderMethod
-
validateAll
public void validateAll()
-
validateBDD
public void validateBDD(BDD b)
-
cloneFactory
public JFactory cloneFactory()
-
copyNode
public BDD copyNode(BDD that)
Use this function to translate BDD's from a JavaFactory into its clone. This will only work immediately after cloneFactory() is called, and before any other BDD operations are performed.- Parameters:
that
- BDD in old factory- Returns:
- a BDD in the new factory
-
reverseAllDomains
public void reverseAllDomains()
-
reverseDomain
public void reverseDomain(BDDDomain d)
-
reverseDomain0
protected void reverseDomain0(BDDDomain d)
-
setVarOrder
public void setVarOrder(String ordering)
-
setVarOrder
public void setVarOrder(List<Object> domains)
Set the variable order to be the given list of domains.- Parameters:
domains
- domain order
-
getParent
protected com.github.javabdd.JFactory.BddTree getParent(com.github.javabdd.JFactory.BddTree child)
-
getParent
protected com.github.javabdd.JFactory.BddTree getParent(com.github.javabdd.JFactory.BddTree parent, com.github.javabdd.JFactory.BddTree child)
-
getBlock
protected com.github.javabdd.JFactory.BddTree getBlock(com.github.javabdd.JFactory.BddTree t, int low, int high)
-
done
public void done()
Description copied from class:BDDFactory
This function frees all memory used by the BDD package and resets the package to its uninitialized state. The BDD package is no longer usable after this call.Compare to bdd_done.
- Overrides:
done
in classBDDFactoryIntImpl
-
-