edu.toronto.cs.yasm.pprogram
Class PredicateTable

java.lang.Object
  extended by edu.toronto.cs.yasm.pprogram.PredicateTable

public class PredicateTable
extends java.lang.Object

Describe class VariableTable here. Symbol table that keeps track of variables. Since we often need several copies of the same variable, for example, current and next state, or even next next state, we support arbitrary number of shadow variables.

Version:
1.0
Author:
Arie Gurfinkel

Nested Class Summary
 class PredicateTable.AddPredicate
           
 class PredicateTable.IntVariable
           
 class PredicateTable.Predicate
           
 
Constructor Summary
PredicateTable()
           
 
Method Summary
 PredicateTable.Predicate __newPredicate(Expr name)
          Adds a new predicate with a name 'name'.
 void dump()
           
 PredicateTable.Predicate getByCtlName(java.lang.String name)
           
 PredicateTable.Predicate getByName(Expr name)
           
 MvSetFactory getMvSetFactory()
           
 int getNumVars()
           
 int[] getVariableIds(int set)
          Describe getVariableIds method here.
 java.util.Collection getVariables()
           
static void main(java.lang.String[] args)
           
 PredicateTable.IntVariable newIntVar(Expr name, int range)
           
 PredicateTable.Predicate newPredicate(Expr name)
          newPredicate creates a new predicate corresponding to name.
 int primaryBitSize()
           
 void setMvSetFactory(MvSetFactory _factory)
           
 java.lang.String toString()
           
 int[] variableMap(int fromSet, int toSet)
          Describe variableMap method here.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PredicateTable

public PredicateTable()
Method Detail

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

setMvSetFactory

public void setMvSetFactory(MvSetFactory _factory)

getMvSetFactory

public MvSetFactory getMvSetFactory()

__newPredicate

public PredicateTable.Predicate __newPredicate(Expr name)
Adds a new predicate with a name 'name'. Use this with MDDs such as MDDMvSetFactory

Parameters:
name - an Expr value
Returns:
a Predicate value

newPredicate

public PredicateTable.Predicate newPredicate(Expr name)
newPredicate creates a new predicate corresponding to name. Use this with ADD based MvSets such as JCUDDBelnapMvSet and JCUDDMvSet

Parameters:
name - an Expr value
Returns:
a Predicate value

newIntVar

public PredicateTable.IntVariable newIntVar(Expr name,
                                            int range)

getNumVars

public int getNumVars()

getByName

public PredicateTable.Predicate getByName(Expr name)

getByCtlName

public PredicateTable.Predicate getByCtlName(java.lang.String name)

getVariables

public java.util.Collection getVariables()

dump

public void dump()

variableMap

public int[] variableMap(int fromSet,
                         int toSet)
Describe variableMap method here. returns an integer array that maps variables in the 'fromSet' to variables in the 'toSet'. For example, variableMap (0, 1) returns a map that maps 0 variables to 1 variables. The intention is that 0 variables are current variables, and 1 variables are next state variables, in which case we get a map from current to next state

Parameters:
fromSet - an int value
toSet - an int value
Returns:
an int[] value

primaryBitSize

public int primaryBitSize()

getVariableIds

public int[] getVariableIds(int set)
Describe getVariableIds method here. returns ids of all of the variables in set set

Parameters:
set - an int value
Returns:
an int[] value

main

public static void main(java.lang.String[] args)