Public Methods | |
void | applyAction (Action action, int choice) |
void | caseAddExpr (AddExpr expr) |
void | caseAndExpr (AndExpr expr) |
void | caseArrayExpr (ArrayExpr expr) |
void | caseAssertAction (AssertAction assertAction) |
void | caseAssignAction (AssignAction assign) |
void | caseBoolLit (BoolLit expr) |
void | caseChooseExpr (ChooseExpr expr) |
void | caseConstant (Constant expr) |
void | caseDerefExpr (DerefExpr expr) |
void | caseDivExpr (DivExpr expr) |
void | caseEqExpr (EqExpr expr) |
void | caseInstanceOfExpr (InstanceOfExpr expr) |
void | caseIntLit (IntLit expr) |
void | caseLeExpr (LeExpr expr) |
void | caseLengthExpr (LengthExpr expr) |
void | caseLockAction (LockAction lockAction) |
void | caseLockTest (LockTest lockTest) |
void | caseLtExpr (LtExpr expr) |
void | caseMulExpr (MulExpr expr) |
void | caseNeExpr (NeExpr expr) |
void | caseNewArrayExpr (NewArrayExpr expr) |
void | caseNewExpr (NewExpr expr) |
void | caseNotExpr (NotExpr expr) |
void | caseNullExpr (NullExpr expr) |
void | caseOrExpr (OrExpr expr) |
void | casePrintAction (PrintAction printAction) |
void | caseRecordExpr (RecordExpr expr) |
void | caseRefExpr (RefExpr expr) |
void | caseRemExpr (RemExpr expr) |
void | caseStateVar (StateVar expr) |
void | caseSubExpr (SubExpr expr) |
void | caseThreadAction (ThreadAction threadAction) |
void | caseThreadLocTest (ThreadLocTest threadLocTest) |
void | caseThreadTest (ThreadTest threadTest) |
void | completeTrans (Transformation trans) |
BirState | copy () |
void | defaultCase (Object obj) |
String | exprValue (Expr expr) |
String | getOutput () |
Literal[] | getStore () |
TransSystem | getSystem () |
boolean | isActive (BirThread thread) |
void | print () |
Static Public Methods | |
BirState | initialState (TransSystem system, TransVector transVector, Vector choiceVector) |
int | setActualSizesFromTrace (TransSystem system, TransVector transVector, Vector choiceVector) |
Private Methods | |
BirState (TransSystem system) | |
Private Attributes | |
TransSystem | system |
Literal[] | store |
Location[] | location |
boolean[] | threadActive |
boolean | lhs = false |
int | choice |
String | output = "" |
The main parts of the state are:
This class is a BIR expression switch---it translates a BIR expression into either a Literal value (the r-value of the expression in this state) or an Integer (the address in the state vector of the l-value of the expression in this state). The rules are:
Definition at line 72 of file BirState.java.
|
Execute assignment. Reimplemented from ExprSwitch. Definition at line 132 of file BirState.java. |
|
Update thread location once all transformation actions have completed. Definition at line 374 of file BirState.java. Referenced by BirTrace::done().
|
|
Make a copy of this state Definition at line 382 of file BirState.java. Referenced by BirTrace::done().
|
|
Build the initial state of a BIR transition system. Definition at line 408 of file BirState.java. |
|
Given the trace, compute the size of the state vector (which holds the values of all state variables). This used to be done statically given the collection bounds in the BIR, but with dynamic verifiers like dSPIN (which ignore these bounds), we don't know how many collection elements are allocated until we see the trace. We also set the choice for each Allocator action to indicate the index into the collection of the instance that was allocated (this is just a count of the number allocated so far). Note that for NewArrayExpr, the choice that comes in is the actual length---we reset it to the instance index (the max length for the collection is computed and stored in the collection). Definition at line 477 of file BirState.java. |