|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.toronto.cs.boolpg.parser.VariableTable
public class VariableTable
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.
Nested Class Summary | |
---|---|
class |
VariableTable.ProcessCounter
|
class |
VariableTable.StateVariable
|
class |
VariableTable.Variable
|
Constructor Summary | |
---|---|
VariableTable()
|
|
VariableTable(int _shadows)
Creates a new VariableTable instance. |
Method Summary | |
---|---|
VariableTable.StateVariable |
declarePropositional(java.lang.String name)
Describe declarePropositional method here. |
void |
dump()
|
VariableTable.Variable |
getByName(java.lang.String name)
|
MvSetFactory |
getMvSetFactory()
|
int |
getNumVars()
|
int[] |
getVariableIds(int set)
Describe getVariableIds method here. |
java.util.Collection |
getVariables()
|
java.lang.String[] |
getVarNames()
Describe getVarNames method here. |
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 |
---|
public VariableTable(int _shadows)
VariableTable
instance.
_shadows
- an int
number of shadow variablespublic VariableTable()
Method Detail |
---|
public java.lang.String toString()
toString
in class java.lang.Object
public void setMvSetFactory(MvSetFactory _factory)
public MvSetFactory getMvSetFactory()
public VariableTable.StateVariable declarePropositional(java.lang.String name)
declarePropositional
method here.
name
- a String
value
StateVariable
valuepublic int getNumVars()
public VariableTable.Variable getByName(java.lang.String name)
public java.util.Collection getVariables()
public java.lang.String[] getVarNames()
getVarNames
method here.
currently called to construct a KripkeStructure but not used there.
String[]
valuepublic void dump()
public int[] variableMap(int fromSet, int toSet)
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
fromSet
- an int
valuetoSet
- an int
value
int[]
valuepublic int[] getVariableIds(int set)
getVariableIds
method here.
returns ids of all of the variables in set set
set
- an int
value
int[]
value
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |