Figure 2.31. Concrete Syntax for Actions
|
Figure 2.31, “Concrete Syntax for Actions” presents the concrete syntax for BIR actions declarations. Non-atomic high-level actions are translated to their 3-address code low-level equivalent.
Abstract Syntax Tree.
The top level Java AST class for BIR actions is the Action class.
Assign action is used to update the value of a variable, a record/array field, or an array element.
Examples.
Abstract Syntax Tree. The Java AST class for assign action is the AssignAction class.
Assert action is used to check whether the assert's condition (of type boolean) holds. If the condition does not hold, then it is considered as an error in the model.
Examples.
Abstract Syntax Tree. The Java AST class for assert action is the AssertAction class.
Assume action is used to filter paths. If the assume's condition is false, then Bogor will backtrack from exploring the current path.
Examples.
Abstract Syntax Tree. The Java AST class for assume action is the AssumeAction class.
Lock operation action is used to change the state of a lock value:
Examples.
Abstract Syntax Tree. The Java AST class for lock operation actions is the LockAction class. The lock operators are defined in the LockOp class.
Throw exception action is used to raise a throwable record value.
Examples.
Abstract Syntax Tree. The Java AST class for throw exception action is the ThrowAction class.
Start thread action is used to create an instance of a thread, and returns the newly created thread descriptor value (of type tid).
Examples.
Abstract Syntax Tree. The Java AST class for start thread action is the ExpAction class with the StartThreadExp class.
Exit thread action is used to terminate the current executing thread.
Example.
Abstract Syntax Tree. The Java AST class for exit thread action is the ExitThreadAction class.
Extension call action is used to call an action extension. For a parametric action extension, Bogor tries to infer the arguments to the declared parametric type variables.
Examples.
Abstract Syntax Tree. The Java AST class for extension call action is the ExpAction class with the ExtExp class.