Dataset Viewer
Auto-converted to Parquet Duplicate
statement
stringlengths
1
146k
proof
stringlengths
0
10.9k
type
stringclasses
5 values
symbolic_name
stringlengths
1
46
library
stringclasses
99 values
filename
stringclasses
346 values
imports
listlengths
0
8
deps
listlengths
0
45
docstring
stringclasses
1 value
source_url
stringclasses
1 value
commit
stringclasses
1 value
NTF == N \in Nat /\ T \in Nat /\ F \in Nat /\ (N > 3 * T) /\ (T >= F) /\ (F >= 0)
assume
NTF
aba-asyn-byz
specifications/aba-asyn-byz/aba_asyn_byz.tla
[ "Naturals" ]
[ "Nat" ]
https://github.com/tlaplus/Examples
47b0e2cc0268836b89f5ce451f38e5df5f1cf773
Proc
== 1 .. N
definition
Proc
aba-asyn-byz
specifications/aba-asyn-byz/aba_asyn_byz.tla
[ "Naturals" ]
[]
https://github.com/tlaplus/Examples
47b0e2cc0268836b89f5ce451f38e5df5f1cf773
Location
== { "V0", "V1", "EC", "RD", "AC", "BYZ" }
definition
Location
aba-asyn-byz
specifications/aba-asyn-byz/aba_asyn_byz.tla
[ "Naturals" ]
[]
https://github.com/tlaplus/Examples
47b0e2cc0268836b89f5ce451f38e5df5f1cf773
vars
== << nSntE, nSntR, nRcvdE, nRcvdR, nByz, pc >>
definition
vars
aba-asyn-byz
specifications/aba-asyn-byz/aba_asyn_byz.tla
[ "Naturals" ]
[ "pc" ]
https://github.com/tlaplus/Examples
47b0e2cc0268836b89f5ce451f38e5df5f1cf773
guardE
== (N + T + 2) \div 2
definition
guardE
aba-asyn-byz
specifications/aba-asyn-byz/aba_asyn_byz.tla
[ "Naturals" ]
[]
https://github.com/tlaplus/Examples
47b0e2cc0268836b89f5ce451f38e5df5f1cf773
guardR1
== T + 1
definition
guardR1
aba-asyn-byz
specifications/aba-asyn-byz/aba_asyn_byz.tla
[ "Naturals" ]
[]
https://github.com/tlaplus/Examples
47b0e2cc0268836b89f5ce451f38e5df5f1cf773
guardR2
== 2 * T + 1 (* Some processes propose 0 and others propose 1.*)
definition
guardR2
aba-asyn-byz
specifications/aba-asyn-byz/aba_asyn_byz.tla
[ "Naturals" ]
[]
https://github.com/tlaplus/Examples
47b0e2cc0268836b89f5ce451f38e5df5f1cf773
Init
== /\ nSntE = 0 (* Neither ECHO nor READY messages are sent. *) /\ nSntR = 0 /\ nRcvdE = [ i \in Proc |-> 0 ] (* Neither ECHO nor READY messages are received. *) /\ nRcvdR = [ i \in Proc |-> 0 ] /\ nByz = 0 (* No processes are faulty. ...
definition
Init
aba-asyn-byz
specifications/aba-asyn-byz/aba_asyn_byz.tla
[ "Naturals" ]
[ "Proc", "pc" ]
https://github.com/tlaplus/Examples
47b0e2cc0268836b89f5ce451f38e5df5f1cf773
Init0
== /\ nSntE = 0 /\ nSntR = 0 /\ nRcvdE = [ i \in Proc |-> 0 ] /\ nRcvdR = [ i \in Proc |-> 0 ] /\ nByz = 0 /\ pc \in [ i \in Proc |-> "V0" ] (* All processes propose 1. *)
definition
Init0
aba-asyn-byz
specifications/aba-asyn-byz/aba_asyn_byz.tla
[ "Naturals" ]
[ "Proc", "pc" ]
https://github.com/tlaplus/Examples
47b0e2cc0268836b89f5ce451f38e5df5f1cf773
Init1
== /\ nSntE = 0 /\ nSntR = 0 /\ nRcvdE = [ i \in Proc |-> 0 ] /\ nRcvdR = [ i \in Proc |-> 0 ] /\ nByz = 0 /\ pc \in [ i \in Proc |-> "V1" ] (* If there are less than F Byzantine processes, process i becomes faulty. *) (* We requite i to be in an initial state (V0 or V1) to not break the *) ...
definition
Init1
aba-asyn-byz
specifications/aba-asyn-byz/aba_asyn_byz.tla
[ "Naturals" ]
[ "Proc", "pc" ]
https://github.com/tlaplus/Examples
47b0e2cc0268836b89f5ce451f38e5df5f1cf773
BecomeByzantine(i)
== /\ nByz < F /\ \/ pc[i] = "V1" \/ pc[i] = "V0" /\ nByz' = nByz + 1 /\ pc' = [ pc EXCEPT ![i] = "BYZ" ] /\ UNCHANGED << nSntE, nSntR, nRcvdE, nRcvdR >> (* Process i receives a new message. If includeByz is TRUE, then messages from both *) (* correct and Byzantine processes are considered. Otherw...
definition
BecomeByzantine
aba-asyn-byz
specifications/aba-asyn-byz/aba_asyn_byz.tla
[ "Naturals" ]
[ "pc" ]
https://github.com/tlaplus/Examples
47b0e2cc0268836b89f5ce451f38e5df5f1cf773
Receive(i, includeByz)
== \/ /\ nRcvdE[i] < nSntE + (IF includeByz THEN nByz ELSE 0) /\ nRcvdE' = [ nRcvdE EXCEPT ![i] = nRcvdE[i] + 1 ] /\ UNCHANGED << nSntE, nSntR, nRcvdR, nByz, pc >> \/ /\ nRcvdR[i] < nSntR + (IF includeByz THEN nByz ELSE 0) /\ nRcvdR' = [ nRcvdR EXCEPT ![i] = nRcvdR[i] + 1 ] /\ UNCHANGED << ...
definition
Receive
aba-asyn-byz
specifications/aba-asyn-byz/aba_asyn_byz.tla
[ "Naturals" ]
[ "pc", "vars" ]
https://github.com/tlaplus/Examples
47b0e2cc0268836b89f5ce451f38e5df5f1cf773
SendEcho(i)
== /\ \/ pc[i] = "V1" \/ /\ pc[i] = "V0" /\ \/ nRcvdE[i] >= guardE \/ nRcvdR[i] >= guardR1 /\ pc' = [ pc EXCEPT ![i] = "EC" ] /\ nSntE' = nSntE + 1 /\ UNCHANGED << nSntR, nRcvdE, nRcvdR, nByz >> (* If process i sent an ECHO message and has received enough ECHO or READY messages, it...
definition
SendEcho
aba-asyn-byz
specifications/aba-asyn-byz/aba_asyn_byz.tla
[ "Naturals" ]
[ "guardE", "guardR1", "pc" ]
https://github.com/tlaplus/Examples
47b0e2cc0268836b89f5ce451f38e5df5f1cf773
SendReady(i)
== /\ pc[i] = "EC" /\ \/ nRcvdE[i] >= guardE \/ nRcvdR[i] >= guardR1 /\ pc' = [ pc EXCEPT ![i] = "RD" ] /\ nSntR' = nSntR + 1 /\ UNCHANGED << nSntE, nRcvdE, nRcvdR, nByz >> (* If process has received READY messages from a majority of processes, it will accept. *)
definition
SendReady
aba-asyn-byz
specifications/aba-asyn-byz/aba_asyn_byz.tla
[ "Naturals" ]
[ "guardE", "guardR1", "pc" ]
https://github.com/tlaplus/Examples
47b0e2cc0268836b89f5ce451f38e5df5f1cf773
Decide(i)
== /\ pc[i] = "RD" /\ nRcvdR[i] >= guardR2 /\ pc' = [ pc EXCEPT ![i] = "AC" ] /\ UNCHANGED << nSntE, nSntE, nSntR, nRcvdE, nRcvdR, nByz >>
definition
Decide
aba-asyn-byz
specifications/aba-asyn-byz/aba_asyn_byz.tla
[ "Naturals" ]
[ "guardR2", "pc" ]
https://github.com/tlaplus/Examples
47b0e2cc0268836b89f5ce451f38e5df5f1cf773
Next
== /\ \E self \in Proc : \/ BecomeByzantine(self) \/ Receive(self, TRUE) \/ SendEcho(self) \/ SendReady(self) \/ Decide(self) \/ UNCHANGED vars (* Add weak fairness condition since we want to check liveness properties. *)
definition
Next
aba-asyn-byz
specifications/aba-asyn-byz/aba_asyn_byz.tla
[ "Naturals" ]
[ "BecomeByzantine", "Decide", "Proc", "Receive", "SendEcho", "SendReady", "vars" ]
https://github.com/tlaplus/Examples
47b0e2cc0268836b89f5ce451f38e5df5f1cf773
Spec
== Init /\ [][Next]_vars /\ WF_vars(\E self \in Proc : \/ Receive(self, FALSE) \/ SendEcho(self) \/ SendReady(self) \/ Decide(self))
definition
Spec
aba-asyn-byz
specifications/aba-asyn-byz/aba_asyn_byz.tla
[ "Naturals" ]
[ "Decide", "Init", "Next", "Proc", "Receive", "SendEcho", "SendReady" ]
https://github.com/tlaplus/Examples
47b0e2cc0268836b89f5ce451f38e5df5f1cf773
Spec0
== Init0 /\ [][Next]_vars /\ WF_vars(\E self \in Proc : \/ Receive(self, FALSE) \/ SendEcho(self) \/ SendReady(self) \/ Decide(self))
definition
Spec0
aba-asyn-byz
specifications/aba-asyn-byz/aba_asyn_byz.tla
[ "Naturals" ]
[ "Decide", "Init0", "Next", "Proc", "Receive", "SendEcho", "SendReady" ]
https://github.com/tlaplus/Examples
47b0e2cc0268836b89f5ce451f38e5df5f1cf773
TypeOK
== /\ pc \in [ Proc -> Location ] /\ nSntE \in 0..N /\ nSntR \in 0..N /\ nByz \in 0..F /\ nRcvdE \in [ Proc -> 0..(nSntE + nByz) ] /\ nRcvdR \in [ Proc -> 0..(nSntR + nByz) ]
definition
TypeOK
aba-asyn-byz
specifications/aba-asyn-byz/aba_asyn_byz.tla
[ "Naturals" ]
[ "Location", "Proc", "pc" ]
https://github.com/tlaplus/Examples
47b0e2cc0268836b89f5ce451f38e5df5f1cf773
Unforg_Ltl
== (\A i \in Proc : pc[i] = "V0") => []( \A i \in Proc : pc[i] # "AC" )
definition
Unforg_Ltl
aba-asyn-byz
specifications/aba-asyn-byz/aba_asyn_byz.tla
[ "Naturals" ]
[ "Proc", "pc" ]
https://github.com/tlaplus/Examples
47b0e2cc0268836b89f5ce451f38e5df5f1cf773
Corr_Ltl
== (\A i \in Proc : pc[i] = "V1") => <>( \E i \in Proc : pc[i] = "AC" )
definition
Corr_Ltl
aba-asyn-byz
specifications/aba-asyn-byz/aba_asyn_byz.tla
[ "Naturals" ]
[ "Proc", "pc" ]
https://github.com/tlaplus/Examples
47b0e2cc0268836b89f5ce451f38e5df5f1cf773
Agreement_Ltl
== []((\E i \in Proc : pc[i] = "AC") => <>(\A i \in Proc : pc[i] = "AC" \/ pc[i] = "BYZ" ))
definition
Agreement_Ltl
aba-asyn-byz
specifications/aba-asyn-byz/aba_asyn_byz.tla
[ "Naturals" ]
[ "Proc", "pc" ]
https://github.com/tlaplus/Examples
47b0e2cc0268836b89f5ce451f38e5df5f1cf773
TypeInvParticipantNB
== participant \in [ participants -> [ vote : {yes, no}, alive : BOOLEAN, decision : {undecided, commit, abort}, faulty : BOOLEAN, v...
definition
TypeInvParticipantNB
acp
specifications/acp/ACP_NB.tla
[ "ACP_SB" ]
[ "forward" ]
https://github.com/tlaplus/Examples
47b0e2cc0268836b89f5ce451f38e5df5f1cf773
TypeInvNB
== TypeInvParticipantNB /\ TypeInvCoordinator
definition
TypeInvNB
acp
specifications/acp/ACP_NB.tla
[ "ACP_SB" ]
[ "TypeInvCoordinator", "TypeInvParticipantNB" ]
https://github.com/tlaplus/Examples
47b0e2cc0268836b89f5ce451f38e5df5f1cf773
InitParticipantNB
== participant \in [ participants -> [ vote : {yes, no}, alive : {TRUE}, decision : {undecided}, faulty : {FALSE}, voteSent : {FALSE}, for...
definition
InitParticipantNB
acp
specifications/acp/ACP_NB.tla
[ "ACP_SB" ]
[ "forward" ]
https://github.com/tlaplus/Examples
47b0e2cc0268836b89f5ce451f38e5df5f1cf773
InitNB
== InitParticipantNB /\ InitCoordinator
definition
InitNB
acp
specifications/acp/ACP_NB.tla
[ "ACP_SB" ]
[ "InitCoordinator", "InitParticipantNB" ]
https://github.com/tlaplus/Examples
47b0e2cc0268836b89f5ce451f38e5df5f1cf773
forward(i,j)
== /\ i # j /\ participant[i].alive /\ participant[i].forward[i] # notsent /\ participant[i].forward[j] = notsent /\ participant' = [participant EXCEPT ![i] = [@ EXCEPT !.forward = [@ EXCEPT ![j] = participant[...
definition
forward
acp
specifications/acp/ACP_NB.tla
[ "ACP_SB" ]
[]
https://github.com/tlaplus/Examples
47b0e2cc0268836b89f5ce451f38e5df5f1cf773
preDecideOnForward(i,j)
== /\ i # j /\ participant[i].alive /\ participant[i].forward[i] = notsent /\ participant[j].forward[i] # notsent /\ participant' = [participant EXCEPT ![i] = [@ EXCEPT !.forward ...
definition
preDecideOnForward
acp
specifications/acp/ACP_NB.tla
[ "ACP_SB" ]
[ "forward" ]
https://github.com/tlaplus/Examples
47b0e2cc0268836b89f5ce451f38e5df5f1cf773
preDecide(i)
== /\ participant[i].alive /\ participant[i].forward[i] = notsent /\ coordinator.broadcast[i] # notsent /\ participant' = [participant EXCEPT ![i] = [@ EXCEPT !.forward = [@ EXCEPT ![i] = coordinator.broadcast[i]] ...
definition
preDecide
acp
specifications/acp/ACP_NB.tla
[ "ACP_SB" ]
[ "forward" ]
https://github.com/tlaplus/Examples
47b0e2cc0268836b89f5ce451f38e5df5f1cf773
decideNB(i)
== /\ participant[i].alive /\ \A j \in participants : participant[i].forward[j] # notsent /\ participant' = [participant EXCEPT ![i] = [@ EXCEPT !.decision = participant[i].forward[i]] ] /\ UNCHANGED<<coordinator>> \* abortOnTimeout(i...
definition
decideNB
acp
specifications/acp/ACP_NB.tla
[ "ACP_SB" ]
[ "forward" ]
https://github.com/tlaplus/Examples
47b0e2cc0268836b89f5ce451f38e5df5f1cf773
abortOnTimeout(i)
== /\ participant[i].alive /\ participant[i].decision = undecided /\ ~coordinator.alive /\ \A j \in participants : participant[j].alive => coordinator.broadcast[j] = notsent /\ \A j,k \in participants : ~participant[j].alive /\ particip...
definition
abortOnTimeout
acp
specifications/acp/ACP_NB.tla
[ "ACP_SB" ]
[ "forward" ]
https://github.com/tlaplus/Examples
47b0e2cc0268836b89f5ce451f38e5df5f1cf773
parProgNB(i,j)
== \/ sendVote(i) \/ abortOnVote(i) \/ abortOnTimeoutRequest(i) \/ forward(i,j) \/ preDecideOnForward(i,j) \/ abortOnTimeout(i) \/ preDecide(i) \/ decideNB(i)
definition
parProgNB
acp
specifications/acp/ACP_NB.tla
[ "ACP_SB" ]
[ "abortOnTimeout", "abortOnTimeoutRequest", "abortOnVote", "decideNB", "forward", "preDecide", "preDecideOnForward", "sendVote" ]
https://github.com/tlaplus/Examples
47b0e2cc0268836b89f5ce451f38e5df5f1cf773
parProgNNB
== \E i,j \in participants : parDie(i) \/ parProgNB(i,j)
definition
parProgNNB
acp
specifications/acp/ACP_NB.tla
[ "ACP_SB" ]
[ "parDie", "parProgNB" ]
https://github.com/tlaplus/Examples
47b0e2cc0268836b89f5ce451f38e5df5f1cf773
progNNB
== parProgNNB \/ coordProgN
definition
progNNB
acp
specifications/acp/ACP_NB.tla
[ "ACP_SB" ]
[ "coordProgN", "parProgNNB" ]
https://github.com/tlaplus/Examples
47b0e2cc0268836b89f5ce451f38e5df5f1cf773
fairnessNB
== /\ \A i \in participants : WF_<<coordinator, participant>>(\E j \in participants : parProgNB(i,j)) /\ WF_<<coordinator, participant>>(coordProgB)
definition
fairnessNB
acp
specifications/acp/ACP_NB.tla
[ "ACP_SB" ]
[ "coordProgB", "parProgNB" ]
https://github.com/tlaplus/Examples
47b0e2cc0268836b89f5ce451f38e5df5f1cf773
SpecNB
== InitNB /\ [][progNNB]_<<coordinator, participant>> /\ fairnessNB
definition
SpecNB
acp
specifications/acp/ACP_NB.tla
[ "ACP_SB" ]
[ "InitNB", "fairnessNB", "progNNB" ]
https://github.com/tlaplus/Examples
47b0e2cc0268836b89f5ce451f38e5df5f1cf773
AllCommit
== \A i \in participants : <>(participant[i].decision = commit \/ participant[i].faulty)
definition
AllCommit
acp
specifications/acp/ACP_NB.tla
[ "ACP_SB" ]
[]
https://github.com/tlaplus/Examples
47b0e2cc0268836b89f5ce451f38e5df5f1cf773
AllAbort
== \A i \in participants : <>(participant[i].decision = abort \/ participant[i].faulty)
definition
AllAbort
acp
specifications/acp/ACP_NB.tla
[ "ACP_SB" ]
[]
https://github.com/tlaplus/Examples
47b0e2cc0268836b89f5ce451f38e5df5f1cf773
AllCommitYesVotes
== \A i \in participants : \A j \in participants : participant[j].vote = yes ~> participant[i].decision = commit \/ participant[i].faulty \/ coordinator.faulty
definition
AllCommitYesVotes
acp
specifications/acp/ACP_NB.tla
[ "ACP_SB" ]
[]
https://github.com/tlaplus/Examples
47b0e2cc0268836b89f5ce451f38e5df5f1cf773
Perms
== Permutations(participants) \* to benefit from symmetries
definition
Perms
acp
specifications/acp/ACP_NB_TLC.tla
[ "ACP_NB", "TLC" ]
[]
https://github.com/tlaplus/Examples
47b0e2cc0268836b89f5ce451f38e5df5f1cf773
AC4_alt
== [][ /\ (\A i \in participants : participant[i].decision = commit => (participant'[i].decision = commit)) /\ (\A j \in participants : participant[j].decision = abort => (participant'[j].decision = abort))]_<<participant>>
definition
AC4_alt
acp
specifications/acp/ACP_NB_TLC.tla
[ "ACP_NB", "TLC" ]
[]
https://github.com/tlaplus/Examples
47b0e2cc0268836b89f5ce451f38e5df5f1cf773
forward(i,j)
== /\ i # j /\ participant[i].alive /\ participant[i].decision # notsent /\ participant[i].forward[j] = notsent /\ participant' = [participant EXCEPT ![i] = [@ EXCEPT !.forward = [@ EXCEPT ![j] = participant[i]...
definition
forward
acp
specifications/acp/ACP_NB_WRONG_TLC.tla
[ "ACP_SB" ]
[]
https://github.com/tlaplus/Examples
47b0e2cc0268836b89f5ce451f38e5df5f1cf773
decideOnForward(i,j)
== /\ i # j /\ participant[i].alive /\ participant[i].decision = undecided /\ participant[j].forward[i] # notsent /\ participant' = [participant EXCEPT ![i] = [@ EXCEPT !.decision = participant[...
definition
decideOnForward
acp
specifications/acp/ACP_NB_WRONG_TLC.tla
[ "ACP_SB" ]
[ "forward" ]
https://github.com/tlaplus/Examples
47b0e2cc0268836b89f5ce451f38e5df5f1cf773
parProgNB(i,j)
== \/ parProg(i) \/ forward(i,j) \/ decideOnForward(i,j) \/ abortOnTimeout(i)
definition
parProgNB
acp
specifications/acp/ACP_NB_WRONG_TLC.tla
[ "ACP_SB" ]
[ "abortOnTimeout", "decideOnForward", "forward", "parProg" ]
https://github.com/tlaplus/Examples
47b0e2cc0268836b89f5ce451f38e5df5f1cf773
TypeInvParticipant
== participant \in [ participants -> [ vote : {yes, no}, alive : BOOLEAN, decision : {undecided, commit, abort}, faulty : BOOLEAN, voteSent : B...
definition
TypeInvParticipant
acp
specifications/acp/ACP_SB.tla
[]
[]
https://github.com/tlaplus/Examples
47b0e2cc0268836b89f5ce451f38e5df5f1cf773
TypeInvCoordinator
== coordinator \in [ request : [participants -> BOOLEAN], vote : [participants -> {waiting, yes, no}], broadcast : [participants -> {commit, abort, notsent}], decision : {commit, abort, undecided}, ...
definition
TypeInvCoordinator
acp
specifications/acp/ACP_SB.tla
[]
[ "request" ]
https://github.com/tlaplus/Examples
47b0e2cc0268836b89f5ce451f38e5df5f1cf773
TypeInv
== TypeInvParticipant /\ TypeInvCoordinator
definition
TypeInv
acp
specifications/acp/ACP_SB.tla
[]
[ "TypeInvCoordinator", "TypeInvParticipant" ]
https://github.com/tlaplus/Examples
47b0e2cc0268836b89f5ce451f38e5df5f1cf773
InitParticipant
== participant \in [ participants -> [ vote : {yes, no}, alive : {TRUE}, decision : {undecided}, faulty : {FALSE}, voteSent : {FALSE} ] ...
definition
InitParticipant
acp
specifications/acp/ACP_SB.tla
[]
[]
https://github.com/tlaplus/Examples
47b0e2cc0268836b89f5ce451f38e5df5f1cf773
InitCoordinator
== coordinator \in [ request : [participants -> {FALSE}], vote : [participants -> {waiting}], alive : {TRUE}, broadcast : [participants -> {notsent}], decision : {undecided}, faulty ...
definition
InitCoordinator
acp
specifications/acp/ACP_SB.tla
[]
[ "request" ]
https://github.com/tlaplus/Examples
47b0e2cc0268836b89f5ce451f38e5df5f1cf773
Init
== InitParticipant /\ InitCoordinator
definition
Init
acp
specifications/acp/ACP_SB.tla
[]
[ "InitCoordinator", "InitParticipant" ]
https://github.com/tlaplus/Examples
47b0e2cc0268836b89f5ce451f38e5df5f1cf773
request(i)
== /\ coordinator.alive /\ ~coordinator.request[i] /\ coordinator' = [coordinator EXCEPT !.request = [@ EXCEPT ![i] = TRUE] ] /\ UNCHANGED<<participant>> \* getVote(i): \* IF \* coordinator is alive \* coordinator is still undecided \* ...
definition
request
acp
specifications/acp/ACP_SB.tla
[]
[]
https://github.com/tlaplus/Examples
47b0e2cc0268836b89f5ce451f38e5df5f1cf773
getVote(i)
== /\ coordinator.alive /\ coordinator.decision = undecided /\ \A j \in participants : coordinator.request[j] /\ coordinator.vote[i] = waiting /\ participant[i].voteSent /\ coordinator' = [coordinator EXCEPT !.vote = [@ EXCEPT ![i...
definition
getVote
acp
specifications/acp/ACP_SB.tla
[]
[ "request" ]
https://github.com/tlaplus/Examples
47b0e2cc0268836b89f5ce451f38e5df5f1cf773
detectFault(i)
== /\ coordinator.alive /\ coordinator.decision = undecided /\ \A j \in participants : coordinator.request[j] /\ coordinator.vote[i] = waiting /\ ~participant[i].alive /\ ~participant[i].voteSent /\ coordinator' ...
definition
detectFault
acp
specifications/acp/ACP_SB.tla
[]
[ "request" ]
https://github.com/tlaplus/Examples
47b0e2cc0268836b89f5ce451f38e5df5f1cf773
makeDecision
== /\ coordinator.alive /\ coordinator.decision = undecided /\ \A j \in participants : coordinator.vote[j] \in {yes, no} /\ \/ /\ \A j \in participants : coordinator.vote[j] = yes /\ coordinator' = [coordinator EXCEPT !.decision = commit] ...
definition
makeDecision
acp
specifications/acp/ACP_SB.tla
[]
[]
https://github.com/tlaplus/Examples
47b0e2cc0268836b89f5ce451f38e5df5f1cf773
coordBroadcast(i)
== /\ coordinator.alive /\ coordinator.decision # undecided /\ coordinator.broadcast[i] = notsent /\ coordinator' = [coordinator EXCEPT !.broadcast = [@ EXCEPT ![i] = coordinator.decision] ] ...
definition
coordBroadcast
acp
specifications/acp/ACP_SB.tla
[]
[]
https://github.com/tlaplus/Examples
47b0e2cc0268836b89f5ce451f38e5df5f1cf773
coordDie
== /\ coordinator.alive /\ coordinator' = [coordinator EXCEPT !.alive = FALSE, !.faulty = TRUE] /\ UNCHANGED<<participant>>
definition
coordDie
acp
specifications/acp/ACP_SB.tla
[]
[]
https://github.com/tlaplus/Examples
47b0e2cc0268836b89f5ce451f38e5df5f1cf773
sendVote(i)
== /\ participant[i].alive /\ coordinator.request[i] /\ participant' = [participant EXCEPT ![i] = [@ EXCEPT !.voteSent = TRUE] ] /\ UNCHANGED<<coordinator>> \* abortOnVote(i): \* IF \* participant is alive \* participant is undeci...
definition
sendVote
acp
specifications/acp/ACP_SB.tla
[]
[ "request" ]
https://github.com/tlaplus/Examples
47b0e2cc0268836b89f5ce451f38e5df5f1cf773
abortOnVote(i)
== /\ participant[i].alive /\ participant[i].decision = undecided /\ participant[i].voteSent /\ participant[i].vote = no /\ participant' = [participant EXCEPT ![i] = [@ EXCEPT !.decision = abort] ] ...
definition
abortOnVote
acp
specifications/acp/ACP_SB.tla
[]
[]
https://github.com/tlaplus/Examples
47b0e2cc0268836b89f5ce451f38e5df5f1cf773
abortOnTimeoutRequest(i)
== /\ participant[i].alive /\ participant[i].decision = undecided /\ ~coordinator.alive /\ ~coordinator.request[i] /\ participant' = [participant EXCEPT ![i] = [@ EXCEPT !.de...
definition
abortOnTimeoutRequest
acp
specifications/acp/ACP_SB.tla
[]
[ "request" ]
https://github.com/tlaplus/Examples
47b0e2cc0268836b89f5ce451f38e5df5f1cf773
decide(i)
== /\ participant[i].alive /\ participant[i].decision = undecided /\ coordinator.broadcast[i] # notsent /\ participant' = [participant EXCEPT ![i] = [@ EXCEPT !.decision = coordinator.broadcast[i]] ] /\ UNCHANGED<<coordinator>> \* ...
definition
decide
acp
specifications/acp/ACP_SB.tla
[]
[]
https://github.com/tlaplus/Examples
47b0e2cc0268836b89f5ce451f38e5df5f1cf773
parDie(i)
== /\ participant[i].alive /\ participant' = [participant EXCEPT ![i] = [@ EXCEPT !.alive = FALSE, !.faulty = TRUE] ] /\ UNCHANGED<<coordinator>>
definition
parDie
acp
specifications/acp/ACP_SB.tla
[]
[]
https://github.com/tlaplus/Examples
47b0e2cc0268836b89f5ce451f38e5df5f1cf773
parProg(i)
== sendVote(i) \/ abortOnVote(i) \/ abortOnTimeoutRequest(i) \/ decide(i)
definition
parProg
acp
specifications/acp/ACP_SB.tla
[]
[ "abortOnTimeoutRequest", "abortOnVote", "decide", "sendVote" ]
https://github.com/tlaplus/Examples
47b0e2cc0268836b89f5ce451f38e5df5f1cf773
parProgN
== \E i \in participants : parDie(i) \/ parProg(i)
definition
parProgN
acp
specifications/acp/ACP_SB.tla
[]
[ "parDie", "parProg" ]
https://github.com/tlaplus/Examples
47b0e2cc0268836b89f5ce451f38e5df5f1cf773
coordProgA(i)
== request(i) \/ getVote(i) \/ detectFault(i) \/ coordBroadcast(i)
definition
coordProgA
acp
specifications/acp/ACP_SB.tla
[]
[ "coordBroadcast", "detectFault", "getVote", "request" ]
https://github.com/tlaplus/Examples
47b0e2cc0268836b89f5ce451f38e5df5f1cf773
coordProgB
== makeDecision \/ \E i \in participants : coordProgA(i)
definition
coordProgB
acp
specifications/acp/ACP_SB.tla
[]
[ "coordProgA", "makeDecision" ]
https://github.com/tlaplus/Examples
47b0e2cc0268836b89f5ce451f38e5df5f1cf773
coordProgN
== coordDie \/ coordProgB
definition
coordProgN
acp
specifications/acp/ACP_SB.tla
[]
[ "coordDie", "coordProgB" ]
https://github.com/tlaplus/Examples
47b0e2cc0268836b89f5ce451f38e5df5f1cf773
progN
== parProgN \/ coordProgN \* Death transitions are left outside of fairness
definition
progN
acp
specifications/acp/ACP_SB.tla
[]
[ "coordProgN", "parProgN" ]
https://github.com/tlaplus/Examples
47b0e2cc0268836b89f5ce451f38e5df5f1cf773
fairness
== /\ \A i \in participants : WF_<<coordinator, participant>>(parProg(i)) /\ WF_<<coordinator, participant>>(coordProgB)
definition
fairness
acp
specifications/acp/ACP_SB.tla
[]
[ "coordProgB", "parProg" ]
https://github.com/tlaplus/Examples
47b0e2cc0268836b89f5ce451f38e5df5f1cf773
Spec
== Init /\ [][progN]_<<coordinator, participant>> /\ fairness
definition
Spec
acp
specifications/acp/ACP_SB.tla
[]
[ "Init", "fairness", "progN" ]
https://github.com/tlaplus/Examples
47b0e2cc0268836b89f5ce451f38e5df5f1cf773
AC1
== [] \A i, j \in participants : \/ participant[i].decision # commit \/ participant[j].decision # abort \* If any participant decides commit, then all participants must have votes YES
definition
AC1
acp
specifications/acp/ACP_SB.tla
[]
[]
https://github.com/tlaplus/Examples
47b0e2cc0268836b89f5ce451f38e5df5f1cf773
AC2
== [] ( (\E i \in participants : participant[i].decision = commit) => (\A j \in participants : participant[j].vote = yes)) \* If any participant decides abort, then: \* at least one participant voted NO, or \* at least one participant is faulty, or \* coordinator is faulty
definition
AC2
acp
specifications/acp/ACP_SB.tla
[]
[]
https://github.com/tlaplus/Examples
47b0e2cc0268836b89f5ce451f38e5df5f1cf773
AC3_1
== [] ( (\E i \in participants : participant[i].decision = abort) => \/ (\E j \in participants : participant[j].vote = no) \/ (\E j \in participants : participant[j].faulty) \/ coordinator.faulty) \* Each participant decides at most once
definition
AC3_1
acp
specifications/acp/ACP_SB.tla
[]
[]
https://github.com/tlaplus/Examples
47b0e2cc0268836b89f5ce451f38e5df5f1cf773
AC4
== [] /\ (\A i \in participants : participant[i].decision = commit => [](participant[i].decision = commit)) /\ (\A j \in participants : participant[j].decision = abort => [](participant[j].decision = abort))
definition
AC4
acp
specifications/acp/ACP_SB.tla
[]
[]
https://github.com/tlaplus/Examples
47b0e2cc0268836b89f5ce451f38e5df5f1cf773
AC3_2
== <> \/ \A i \in participants : participant[i].decision \in {abort, commit} \/ \E j \in participants : participant[j].faulty \/ coordinator.faulty
definition
AC3_2
acp
specifications/acp/ACP_SB.tla
[]
[]
https://github.com/tlaplus/Examples
47b0e2cc0268836b89f5ce451f38e5df5f1cf773
FaultyStable
== /\ \A i \in participants : [](participant[i].faulty => []participant[i].faulty) /\ [](coordinator.faulty => [] coordinator.faulty)
definition
FaultyStable
acp
specifications/acp/ACP_SB.tla
[]
[]
https://github.com/tlaplus/Examples
47b0e2cc0268836b89f5ce451f38e5df5f1cf773
VoteStable
== \A i \in participants : \/ [](participant[i].vote = yes) \/ [](participant[i].vote = no)
definition
VoteStable
acp
specifications/acp/ACP_SB.tla
[]
[]
https://github.com/tlaplus/Examples
47b0e2cc0268836b89f5ce451f38e5df5f1cf773
StrongerAC2
== [] ( (\E i \in participants : participant[i].decision = commit) => /\ (\A j \in participants : participant[j].vote = yes) /\ coordinator.decision = commit)
definition
StrongerAC2
acp
specifications/acp/ACP_SB.tla
[]
[]
https://github.com/tlaplus/Examples
47b0e2cc0268836b89f5ce451f38e5df5f1cf773
StrongerAC3_1
== [] ( (\E i \in participants : participant[i].decision = abort) => \/ (\E j \in participants : participant[j].vote = no) \/ /\ \E j \in participants : participant[j].faulty /\ coordinator.decision = abort \/ /\ coordinator.f...
definition
StrongerAC3_1
acp
specifications/acp/ACP_SB.tla
[]
[]
https://github.com/tlaplus/Examples
47b0e2cc0268836b89f5ce451f38e5df5f1cf773
NoRecovery
== [] /\ \A i \in participants : participant[i].alive <=> ~participant[i].faulty /\ coordinator.alive <=> ~coordinator.faulty
definition
NoRecovery
acp
specifications/acp/ACP_SB.tla
[]
[]
https://github.com/tlaplus/Examples
47b0e2cc0268836b89f5ce451f38e5df5f1cf773
DecisionReachedNoFault
== (\A i \in participants : participant[i].alive) ~> (\A k \in participants : participant[k].decision # undecided)
definition
DecisionReachedNoFault
acp
specifications/acp/ACP_SB.tla
[]
[]
https://github.com/tlaplus/Examples
47b0e2cc0268836b89f5ce451f38e5df5f1cf773
AbortImpliesNoVote
== [] ( (\E i \in participants : participant[i].decision = abort) => (\E j \in participants : participant[j].vote = no)) \* The following is the termination property that this SB algorithm doesn't have
definition
AbortImpliesNoVote
acp
specifications/acp/ACP_SB.tla
[]
[]
https://github.com/tlaplus/Examples
47b0e2cc0268836b89f5ce451f38e5df5f1cf773
AC5
== <> \A i \in participants : \/ participant[i].decision \in {abort, commit} \/ participant[i].faulty
definition
AC5
acp
specifications/acp/ACP_SB.tla
[]
[]
https://github.com/tlaplus/Examples
47b0e2cc0268836b89f5ce451f38e5df5f1cf773
participantsVal
== { "p1_OF_PARTICIPANT", "p2_OF_PARTICIPANT", "p3_OF_PARTICIPANT" }
definition
participantsVal
acp
specifications/acp/APACP_SB.tla
[]
[]
https://github.com/tlaplus/Examples
47b0e2cc0268836b89f5ce451f38e5df5f1cf773
IsFiniteSet(Resources)
assume
IsFiniteSet
allocator
specifications/allocator/AllocatorImplementation.tla
[ "FiniteSets", "Sequences", "Naturals" ]
[ "IsFiniteSet" ]
https://github.com/tlaplus/Examples
47b0e2cc0268836b89f5ce451f38e5df5f1cf773
Sched
== INSTANCE SchedulingAllocator
definition
Sched
allocator
specifications/allocator/AllocatorImplementation.tla
[ "FiniteSets", "Sequences", "Naturals" ]
[]
https://github.com/tlaplus/Examples
47b0e2cc0268836b89f5ce451f38e5df5f1cf773
Messages
== [type : {"request", "allocate", "return"}, clt : Clients, rsrc : SUBSET Resources]
definition
Messages
allocator
specifications/allocator/AllocatorImplementation.tla
[ "FiniteSets", "Sequences", "Naturals" ]
[]
https://github.com/tlaplus/Examples
47b0e2cc0268836b89f5ce451f38e5df5f1cf773
TypeInvariant
== /\ Sched!TypeInvariant /\ requests \in [Clients -> SUBSET Resources] /\ holding \in [Clients -> SUBSET Resources] /\ network \in SUBSET Messages
definition
TypeInvariant
allocator
specifications/allocator/AllocatorImplementation.tla
[ "FiniteSets", "Sequences", "Naturals" ]
[ "Messages", "Sched", "network" ]
https://github.com/tlaplus/Examples
47b0e2cc0268836b89f5ce451f38e5df5f1cf773
Init
== /\ Sched!Init /\ requests = [c \in Clients |-> {}] /\ holding = [c \in Clients |-> {}] /\ network = {} (* A client c may request a set of resources provided that it has *) (* neither pending requests nor holds any resources. The request is *) (* put into the network for delivery to the allocator. ...
definition
Init
allocator
specifications/allocator/AllocatorImplementation.tla
[ "FiniteSets", "Sequences", "Naturals" ]
[ "Sched", "network" ]
https://github.com/tlaplus/Examples
47b0e2cc0268836b89f5ce451f38e5df5f1cf773
Request(c,S)
== /\ requests[c] = {} /\ holding[c] = {} /\ S # {} /\ requests' = [requests EXCEPT ![c] = S] /\ network' = network \cup {[type |-> "request", clt |-> c, rsrc |-> S]} /\ UNCHANGED <<unsat,alloc,sched,holding>> (* Reception of a request message from a client by the allocator. *) (* The allocator updates it...
definition
Request
allocator
specifications/allocator/AllocatorImplementation.tla
[ "FiniteSets", "Sequences", "Naturals" ]
[ "network" ]
https://github.com/tlaplus/Examples
47b0e2cc0268836b89f5ce451f38e5df5f1cf773
RReq(m)
== /\ m \in network /\ m.type = "request" /\ alloc[m.clt] = {} \** don't handle request messages prematurely(!) /\ unsat' = [unsat EXCEPT ![m.clt] = m.rsrc] /\ network' = network \ {m} /\ UNCHANGED <<alloc,sched,requests,holding>> (* Allocation of a set of available resources to a client that has *) (*...
definition
RReq
allocator
specifications/allocator/AllocatorImplementation.tla
[ "FiniteSets", "Sequences", "Naturals" ]
[ "network" ]
https://github.com/tlaplus/Examples
47b0e2cc0268836b89f5ce451f38e5df5f1cf773
Allocate(c,S)
== /\ Sched!Allocate(c,S) /\ network' = network \cup {[type |-> "allocate", clt |-> c, rsrc |-> S]} /\ UNCHANGED <<requests,holding>> (* Reception of an allocation message by a client. *)
definition
Allocate
allocator
specifications/allocator/AllocatorImplementation.tla
[ "FiniteSets", "Sequences", "Naturals" ]
[ "Sched", "network" ]
https://github.com/tlaplus/Examples
47b0e2cc0268836b89f5ce451f38e5df5f1cf773
RAlloc(m)
== /\ m \in network /\ m.type = "allocate" /\ holding' = [holding EXCEPT ![m.clt] = @ \cup m.rsrc] /\ requests' = [requests EXCEPT ![m.clt] = @ \ m.rsrc] /\ network' = network \ {m} /\ UNCHANGED <<unsat,alloc,sched>> (* Client c returns a set of resources that it holds. It may do so *) (* even before its...
definition
RAlloc
allocator
specifications/allocator/AllocatorImplementation.tla
[ "FiniteSets", "Sequences", "Naturals" ]
[ "network" ]
https://github.com/tlaplus/Examples
47b0e2cc0268836b89f5ce451f38e5df5f1cf773
Return(c,S)
== /\ S # {} /\ S \subseteq holding[c] /\ holding' = [holding EXCEPT ![c] = @ \ S] /\ network' = network \cup {[type |-> "return", clt |-> c, rsrc |-> S]} /\ UNCHANGED <<unsat,alloc,sched,requests>> (* Reception of a return message by the allocator. *)
definition
Return
allocator
specifications/allocator/AllocatorImplementation.tla
[ "FiniteSets", "Sequences", "Naturals" ]
[ "network" ]
https://github.com/tlaplus/Examples
47b0e2cc0268836b89f5ce451f38e5df5f1cf773
RRet(m)
== /\ m \in network /\ m.type = "return" /\ alloc' = [alloc EXCEPT ![m.clt] = @ \ m.rsrc] /\ network' = network \ {m} /\ UNCHANGED <<unsat,sched,requests,holding>> (* The allocator extends its schedule by adding the processes from *) (* the pool (that have outstanding requests but that have not yet been *)...
definition
RRet
allocator
specifications/allocator/AllocatorImplementation.tla
[ "FiniteSets", "Sequences", "Naturals" ]
[ "network" ]
https://github.com/tlaplus/Examples
47b0e2cc0268836b89f5ce451f38e5df5f1cf773
Schedule
== /\ Sched!Schedule /\ UNCHANGED <<requests,holding,network>> (* The next-state relation per client and set of resources. *)
definition
Schedule
allocator
specifications/allocator/AllocatorImplementation.tla
[ "FiniteSets", "Sequences", "Naturals" ]
[ "Sched", "network" ]
https://github.com/tlaplus/Examples
47b0e2cc0268836b89f5ce451f38e5df5f1cf773
Next
== \/ \E c \in Clients, S \in SUBSET Resources : Request(c,S) \/ Allocate(c,S) \/ Return(c,S) \/ \E m \in network : RReq(m) \/ RAlloc(m) \/ RRet(m) \/ Schedule
definition
Next
allocator
specifications/allocator/AllocatorImplementation.tla
[ "FiniteSets", "Sequences", "Naturals" ]
[ "Allocate", "RAlloc", "RReq", "RRet", "Request", "Return", "Schedule", "network" ]
https://github.com/tlaplus/Examples
47b0e2cc0268836b89f5ce451f38e5df5f1cf773
vars
== <<unsat,alloc,sched,requests,holding,network>>
definition
vars
allocator
specifications/allocator/AllocatorImplementation.tla
[ "FiniteSets", "Sequences", "Naturals" ]
[ "network" ]
https://github.com/tlaplus/Examples
47b0e2cc0268836b89f5ce451f38e5df5f1cf773
Liveness
== /\ \A c \in Clients : WF_vars(requests[c]={} /\ Return(c,holding[c])) /\ \A c \in Clients : WF_vars(\E S \in SUBSET Resources : Allocate(c, S)) /\ WF_vars(Schedule) /\ \A m \in Messages : /\ WF_vars(RReq(m)) /\ WF_vars(RAlloc(m)) /\ WF_vars(RRet(m)) (* The specification of the entire s...
definition
Liveness
allocator
specifications/allocator/AllocatorImplementation.tla
[ "FiniteSets", "Sequences", "Naturals" ]
[ "Allocate", "Messages", "RAlloc", "RReq", "RRet", "Return", "Schedule" ]
https://github.com/tlaplus/Examples
47b0e2cc0268836b89f5ce451f38e5df5f1cf773
Specification
== Init /\ [][Next]_vars /\ Liveness
definition
Specification
allocator
specifications/allocator/AllocatorImplementation.tla
[ "FiniteSets", "Sequences", "Naturals" ]
[ "Init", "Liveness", "Next" ]
https://github.com/tlaplus/Examples
47b0e2cc0268836b89f5ce451f38e5df5f1cf773
RequestsInTransit(c)
== \** requests sent by c but not yet received { msg.rsrc : msg \in {m \in network : m.type = "request" /\ m.clt = c} }
definition
RequestsInTransit
allocator
specifications/allocator/AllocatorImplementation.tla
[ "FiniteSets", "Sequences", "Naturals" ]
[ "network" ]
https://github.com/tlaplus/Examples
47b0e2cc0268836b89f5ce451f38e5df5f1cf773
End of preview. Expand in Data Studio

TLA-Plus

Structured dataset of TLA+ specifications from the official TLA+ Examples repository.

Source

Schema

Column Type Description
statement string Declaration signature/claim with the leading keyword removed (verbatim slice); the full declaration minus its proof
proof string Verbatim proof/body, empty if the declaration has none
type string Declaration keyword
symbolic_name string Declaration identifier
library string Sub-library
filename string Repository-relative source path
imports list[string] File-level Require/Import modules
deps list[string] Intra-corpus identifiers referenced
docstring string Preceding documentation comment, empty if absent
source_url string Upstream repository
commit string Upstream commit extracted

Statistics

  • Entries: 4,554
  • With proof: 3,767 (82.7%)
  • With docstring: 0 (0.0%)
  • Libraries: 99

By type

Type Count
definition 3,767
assume 311
theorem 255
lemma 218
corollary 3

Example

Init0
==  
  /\ nSntE = 0
  /\ nSntR = 0    
  /\ nRcvdE = [ i \in Proc |-> 0 ]
  /\ nRcvdR = [ i \in Proc |-> 0 ]
  /\ nByz = 0
  /\ pc \in [ i \in Proc |-> "V0" ]  
  
(* All processes propose 1. *)
  • type: definition | symbolic_name: Init0 | specifications/aba-asyn-byz/aba_asyn_byz.tla

Use

Each declaration is split into a statement (signature/claim) and a proof (body) that are disjoint and together form the complete declaration, for proof modeling, autoformalization, retrieval, and dependency analysis via deps.

Citation

@misc{tla_plus_dataset,
  title  = {TLA-Plus},
  author = {Norton, Charles},
  year   = {2026},
  note   = {Extracted from https://github.com/tlaplus/Examples, commit 47b0e2cc0268},
  url    = {https://huggingface.co/datasets/phanerozoic/TLA-Plus}
}
Downloads last month
257

Collection including phanerozoic/TLA-Plus