Skip to content

Commit

Permalink
removing StartTerm
Browse files Browse the repository at this point in the history
  • Loading branch information
heidihoward committed Sep 2, 2024
1 parent 4f7f5a9 commit 6af5820
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 6 deletions.
1 change: 0 additions & 1 deletion tla/consensus/MCabs.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ CONSTANTS
Servers <- MCServers
Terms <- MCTerms
MaxLogLength <- MCMaxLogLength
StartTerm <- MCStartTerm

INVARIANTS
NoConflicts
Expand Down
1 change: 0 additions & 1 deletion tla/consensus/MCabs.tla
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,5 @@ CONSTANTS NodeOne, NodeTwo, NodeThree
MCServers == {NodeOne, NodeTwo, NodeThree}
MCTerms == 2..4
MCMaxLogLength == 7
MCStartTerm == 2

====
3 changes: 1 addition & 2 deletions tla/consensus/MCccfraft.tla
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,8 @@ MaxLogLength ==
MappingToAbs ==
INSTANCE abs WITH
Servers <- Servers,
Terms <- 1..MaxTermLimit,
Terms <- StartTerm..MaxTermLimit,
MaxLogLength <- MaxLogLength,
StartTerm <- StartTerm,
CLogs <- [i \in Servers |-> [j \in 1..commitIndex[i] |-> log[i][j].term]]

RefinementToAbsProp == MappingToAbs!AbsSpec
Expand Down
6 changes: 4 additions & 2 deletions tla/consensus/abs.tla
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
\* Abstract specification for a distributed consensus algorithm.
\* Assumes that any node can atomically inspect the state of all other nodes.

EXTENDS Sequences, SequencesExt, Naturals, FiniteSets
EXTENDS Sequences, SequencesExt, Naturals, FiniteSets, FiniteSetsExt

CONSTANT Servers, Terms, MaxLogLength, StartTerm
CONSTANT Servers, Terms, MaxLogLength

\* Commit logs from each node
\* Each log is append-only and the logs will never diverge.
Expand All @@ -14,6 +14,8 @@ TypeOK ==
/\ CLogs \in [Servers ->
UNION {[1..l -> Terms] : l \in 0..MaxLogLength}]

StartTerm == Min(Terms)

InitialLogs == {
<<>>,
<<StartTerm, StartTerm>>,
Expand Down

0 comments on commit 6af5820

Please sign in to comment.