github.com/vipernet-xyz/tm@v0.34.24/spec/light-client/accountability/TendermintAccTrace_004_draft.tla (about)

     1  ------------------ MODULE TendermintAccTrace_004_draft -------------------------
     2  (*
     3    When Apalache is running too slow and we have an idea of a counterexample,
     4    we use this module to restrict the behaviors only to certain actions.
     5    Once the whole trace is replayed, the system deadlocks.
     6   
     7    Version 1.
     8  
     9    Igor Konnov, 2020.
    10   *)
    11  
    12  EXTENDS Sequences, Apalache, TendermintAcc_004_draft
    13  
    14  \* a sequence of action names that should appear in the given order,
    15  \* excluding "Init"
    16  CONSTANT Trace
    17  
    18  VARIABLE toReplay
    19  
    20  TraceInit ==
    21      /\ toReplay = Trace
    22      /\ action' := "Init"
    23      /\ Init
    24  
    25  TraceNext ==
    26      /\ Len(toReplay) > 0
    27      /\ toReplay' = Tail(toReplay)
    28      \* Here is the trick. We restrict the action to the expected one,
    29      \* so the other actions will be pruned
    30      /\ action' := Head(toReplay)
    31      /\ Next
    32  
    33  ================================================================================