In the TLA+ specification, we use InitAction and SetAction to specify the action of I/O automata and output the state to sqlite database.
-
Filling Model checker setting:
Specify constant value and Temporal formula
-
In
Model
->TLC Options
Page ->Parameters
->JVM arguments:
box:Specify Java property parameter "tlc2.overrides.TLCOverrides" by filling the text,
-Dtlc2.overrides.TLCOverrides=tlc2.overrides.TLCOverrides:tlc2.overrides.SedeveTLCOverrides
The "tlc2.overrides.TLCOverrides" is used by thethe ComunityModeules; and "the tlc2.overrides.SedeveTLCOverrides" is used by SedeveModules.
More about overrides, see SpecProcessor.java, TLCOverrides.java
- Click then
Runs TLC on the model
Button
A trace is a finite sequence of actions. An action is a step of state transition. We define several action types based on their functionalities. The action types include:
Action Type | Description of Action Type |
---|---|
Input | Represent a node receiving an input message, from a network endpoint or a terminal, for example |
Output | Represent a node sending an output message, to a network endpoint or a terminal, for example |
Internal | Represent an internal event in a node |
Use the trace-gen to traversal state space and dump all trace into a database(e.g., sqlite DB file) The trace format is represented in JSON, similar to this JSON file The action incoming interface can be used to read traces.
We define certain anchor actions that allow us to send a message to the deterministic player for reordering the actions.
The figure below illustrates how the deterministic player reorders the actions based on predefined orders.
The physical system will align with the logical model, ensuring consistency. Our framework incorporates various macros to facilitate the implementation of anchor actions that verify the coherence between our source-level implementation and abstract-level design.
During testing, we add invariants to assert the correctness of our assumptions.
When running deterministic testing, the message channel would be taken over by the deterministic player.
Two-Phase Commit Protocol(2PC) is a atomic commit protocol. The example of using this kit to develop 2PC could be found at this repo.