зеркало из https://github.com/microsoft/CCF.git
Spring cleaning TLA+ (#6027)
This commit is contained in:
Родитель
41c8cb9595
Коммит
9575d6d8cf
|
@ -5,7 +5,6 @@ CONSTANTS
|
||||||
Servers <- ToServers
|
Servers <- ToServers
|
||||||
|
|
||||||
MaxTermLimit = 2
|
MaxTermLimit = 2
|
||||||
MaxCommitsNotified = 0
|
|
||||||
RequestLimit = 3
|
RequestLimit = 3
|
||||||
|
|
||||||
StatsFilename = "MCccfraft_stats.json"
|
StatsFilename = "MCccfraft_stats.json"
|
||||||
|
|
|
@ -17,9 +17,6 @@ ASSUME Configurations \in Seq(SUBSET Servers)
|
||||||
CONSTANT MaxTermLimit
|
CONSTANT MaxTermLimit
|
||||||
ASSUME MaxTermLimit \in Nat
|
ASSUME MaxTermLimit \in Nat
|
||||||
|
|
||||||
CONSTANT MaxCommitsNotified
|
|
||||||
ASSUME MaxCommitsNotified \in Nat
|
|
||||||
|
|
||||||
\* Limit on client requests
|
\* Limit on client requests
|
||||||
CONSTANT RequestLimit
|
CONSTANT RequestLimit
|
||||||
ASSUME RequestLimit \in Nat
|
ASSUME RequestLimit \in Nat
|
||||||
|
@ -91,10 +88,6 @@ MCSend(msg) ==
|
||||||
/\ n.type = AppendEntriesResponse
|
/\ n.type = AppendEntriesResponse
|
||||||
/\ CCF!Send(msg)
|
/\ CCF!Send(msg)
|
||||||
|
|
||||||
\* Limit max number of simultaneous candidates
|
|
||||||
MCInMaxSimultaneousCandidates(i) ==
|
|
||||||
Cardinality({ s \in GetServerSetForIndex(i, commitIndex[i]) : leadershipState[s] = Candidate}) < 1
|
|
||||||
|
|
||||||
MCInit ==
|
MCInit ==
|
||||||
/\ InitMessagesVars
|
/\ InitMessagesVars
|
||||||
/\ InitCandidateVars
|
/\ InitCandidateVars
|
||||||
|
|
|
@ -5,7 +5,6 @@ CONSTANTS
|
||||||
Servers <- ToServers
|
Servers <- ToServers
|
||||||
|
|
||||||
MaxTermLimit = 5
|
MaxTermLimit = 5
|
||||||
MaxCommitsNotified = 2
|
|
||||||
RequestLimit = 3
|
RequestLimit = 3
|
||||||
|
|
||||||
StatsFilename = "MCccfraftAtomicReconfig_stats.json"
|
StatsFilename = "MCccfraftAtomicReconfig_stats.json"
|
||||||
|
|
|
@ -5,7 +5,6 @@ CONSTANTS
|
||||||
Servers <- ToServers
|
Servers <- ToServers
|
||||||
|
|
||||||
MaxTermLimit = 4
|
MaxTermLimit = 4
|
||||||
MaxCommitsNotified = 2
|
|
||||||
RequestLimit = 2
|
RequestLimit = 2
|
||||||
|
|
||||||
StatsFilename = "MCccfraftWithReconfig_stats.json"
|
StatsFilename = "MCccfraftWithReconfig_stats.json"
|
||||||
|
|
|
@ -27,14 +27,14 @@ SIMChangeConfigurationInt(i, newConfiguration) ==
|
||||||
SIMTimeout(i) ==
|
SIMTimeout(i) ==
|
||||||
/\ \/ 1 = RandomElement(1..100)
|
/\ \/ 1 = RandomElement(1..100)
|
||||||
\* Always allow Timeout if no messages are in the network
|
\* Always allow Timeout if no messages are in the network
|
||||||
\* and no node is a candidate or leader. Otherise, the system
|
\* and no node is a candidate or leader. Otherwise, the system
|
||||||
\* will deadlock if 1 # RandomElement(...).
|
\* will deadlock if 1 # RandomElement(...).
|
||||||
\/ /\ \A s \in Servers: leadershipState[s] \notin {Leader, Candidate}
|
\/ /\ \A s \in Servers: leadershipState[s] \notin {Leader, Candidate}
|
||||||
/\ Network!Messages = {}
|
/\ Network!Messages = {}
|
||||||
/\ CCF!Timeout(i)
|
/\ CCF!Timeout(i)
|
||||||
|
|
||||||
\* The state constraint StopAfter stops TLC after the alloted
|
\* The state constraint StopAfter stops TLC after the alloted
|
||||||
\* time budget is up, unless TLC encounteres an error first.
|
\* time budget is up, unless TLC encounters an error first.
|
||||||
StopAfter ==
|
StopAfter ==
|
||||||
LET timeout == IF ("SIM_TIMEOUT" \in DOMAIN IOEnv) /\ IOEnv.SIM_TIMEOUT # "" THEN atoi(IOEnv.SIM_TIMEOUT) ELSE 1200
|
LET timeout == IF ("SIM_TIMEOUT" \in DOMAIN IOEnv) /\ IOEnv.SIM_TIMEOUT # "" THEN atoi(IOEnv.SIM_TIMEOUT) ELSE 1200
|
||||||
(* The smoke test has a time budget of 20 minutes. *)
|
(* The smoke test has a time budget of 20 minutes. *)
|
||||||
|
@ -64,7 +64,7 @@ SIMPostCondition ==
|
||||||
|
|
||||||
=============================================================================
|
=============================================================================
|
||||||
|
|
||||||
## Repeatedly run TLC in simulation mode to shorten a counterexample (the depth parameter will consequtively be reduced based on the length of the previous counterexample).
|
## Repeatedly run TLC in simulation mode to shorten a counterexample (the depth parameter will successively be reduced based on the length of the previous counterexample).
|
||||||
$ echo 500 > depth.txt
|
$ echo 500 > depth.txt
|
||||||
## Loop while the depth.txt file exists and is not empty.
|
## Loop while the depth.txt file exists and is not empty.
|
||||||
$ while [ -s depth.txt ];
|
$ while [ -s depth.txt ];
|
||||||
|
|
Загрузка…
Ссылка в новой задаче