edu.toronto.cs.mvset
Class CUADDMvSetFactory

java.lang.Object
  extended by edu.toronto.cs.mvset.AbstractMvSetFactory
      extended by edu.toronto.cs.mvset.CUADDMvSetFactory
All Implemented Interfaces:
MvSetFactory

public class CUADDMvSetFactory
extends AbstractMvSetFactory

Implementation of an MvSet based on the CUADD library


Nested Class Summary
 class CUADDMvSetFactory.CUADDMvSet
           
 
Field Summary
 
Fields inherited from interface edu.toronto.cs.mvset.MvSetFactory
DONT_CARE
 
Constructor Summary
CUADDMvSetFactory(IAlgebra _algebra, int nvars)
           
 
Method Summary
 MvSet bot()
           
 MvSet buildCube(int[] varIndex)
          builds a cube out of variables
 MvSet createCase(int argIdx, MvSet[] children)
          createCase creates a case relative to argIdx this is somewhat simillar to Ite (if-then-else) in CUDD but extended to more than two children.
 MvSet createConstant(AlgebraValue v)
          Given a value in L creates a function f(x_0, x_1, ...) = value
 MvSet createIte(int argIdx, MvSet child0, MvSet child1)
           
 MvSet createMvSet(CuddAdd.ADD addNode)
           
 MvSet createPoint(AlgebraValue[] args, AlgebraValue value)
          Creates a point function f (args) = value = 0 otherwise
 MvSet createProjection(int argIdx)
          Given an argument index (0 <= argIdx < n) constructs a projection function f(x_0, x_1, ...) = x_argIdx
 CuddAdd getCudd()
           
static MvSetFactory newMvSetFactory(IAlgebra algebra, int nvars)
           
 void renew()
           
 MvSet top()
           
 MvSet var(int argIdx, AlgebraValue argVal, AlgebraValue value)
          Builds an mvset corresponding to (arg = argVal) /\ value
 
Methods inherited from class edu.toronto.cs.mvset.AbstractMvSetFactory
getAlgebra, infoBot, infoTop
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CUADDMvSetFactory

public CUADDMvSetFactory(IAlgebra _algebra,
                         int nvars)
Method Detail

newMvSetFactory

public static MvSetFactory newMvSetFactory(IAlgebra algebra,
                                           int nvars)

renew

public void renew()
Specified by:
renew in interface MvSetFactory
Overrides:
renew in class AbstractMvSetFactory

createConstant

public MvSet createConstant(AlgebraValue v)
Given a value in L creates a function f(x_0, x_1, ...) = value


buildCube

public MvSet buildCube(int[] varIndex)
Description copied from interface: MvSetFactory
builds a cube out of variables


top

public MvSet top()

bot

public MvSet bot()

createProjection

public MvSet createProjection(int argIdx)
Given an argument index (0 <= argIdx < n) constructs a projection function f(x_0, x_1, ...) = x_argIdx


createPoint

public MvSet createPoint(AlgebraValue[] args,
                         AlgebraValue value)
Creates a point function f (args) = value = 0 otherwise


var

public MvSet var(int argIdx,
                 AlgebraValue argVal,
                 AlgebraValue value)
Description copied from interface: MvSetFactory
Builds an mvset corresponding to (arg = argVal) /\ value


createCase

public MvSet createCase(int argIdx,
                        MvSet[] children)
Description copied from interface: MvSetFactory
createCase creates a case relative to argIdx this is somewhat simillar to Ite (if-then-else) in CUDD but extended to more than two children.

Parameters:
argIdx - an int value
children - an array of MvSet[] whose size must be equal the size of the logic such that children [i] corresponds to the i^th child of an mv-set we are creating Note that argIdx must be smaller than any variable in children to preserve ordering.
Returns:
a MvSet value

createIte

public MvSet createIte(int argIdx,
                       MvSet child0,
                       MvSet child1)

createMvSet

public MvSet createMvSet(CuddAdd.ADD addNode)

getCudd

public CuddAdd getCudd()