edu.toronto.cs.mdd
Class MDDManager

java.lang.Object
  extended by edu.toronto.cs.mdd.MDDManager

public class MDDManager
extends java.lang.Object

Multi-Valued Decision Diagram package add reference to authors and publications!

Version:
1.1
Author:
B. Devereux, A. Gurfinkel

Nested Class Summary
 class MDDManager.MDDCubeIterator
           
 class MDDManager.MDDMintermIterator
          Iterates over minterms of a given value vars parameter is used to fill-in don't care variables
 
Field Summary
static int NO_VALUE
           
 
Constructor Summary
MDDManager(int nvars, int _arity)
          Constructor
 
Method Summary
 MDDNode apply(ApplyFunctions.BinApplyFunction function, MDDNode m1, MDDNode m2)
           
 MDDNode apply(ApplyFunctions.UnaryApplyFunction function, MDDNode m1)
          Apply a unary operation to MDDs.
 MDDNode buildCube(int[] vars, int arity, MDDNode top, MDDNode bot)
           
 MDDNode buildCube(int[] vars, MDDNode top, MDDNode bot)
           
 MDDNode buildPoint(int[] values, int arity, MDDNode terminal, MDDNode bot)
           
 MDDNode buildPoint(int[] values, MDDNode terminal, MDDNode bot)
           
 MDDNode buildVar(int var, int arity, int branch, MDDNode value, MDDNode bot)
           
 MDDNode buildVar(int var, int branch, MDDNode value, MDDNode bot)
           
 MDDNode cofactor(MDDNode m, int var, int branch)
          Restrict a specified variable to a certain value.
 MDDNode cofactor(MDDNode m, MDDNode cube, MDDNode background)
           
 int[][] collectValues(MDDNode node)
           
 java.util.Iterator cubeIterator(MDDNode node, MDDNode background)
          cubeIterator.
 int dagSize(MDDNode mddNode)
           
 MDDLeafNode getLeafNode(int val)
          Return one of the constant nodes.
 int getNvars()
          Benet added
 MDDNode kase(int var, MDDNode[] children)
           
 MDDNode makeUnique(int level, MDDNode[] children)
          If the described MDDNode is already in the manager, return it.
 java.util.Iterator mintermIterator(MDDNode node, MDDNode background, MDDNode vars, int termVal)
           
 MDDNode quantify(ApplyFunctions.QuantifyFunction function, MDDNode node, MDDNode cube)
          performs universal/existentia/other quantification
 MDDNode renameVars(MDDNode mdd, int[] newVars)
           
 void renew()
           
 void setCaching(boolean v)
           
 int sharedSize(MDDNode[] mddNodes)
           
 DaVinciGraph toDaVinci(MDDNode node)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NO_VALUE

public static final int NO_VALUE
See Also:
Constant Field Values
Constructor Detail

MDDManager

public MDDManager(int nvars,
                  int _arity)
Constructor

Parameters:
nvars - initial number of variables
arity - breadth factor of each DD node
Method Detail

renew

public void renew()

getNvars

public int getNvars()
Benet added


setCaching

public void setCaching(boolean v)

getLeafNode

public MDDLeafNode getLeafNode(int val)
Return one of the constant nodes.

Parameters:
val - index of constant

kase

public MDDNode kase(int var,
                    MDDNode[] children)

makeUnique

public MDDNode makeUnique(int level,
                          MDDNode[] children)
If the described MDDNode is already in the manager, return it. Otherwise create it, and then return it.

Parameters:
level - variable at node
children - array of children

apply

public MDDNode apply(ApplyFunctions.BinApplyFunction function,
                     MDDNode m1,
                     MDDNode m2)

apply

public MDDNode apply(ApplyFunctions.UnaryApplyFunction function,
                     MDDNode m1)
Apply a unary operation to MDDs.


cofactor

public MDDNode cofactor(MDDNode m,
                        MDDNode cube,
                        MDDNode background)

cofactor

public MDDNode cofactor(MDDNode m,
                        int var,
                        int branch)
Restrict a specified variable to a certain value.


quantify

public MDDNode quantify(ApplyFunctions.QuantifyFunction function,
                        MDDNode node,
                        MDDNode cube)
performs universal/existentia/other quantification


renameVars

public MDDNode renameVars(MDDNode mdd,
                          int[] newVars)

buildVar

public MDDNode buildVar(int var,
                        int branch,
                        MDDNode value,
                        MDDNode bot)

buildVar

public MDDNode buildVar(int var,
                        int arity,
                        int branch,
                        MDDNode value,
                        MDDNode bot)

buildCube

public MDDNode buildCube(int[] vars,
                         MDDNode top,
                         MDDNode bot)

buildCube

public MDDNode buildCube(int[] vars,
                         int arity,
                         MDDNode top,
                         MDDNode bot)

buildPoint

public MDDNode buildPoint(int[] values,
                          MDDNode terminal,
                          MDDNode bot)

buildPoint

public MDDNode buildPoint(int[] values,
                          int arity,
                          MDDNode terminal,
                          MDDNode bot)

dagSize

public int dagSize(MDDNode mddNode)

sharedSize

public int sharedSize(MDDNode[] mddNodes)

collectValues

public int[][] collectValues(MDDNode node)

cubeIterator

public java.util.Iterator cubeIterator(MDDNode node,
                                       MDDNode background)
cubeIterator.

Returns:
an Iterator over the cubes of node

mintermIterator

public java.util.Iterator mintermIterator(MDDNode node,
                                          MDDNode background,
                                          MDDNode vars,
                                          int termVal)

toDaVinci

public DaVinciGraph toDaVinci(MDDNode node)