|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.toronto.cs.gclang.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.DefineVariable
|
class |
VariableTable.EnumeratedVariable
|
class |
VariableTable.StateVariable
|
class |
VariableTable.Variable
|
Constructor Summary | |
---|---|
VariableTable()
|
|
VariableTable(int _shadows)
Creates a new VariableTable instance. |
Method Summary | |
---|---|
VariableTable.DefineVariable |
declareDefine(java.lang.String name,
MvSet value)
Describe declareDefine method here. |
VariableTable.EnumeratedVariable |
declareEnumerated(java.lang.String name,
java.util.Collection values)
declareEnumerated declares a variable of enumerated type |
VariableTable.EnumeratedVariable |
declareEnumerated(java.lang.String name,
java.lang.String[] values)
declareEnumerated declares a variable of enumerated type |
VariableTable.StateVariable |
declarePropositional(java.lang.String name)
Describe declarePropositional method here. |
void |
dump()
|
VariableTable.Variable |
getByName(java.lang.String name)
|
CTLReWriter |
getCtlReWriter()
|
MvSetFactory |
getMvSetFactory()
|
int |
getNumVars()
|
StatePresenter |
getStatePresenter()
|
int[] |
getVariableIds(int set)
Describe getVariableIds method here. |
java.util.Collection |
getVariables()
|
java.lang.String[] |
getVarNames()
Describe getVarNames method here. |
CTLNode |
handleUnknownVariable(java.lang.String name)
|
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.DefineVariable declareDefine(java.lang.String name, MvSet value)
declareDefine
method here.
name
- a String
valuevalue
- a MvSet
value
DefineVariable
valuepublic VariableTable.EnumeratedVariable declareEnumerated(java.lang.String name, java.util.Collection values)
declareEnumerated
declares a variable of enumerated type
name
- a String
valuevalues
- a Collection
values for the enumeration
EnumeratedVariable
valuepublic VariableTable.EnumeratedVariable declareEnumerated(java.lang.String name, java.lang.String[] values)
declareEnumerated
declares a variable of enumerated type
name
- a String
valuevalues
- a String[]
values for the enumeration
EnumeratedVariable
valuepublic 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 CTLNode handleUnknownVariable(java.lang.String name)
public CTLReWriter getCtlReWriter()
public StatePresenter getStatePresenter()
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 |