Skip to content

Commit

Permalink
tidying up
Browse files Browse the repository at this point in the history
  • Loading branch information
heidihoward authored Nov 1, 2023
1 parent 27e2fbf commit eef132e
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 9 deletions.
8 changes: 5 additions & 3 deletions tla/consensus/MCccfraft.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@ CONSTANTS

MaxTermLimit = 1
MaxCommitsNotified = 0
StatsFilename = "MCccfraft_stats.json"
RequestLimit = 3

StatsFilename = "MCccfraft_stats.json"

Timeout <- MCTimeout
Send <- MCSend
Expand Down Expand Up @@ -51,6 +52,9 @@ VIEW View
CHECK_DEADLOCK
FALSE

POSTCONDITION
WriteStatsFile

PROPERTIES
CommittedLogAppendOnlyProp
MonotonicTermProp
Expand Down Expand Up @@ -78,5 +82,3 @@ INVARIANTS
MatchIndexLowerBoundNextIndexInv
CommitCommittableIndices
CommittableIndicesAreKnownSignaturesInv

POSTCONDITION StatsFile
11 changes: 7 additions & 4 deletions tla/consensus/MCccfraft.tla
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,14 @@ ASSUME MaxTermLimit \in Nat
CONSTANT MaxCommitsNotified
ASSUME MaxCommitsNotified \in Nat

CONSTANT StatsFilename
ASSUME StatsFilename \in STRING

\* Limit on client requests
CONSTANT RequestLimit
ASSUME RequestLimit \in Nat

\* Filename to write TLC stats to
CONSTANT StatsFilename
ASSUME StatsFilename \in STRING


ToServers ==
UNION Range(Configurations)
Expand Down Expand Up @@ -141,7 +142,9 @@ AllReconfigurationsCommitted ==
DebugAllReconfigurationsReachableInv ==
~AllReconfigurationsCommitted

StatsFile ==
\* Writes TLC stats (such as number of states and duration) to StatsFilename in ndJson format
\* Specify WriteStatsFile as a postcondition to write the stats file at the end of model checking
WriteStatsFile ==
ndJsonSerialize(StatsFilename, <<TLCGet("stats")>>)

===================================
6 changes: 5 additions & 1 deletion tla/consensus/MCccfraftAtomicReconfig.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@ CONSTANTS

MaxTermLimit = 4
MaxCommitsNotified = 2
StatsFilename = "MCccfraftAtomicReconfig_stats.json"
RequestLimit = 3

StatsFilename = "MCccfraftAtomicReconfig_stats.json"

Timeout <- MCTimeout
Send <- MCSend
Expand Down Expand Up @@ -51,6 +52,9 @@ VIEW View
CHECK_DEADLOCK
FALSE

POSTCONDITION
WriteStatsFile

PROPERTIES
CommittedLogAppendOnlyProp
MonotonicTermProp
Expand Down
6 changes: 5 additions & 1 deletion tla/consensus/MCccfraftWithReconfig.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@ CONSTANTS

MaxTermLimit = 3
MaxCommitsNotified = 2
StatsFilename = "MCccfraftWithReconfig_stats.json"
RequestLimit = 3

StatsFilename = "MCccfraftWithReconfig_stats.json"

Timeout <- MCTimeout
Send <- MCSend
Expand Down Expand Up @@ -51,6 +52,9 @@ VIEW View
CHECK_DEADLOCK
FALSE

POSTCONDITION
WriteStatsFile

PROPERTIES
CommittedLogAppendOnlyProp
MonotonicTermProp
Expand Down

0 comments on commit eef132e

Please sign in to comment.