SableJBDD.bdd
Class JBddManager

java.lang.Object
  extended bySableJBDD.bdd.JBddManager
All Implemented Interfaces:
JBddConstants

public class JBddManager
extends java.lang.Object
implements JBddConstants

A BDD manager manages system resources such as unique table and caches.


Field Summary
 
Fields inherited from interface SableJBDD.bdd.JBddConstants
BDDOP_INVALID, DEFAULT_DYNA_POOL_SIZE, DEFAULT_EXPANDIBLE_SIZE, DEFAULT_FIXED_POOL_SIZE, DEFAULT_PHANTOM_POOL_SIZE, DEFAULT_PRE_ALLOC_SIZE, DYNAMIC, EXPANDIBLE, FIXED_SIZE, FOURWAY, IDEAL, MAX_LEVEL, NO_CACHE, NO_POOLING, ONEWAY, PHANTOM_REF, PRE_ALLOCATION, REGULAR_REF, SOFT_REF, TWOWAY, WEAK_REF
 
Constructor Summary
JBddManager()
          Defines a JBDD manager without variables.
JBddManager(int initNumberOfVariables)
          Defines a JBDD manager with a specified number of variables.
JBddManager(int[] initVariableOrdering)
          Defines a JBDD manager with a specific variable ordering.
 
Method Summary
 JBddVariable getIthVariable(int i)
           
 int getNumberOfVariables()
           
 JBddVariable getVariableAtLevel(int l)
           
 int getVariableIndexAtLevel(int l)
           
 JBDD negBddOf(JBddVariable var)
          Gets a BDD function representing the negative form of a variable
 JBddVariable newVariable(java.lang.String name)
          Creates a new bdd variable with a name, it is automatically allocated at the top level.
 JBddVariable newVariableAtLevel(int level)
          Gets or creates a new bdd variable at a specific order (level).
 JBDD ONE()
           
 JBDD posBddOf(JBddVariable var)
          Gets a BDD function representing the positive form of a variable.
 void printConfigurations(java.io.PrintStream out)
          Prints out configurations of unique table, and caches.
 void reportCacheStatistics(java.io.PrintStream out)
          Reports the unique table and cache statistics.
 JBDD ZERO()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JBddManager

public JBddManager()
Defines a JBDD manager without variables. Variables will be created later when necessary.


JBddManager

public JBddManager(int initNumberOfVariables)
Defines a JBDD manager with a specified number of variables.

Parameters:
initNumberOfVariables -

JBddManager

public JBddManager(int[] initVariableOrdering)
Defines a JBDD manager with a specific variable ordering.

Parameters:
initVariableOrdering - the number of variables and the order of each variable. The value at index i is the ith variable's order.
Method Detail

getNumberOfVariables

public int getNumberOfVariables()
Returns:
the number of variables.

getIthVariable

public JBddVariable getIthVariable(int i)
Returns:
ith variable.

getVariableIndexAtLevel

public int getVariableIndexAtLevel(int l)
Returns:
the index of variable at a specific order.

getVariableAtLevel

public JBddVariable getVariableAtLevel(int l)
Returns:
a variable at a specific order.

newVariable

public JBddVariable newVariable(java.lang.String name)
Creates a new bdd variable with a name, it is automatically allocated at the top level.

Parameters:
name - the variable name
Returns:
the newly created bdd variable

newVariableAtLevel

public JBddVariable newVariableAtLevel(int level)
Gets or creates a new bdd variable at a specific order (level). If the level is above the top level of current bdd varaibles, all variables under the specific level will be created.

Parameters:
level - the level at which a new bdd variable is created
Returns:
the newly created variable

ONE

public JBDD ONE()
Returns:
the constant ONE function

ZERO

public JBDD ZERO()
Returns:
the constant ZERO function

posBddOf

public JBDD posBddOf(JBddVariable var)
Gets a BDD function representing the positive form of a variable. posBddOf and negBddOf are called very frequently, they donot require synchronized since if two threads writes to the same cache, two cached variables are both valid.

Parameters:
var - the bdd variable
Returns:
the BDD function

negBddOf

public JBDD negBddOf(JBddVariable var)
Gets a BDD function representing the negative form of a variable

Parameters:
var - the bdd variable
Returns:
the BDD function

reportCacheStatistics

public void reportCacheStatistics(java.io.PrintStream out)
Reports the unique table and cache statistics.

Parameters:
out - the print stream to print out statistics.

printConfigurations

public void printConfigurations(java.io.PrintStream out)
Prints out configurations of unique table, and caches.