Skip to content

Commit

Permalink
Explain how to find VC/invariant indices
Browse files Browse the repository at this point in the history
  • Loading branch information
thpani committed Aug 5, 2022
1 parent a517df1 commit 7cd6a21
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion docs/src/apalache/tuning.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ Note that there is no direct correspondence between the transition numbers and
the actions in the TLA+ spec. To find the numbers, run Apalache with
`--write-intermediate=true` and check the transition numbers in
`_apalache-out/<MySpec>.tla/*/intermediate/XX_OutTransitionFinderPass.tla`: the
0th transition is called `Next_si_0000`, 1st transition is called
0th transition is called `Next_si_0000`, the 1st transition is called
`Next_si_0001`, etc.

### Invariant filter
Expand All @@ -83,6 +83,14 @@ model checker to check

[Trace invariants][] are checked regardless of this filter.

Note that there is no direct correspondence between invariant numbers and the
operators in a TLA+ spec. To find the numbers, run Apalache with
`--write-intermediate=true` and check the invariant numbers in
`_apalache-out/<MySpec>.tla/*/intermediate/XX_OutVCGen.tla`. The 0th state
invariant is called `VCInv_si_0`, the 1st state invariant is called
`VCInv_si_1`, and so on. For action invariants, the declarations are named
`VCActionInv_si_0`, `VCActionInv_si_1` etc.

This option is useful, e.g., for checking consensus algorithms,
where the decision cannot be revoked. So instead of checking the invariant
after each step, we can do that after the algorithm has made a good number of
Expand Down

0 comments on commit 7cd6a21

Please sign in to comment.