Skip to content

Commit

Permalink
Add DebugInvUpToDepth invariant to SIMccfraft to quickly generate a t…
Browse files Browse the repository at this point in the history
…race of length N by passing N to TLC's `-depth` cli.
  • Loading branch information
lemmy committed Dec 22, 2023
1 parent a850a08 commit 580e865
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions tla/consensus/SIMccfraft.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -90,3 +90,4 @@ INVARIANTS
\* DebugInvSuccessfulCommitAfterReconfig
\* DebugInvAllMessagesProcessable
\* DebugInvRetirementReachable
\* DebugInvUpToDepth
4 changes: 4 additions & 0 deletions tla/consensus/SIMccfraft.tla
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ StopAfter ==
(* The smoke test has a time budget of 20 minutes. *)
IN TLCSet("exit", TLCGet("duration") > timeout)

DebugInvUpToDepth ==
\* The following invariant causes TLC to terminate with a counterexample of length
\* -depth after generating the first trace.
TLCGet("level") < TLCGet("config").depth
=============================================================================

------------------------------- MODULE SIMPostCondition -------------------------------
Expand Down

0 comments on commit 580e865

Please sign in to comment.