fact stringlengths 6 24.9k | type stringclasses 4
values | library stringclasses 77
values | imports listlengths 0 8 | filename stringclasses 299
values | symbolic_name stringlengths 1 46 | docstring stringclasses 186
values |
|---|---|---|---|---|---|---|
DeadlockFree == (\E i \in Procs : Trying(i)) ~> (\E i \in Procs : InCS(i)) | definition | Bakery-Boulangerie | [
"Naturals",
"TLAPS"
] | Bakery-Boulangerie/Bakery.tla | DeadlockFree | null |
StarvationFree == \A i \in Procs : Trying(i) ~> InCS(i) | definition | Bakery-Boulangerie | [
"Naturals",
"TLAPS"
] | Bakery-Boulangerie/Bakery.tla | StarvationFree | null |
ISpec == Inv /\ [][Next]_vars | definition | Bakery-Boulangerie | [
"Naturals",
"TLAPS"
] | Bakery-Boulangerie/Bakery.tla | ISpec | null |
IInit == TypeOK /\ IInv | definition | Bakery-Boulangerie | [
"Naturals",
"TLAPS"
] | Bakery-Boulangerie/Bakery.tla | IInit | null |
TypeCorrect == Spec => []TypeOK
<1>. USE N \in Nat DEF ProcSet, Procs
<1>1. Init => TypeOK
BY DEF Init, TypeOK
<1>2. TypeOK /\ [Next]_vars => TypeOK'
<2>. SUFFICES ASSUME TypeOK, [Next]_vars
PROVE TypeOK'
OBVIOUS
<2>1. ASSUME NEW self \in Procs, ncs(self)
PROVE TypeOK'
BY <2>1 DE... | theorem | Bakery-Boulangerie | [
"Naturals",
"TLAPS"
] | Bakery-Boulangerie/Bakery.tla | TypeCorrect | null |
Spec => []MutualExclusion
<1> USE N \in Nat DEFS Procs, TypeOK, Before, \prec, ProcSet
<1>1. Init => Inv
BY DEF Init, Inv, IInv
<1>2. Inv /\ [Next]_vars => IInv'
<2> SUFFICES ASSUME TypeOK, IInv,
[Next]_vars
PROVE IInv'
BY DEF Inv
<2>1. ASSUME NEW self \in Procs,
... | theorem | Bakery-Boulangerie | [
"Naturals",
"TLAPS"
] | Bakery-Boulangerie/Bakery.tla | Spec | null |
Procs == 1..N
a \prec b == \/ a[1] < b[1]
\/ (a[1] = b[1]) /\ (a[2] < b[2]) | definition | Bakery-Boulangerie | [
"Integers",
"TLAPS"
] | Bakery-Boulangerie/Boulanger.tla | Procs | null |
vars == << num, flag, pc, unchecked, max, nxt, previous >> | definition | Bakery-Boulangerie | [
"Integers",
"TLAPS"
] | Bakery-Boulangerie/Boulanger.tla | vars | null |
ProcSet == (Procs) | definition | Bakery-Boulangerie | [
"Integers",
"TLAPS"
] | Bakery-Boulangerie/Boulanger.tla | ProcSet | null |
Init ==
/\ num = [i \in Procs |-> 0]
/\ flag = [i \in Procs |-> FALSE]
/\ unchecked = [self \in Procs |-> {}]
/\ max = [self \in Procs |-> 0]
/\ nxt = [self \in Procs |-> 1]
/\ previous = [self \in Procs |-> -1]
/\ pc = [self \in ProcSet |-> "ncs"] | definition | Bakery-Boulangerie | [
"Integers",
"TLAPS"
] | Bakery-Boulangerie/Boulanger.tla | Init | null |
ncs(self) == /\ pc[self] = "ncs"
/\ pc' = [pc EXCEPT ![self] = "e1"]
/\ UNCHANGED << num, flag, unchecked, max, nxt, previous >> | definition | Bakery-Boulangerie | [
"Integers",
"TLAPS"
] | Bakery-Boulangerie/Boulanger.tla | ncs | null |
e1(self) == /\ pc[self] = "e1"
/\ \/ /\ flag' = [flag EXCEPT ![self] = ~ flag[self]]
/\ pc' = [pc EXCEPT ![self] = "e1"]
/\ UNCHANGED <<unchecked, max>>
\/ /\ flag' = [flag EXCEPT ![self] = TRUE]
/\ unchecked' = [unchecked EXCEPT ![self] =... | definition | Bakery-Boulangerie | [
"Integers",
"TLAPS"
] | Bakery-Boulangerie/Boulanger.tla | e1 | null |
e2(self) == /\ pc[self] = "e2"
/\ IF unchecked[self] # {}
THEN /\ \E i \in unchecked[self]:
/\ unchecked' = [unchecked EXCEPT ![self] = unchecked[self] \ {i}]
/\ IF num[i] > max[self]
THEN /\ max' = [... | definition | Bakery-Boulangerie | [
"Integers",
"TLAPS"
] | Bakery-Boulangerie/Boulanger.tla | e2 | null |
e3(self) == /\ pc[self] = "e3"
/\ \/ /\ \E k \in Nat:
num' = [num EXCEPT ![self] = k]
/\ pc' = [pc EXCEPT ![self] = "e3"]
\/ /\ num' = [num EXCEPT ![self] = max[self] + 1]
/\ pc' = [pc EXCEPT ![self] = "e4"]
/\ UNCHANGED <... | definition | Bakery-Boulangerie | [
"Integers",
"TLAPS"
] | Bakery-Boulangerie/Boulanger.tla | e3 | null |
e4(self) == /\ pc[self] = "e4"
/\ \/ /\ flag' = [flag EXCEPT ![self] = ~ flag[self]]
/\ pc' = [pc EXCEPT ![self] = "e4"]
/\ UNCHANGED unchecked
\/ /\ flag' = [flag EXCEPT ![self] = FALSE]
/\ unchecked' = [unchecked EXCEPT ![self] = IF num[... | definition | Bakery-Boulangerie | [
"Integers",
"TLAPS"
] | Bakery-Boulangerie/Boulanger.tla | e4 | null |
w1(self) == /\ pc[self] = "w1"
/\ IF unchecked[self] # {}
THEN /\ \E i \in unchecked[self]:
nxt' = [nxt EXCEPT ![self] = i]
/\ ~ flag[nxt'[self]]
/\ previous' = [previous EXCEPT ![self] = -1]
/... | definition | Bakery-Boulangerie | [
"Integers",
"TLAPS"
] | Bakery-Boulangerie/Boulanger.tla | w1 | null |
w2(self) == /\ pc[self] = "w2"
/\ IF \/ num[nxt[self]] = 0
\/ <<num[self], self>> \prec <<num[nxt[self]], nxt[self]>>
\/ /\ previous[self] # -1
/\ num[nxt[self]] # previous[self]
THEN /\ unchecked' = [unchecked EXCEPT ![self] = unc... | definition | Bakery-Boulangerie | [
"Integers",
"TLAPS"
] | Bakery-Boulangerie/Boulanger.tla | w2 | null |
cs(self) == /\ pc[self] = "cs"
/\ TRUE
/\ pc' = [pc EXCEPT ![self] = "exit"]
/\ UNCHANGED << num, flag, unchecked, max, nxt, previous >> | definition | Bakery-Boulangerie | [
"Integers",
"TLAPS"
] | Bakery-Boulangerie/Boulanger.tla | cs | null |
exit(self) == /\ pc[self] = "exit"
/\ \/ /\ \E k \in Nat:
num' = [num EXCEPT ![self] = k]
/\ pc' = [pc EXCEPT ![self] = "exit"]
\/ /\ num' = [num EXCEPT ![self] = 0]
/\ pc' = [pc EXCEPT ![self] = "ncs"]
/\ UNCH... | definition | Bakery-Boulangerie | [
"Integers",
"TLAPS"
] | Bakery-Boulangerie/Boulanger.tla | exit | null |
p(self) == ncs(self) \/ e1(self) \/ e2(self) \/ e3(self) \/ e4(self)
\/ w1(self) \/ w2(self) \/ cs(self) \/ exit(self) | definition | Bakery-Boulangerie | [
"Integers",
"TLAPS"
] | Bakery-Boulangerie/Boulanger.tla | p | null |
Next == (\E self \in Procs: p(self)) | definition | Bakery-Boulangerie | [
"Integers",
"TLAPS"
] | Bakery-Boulangerie/Boulanger.tla | Next | null |
Spec == /\ Init /\ [][Next]_vars
/\ \A self \in Procs : WF_vars((pc[self] # "ncs") /\ p(self)) | definition | Bakery-Boulangerie | [
"Integers",
"TLAPS"
] | Bakery-Boulangerie/Boulanger.tla | Spec | null |
MutualExclusion == \A i,j \in Procs : (i # j) => ~ /\ pc[i] = "cs"
/\ pc[j] = "cs" | definition | Bakery-Boulangerie | [
"Integers",
"TLAPS"
] | Bakery-Boulangerie/Boulanger.tla | MutualExclusion | null |
TypeOK == /\ num \in [Procs -> Nat]
/\ flag \in [Procs -> BOOLEAN]
/\ unchecked \in [Procs -> SUBSET Procs]
/\ max \in [Procs -> Nat]
/\ nxt \in [Procs -> Procs]
/\ pc \in [Procs -> {"ncs", "e1", "e2", "e3",
"e4", "w1", "w2", "cs", "exit"}... | definition | Bakery-Boulangerie | [
"Integers",
"TLAPS"
] | Bakery-Boulangerie/Boulanger.tla | TypeOK | null |
Before(i,j) == /\ num[i] > 0
/\ \/ pc[j] \in {"ncs", "e1", "exit"}
\/ /\ pc[j] = "e2"
/\ \/ i \in unchecked[j]
\/ max[j] >= num[i]
\/ (j > i) /\ (max[j] + 1 = num[i])
\/ /\ pc[j] = "e3"
... | definition | Bakery-Boulangerie | [
"Integers",
"TLAPS"
] | Bakery-Boulangerie/Boulanger.tla | Before | null |
IInv == \A i \in Procs :
/\ (pc[i] \in {"ncs", "e1", "e2"}) => (num[i] = 0)
/\ (pc[i] \in {"e4", "w1", "w2", "cs"}) => (num[i] # 0)
/\ (pc[i] \in {"e2", "e3"}) => flag[i]
/\ (pc[i] = "w2") => (nxt[i] # i)
/\ (pc[i] \in {"e2", "w1", "w2"}) => i \notin un... | definition | Bakery-Boulangerie | [
"Integers",
"TLAPS"
] | Bakery-Boulangerie/Boulanger.tla | IInv | null |
Inv == TypeOK /\ IInv | definition | Bakery-Boulangerie | [
"Integers",
"TLAPS"
] | Bakery-Boulangerie/Boulanger.tla | Inv | null |
Trying(i) == pc[i] = "e1" | definition | Bakery-Boulangerie | [
"Integers",
"TLAPS"
] | Bakery-Boulangerie/Boulanger.tla | Trying | null |
InCS(i) == pc[i] = "cs" | definition | Bakery-Boulangerie | [
"Integers",
"TLAPS"
] | Bakery-Boulangerie/Boulanger.tla | InCS | null |
DeadlockFree == (\E i \in Procs : Trying(i)) ~> (\E i \in Procs : InCS(i)) | definition | Bakery-Boulangerie | [
"Integers",
"TLAPS"
] | Bakery-Boulangerie/Boulanger.tla | DeadlockFree | null |
StarvationFree == \A i \in Procs : Trying(i) ~> InCS(i) | definition | Bakery-Boulangerie | [
"Integers",
"TLAPS"
] | Bakery-Boulangerie/Boulanger.tla | StarvationFree | null |
TypeCorrect == Spec => []TypeOK
<1>. USE N \in Nat DEF Procs, ProcSet
<1>1. Init => TypeOK
BY DEF Init, TypeOK
<1>2. TypeOK /\ [Next]_vars => TypeOK'
<2>. SUFFICES ASSUME TypeOK, [Next]_vars
PROVE TypeOK'
OBVIOUS
<2>1. ASSUME NEW self \in Procs, ncs(self)
PROVE TypeOK'
BY <2>1 DE... | theorem | Bakery-Boulangerie | [
"Integers",
"TLAPS"
] | Bakery-Boulangerie/Boulanger.tla | TypeCorrect | null |
Spec => []MutualExclusion
<1> USE N \in Nat DEFS Procs, TypeOK, Before, \prec, ProcSet
<1>1. Init => Inv
BY DEF Init, Inv, IInv
<1>2. Inv /\ [Next]_vars => IInv'
<2> SUFFICES ASSUME TypeOK, IInv,
[Next]_vars
PROVE IInv'
BY DEF Inv
<2>1. ASSUME NEW self \in Procs,
... | theorem | Bakery-Boulangerie | [
"Integers",
"TLAPS"
] | Bakery-Boulangerie/Boulanger.tla | Spec | null |
NatOverride == 0 .. MaxNat | definition | Bakery-Boulangerie | [
"Bakery"
] | Bakery-Boulangerie/MCBakery.tla | NatOverride | null |
NatOverride == 0 .. MaxNat | definition | Bakery-Boulangerie | [
"Boulanger"
] | Bakery-Boulangerie/MCBoulanger.tla | NatOverride | null |
StateConstraint == \A process \in Procs : num[process] < MaxNat | definition | Bakery-Boulangerie | [
"Boulanger"
] | Bakery-Boulangerie/MCBoulanger.tla | StateConstraint | null |
vars == << pc >> | definition | barriers | [
"Integers"
] | barriers/Barrier.tla | vars | null |
ProcSet == (1..N) | definition | barriers | [
"Integers"
] | barriers/Barrier.tla | ProcSet | null |
Init ==
/\ pc = [p \in ProcSet |-> "b0"] | definition | barriers | [
"Integers"
] | barriers/Barrier.tla | Init | null |
b0(self) ==
/\ pc[self] = "b0"
/\ pc' = [pc EXCEPT ![self] = "b1"] | definition | barriers | [
"Integers"
] | barriers/Barrier.tla | b0 | null |
b1 ==
/\ \A p \in ProcSet : pc[p] = "b1"
/\ pc' = [p \in ProcSet |-> "b0"] | definition | barriers | [
"Integers"
] | barriers/Barrier.tla | b1 | null |
Next ==
\/ \E p \in ProcSet : b0(p)
\/ b1 | definition | barriers | [
"Integers"
] | barriers/Barrier.tla | Next | null |
Spec == Init /\ [][Next]_vars | definition | barriers | [
"Integers"
] | barriers/Barrier.tla | Spec | null |
TypeOK ==
/\ pc \in [ProcSet -> {"b0", "b1"}] | definition | barriers | [
"Integers"
] | barriers/Barrier.tla | TypeOK | null |
BarrierProperty ==
/\ [][\A p,q \in ProcSet : pc[p] = "b0" /\ pc[q] = "b1" => pc'[q] = "b1"]_vars | definition | barriers | [
"Integers"
] | barriers/Barrier.tla | BarrierProperty | null |
vars == << pc, lock, gate_1, gate_2, rdv >> | definition | barriers | [
"Integers",
"FiniteSets",
"FiniteSetTheorems",
"TLAPS"
] | barriers/Barriers.tla | vars | null |
ProcSet == (1..N) | definition | barriers | [
"Integers",
"FiniteSets",
"FiniteSetTheorems",
"TLAPS"
] | barriers/Barriers.tla | ProcSet | null |
Init ==
/\ lock = 1
/\ gate_1 = 0
/\ gate_2 = 0
/\ rdv = 0
/\ pc = [self \in ProcSet |-> "a0"] | definition | barriers | [
"Integers",
"FiniteSets",
"FiniteSetTheorems",
"TLAPS"
] | barriers/Barriers.tla | Init | null |
a0(self) == /\ pc[self] = "a0"
/\ TRUE
/\ pc' = [pc EXCEPT ![self] = "a1"]
/\ UNCHANGED << lock, gate_1, gate_2, rdv >> | definition | barriers | [
"Integers",
"FiniteSets",
"FiniteSetTheorems",
"TLAPS"
] | barriers/Barriers.tla | a0 | null |
a1(self) == /\ pc[self] = "a1"
/\ lock = 1
/\ lock' = 0
/\ pc' = [pc EXCEPT ![self] = "a2"]
/\ UNCHANGED << gate_1, gate_2, rdv >> | definition | barriers | [
"Integers",
"FiniteSets",
"FiniteSetTheorems",
"TLAPS"
] | barriers/Barriers.tla | a1 | null |
a2(self) == /\ pc[self] = "a2"
/\ rdv' = rdv + 1
/\ pc' = [pc EXCEPT ![self] = "a3"]
/\ UNCHANGED << lock, gate_1, gate_2 >> | definition | barriers | [
"Integers",
"FiniteSets",
"FiniteSetTheorems",
"TLAPS"
] | barriers/Barriers.tla | a2 | null |
a3(self) == /\ pc[self] = "a3"
/\ IF rdv = N
THEN /\ pc' = [pc EXCEPT ![self] = "a4"]
ELSE /\ pc' = [pc EXCEPT ![self] = "a5"]
/\ UNCHANGED << lock, gate_1, gate_2, rdv >> | definition | barriers | [
"Integers",
"FiniteSets",
"FiniteSetTheorems",
"TLAPS"
] | barriers/Barriers.tla | a3 | null |
a4(self) == /\ pc[self] = "a4"
/\ gate_1' = gate_1 + N
/\ pc' = [pc EXCEPT ![self] = "a5"]
/\ UNCHANGED << lock, gate_2, rdv >> | definition | barriers | [
"Integers",
"FiniteSets",
"FiniteSetTheorems",
"TLAPS"
] | barriers/Barriers.tla | a4 | null |
a5(self) == /\ pc[self] = "a5"
/\ lock' = 1
/\ pc' = [pc EXCEPT ![self] = "a6"]
/\ UNCHANGED << gate_1, gate_2, rdv >> | definition | barriers | [
"Integers",
"FiniteSets",
"FiniteSetTheorems",
"TLAPS"
] | barriers/Barriers.tla | a5 | null |
a6(self) == /\ pc[self] = "a6"
/\ gate_1 > 0
/\ gate_1' = gate_1 - 1
/\ pc' = [pc EXCEPT ![self] = "a7"]
/\ UNCHANGED << lock, gate_2, rdv >> | definition | barriers | [
"Integers",
"FiniteSets",
"FiniteSetTheorems",
"TLAPS"
] | barriers/Barriers.tla | a6 | null |
a7(self) == /\ pc[self] = "a7"
/\ lock = 1
/\ lock' = 0
/\ pc' = [pc EXCEPT ![self] = "a8"]
/\ UNCHANGED << gate_1, gate_2, rdv >> | definition | barriers | [
"Integers",
"FiniteSets",
"FiniteSetTheorems",
"TLAPS"
] | barriers/Barriers.tla | a7 | null |
a8(self) == /\ pc[self] = "a8"
/\ rdv' = rdv - 1
/\ pc' = [pc EXCEPT ![self] = "a9"]
/\ UNCHANGED << lock, gate_1, gate_2 >> | definition | barriers | [
"Integers",
"FiniteSets",
"FiniteSetTheorems",
"TLAPS"
] | barriers/Barriers.tla | a8 | null |
a9(self) == /\ pc[self] = "a9"
/\ IF rdv = 0
THEN /\ pc' = [pc EXCEPT ![self] = "a10"]
ELSE /\ pc' = [pc EXCEPT ![self] = "a11"]
/\ UNCHANGED << lock, gate_1, gate_2, rdv >> | definition | barriers | [
"Integers",
"FiniteSets",
"FiniteSetTheorems",
"TLAPS"
] | barriers/Barriers.tla | a9 | null |
a10(self) == /\ pc[self] = "a10"
/\ gate_2' = gate_2 + N
/\ pc' = [pc EXCEPT ![self] = "a11"]
/\ UNCHANGED << lock, gate_1, rdv >> | definition | barriers | [
"Integers",
"FiniteSets",
"FiniteSetTheorems",
"TLAPS"
] | barriers/Barriers.tla | a10 | null |
a11(self) == /\ pc[self] = "a11"
/\ lock' = 1
/\ pc' = [pc EXCEPT ![self] = "a12"]
/\ UNCHANGED << gate_1, gate_2, rdv >> | definition | barriers | [
"Integers",
"FiniteSets",
"FiniteSetTheorems",
"TLAPS"
] | barriers/Barriers.tla | a11 | null |
a12(self) == /\ pc[self] = "a12"
/\ gate_2 > 0
/\ gate_2' = gate_2 - 1
/\ pc' = [pc EXCEPT ![self] = "a0"]
/\ UNCHANGED << lock, gate_1, rdv >> | definition | barriers | [
"Integers",
"FiniteSets",
"FiniteSetTheorems",
"TLAPS"
] | barriers/Barriers.tla | a12 | null |
proc(self) == a0(self) \/ a1(self) \/ a2(self) \/ a3(self) \/ a4(self)
\/ a5(self) \/ a6(self) \/ a7(self) \/ a8(self)
\/ a9(self) \/ a10(self) \/ a11(self) \/ a12(self) | definition | barriers | [
"Integers",
"FiniteSets",
"FiniteSetTheorems",
"TLAPS"
] | barriers/Barriers.tla | proc | null |
Next == (\E self \in 1..N: proc(self)) | definition | barriers | [
"Integers",
"FiniteSets",
"FiniteSetTheorems",
"TLAPS"
] | barriers/Barriers.tla | Next | null |
Spec == Init /\ [][Next]_vars | definition | barriers | [
"Integers",
"FiniteSets",
"FiniteSetTheorems",
"TLAPS"
] | barriers/Barriers.tla | Spec | null |
TypeOK ==
/\ lock \in {0, 1}
/\ gate_1 \in Nat
/\ gate_2 \in Nat
/\ rdv \in Int
/\ pc \in [ProcSet -> {"a0", "a1", "a2", "a3", "a4", "a5", "a6",
"a7", "a8", "a9", "a10", "a11", "a12"}] | definition | barriers | [
"Integers",
"FiniteSets",
"FiniteSetTheorems",
"TLAPS"
] | barriers/Barriers.tla | TypeOK | null |
lockcs(p) ==
pc[p] \in {"a2", "a3", "a4", "a5", "a8", "a9", "a10", "a11"} | definition | barriers | [
"Integers",
"FiniteSets",
"FiniteSetTheorems",
"TLAPS"
] | barriers/Barriers.tla | lockcs | null |
ProcsInLockCS ==
{p \in ProcSet: lockcs(p)} | definition | barriers | [
"Integers",
"FiniteSets",
"FiniteSetTheorems",
"TLAPS"
] | barriers/Barriers.tla | ProcsInLockCS | null |
LockInv ==
/\ \A i, j \in ProcSet: (i # j) => ~(lockcs(i) /\ lockcs(j))
/\ (\E p \in ProcSet: lockcs(p)) => lock = 0 | definition | barriers | [
"Integers",
"FiniteSets",
"FiniteSetTheorems",
"TLAPS"
] | barriers/Barriers.tla | LockInv | null |
rdvsection(p) ==
pc[p] \in {"a3", "a4", "a5", "a6", "a7", "a8"} | definition | barriers | [
"Integers",
"FiniteSets",
"FiniteSetTheorems",
"TLAPS"
] | barriers/Barriers.tla | rdvsection | null |
ProcsInRdv ==
{p \in ProcSet : rdvsection(p)} | definition | barriers | [
"Integers",
"FiniteSets",
"FiniteSetTheorems",
"TLAPS"
] | barriers/Barriers.tla | ProcsInRdv | null |
barrier1(p) ==
pc[p] \in {"a0", "a1", "a2", "a3", "a4", "a5", "a6"} | definition | barriers | [
"Integers",
"FiniteSets",
"FiniteSetTheorems",
"TLAPS"
] | barriers/Barriers.tla | barrier1 | null |
ProcsInB1 ==
{p \in ProcSet : barrier1(p)} | definition | barriers | [
"Integers",
"FiniteSets",
"FiniteSetTheorems",
"TLAPS"
] | barriers/Barriers.tla | ProcsInB1 | null |
barrier2(p) ==
pc[p] \in {"a7", "a8", "a9", "a10", "a11", "a12"} | definition | barriers | [
"Integers",
"FiniteSets",
"FiniteSetTheorems",
"TLAPS"
] | barriers/Barriers.tla | barrier2 | null |
ProcsInB2 ==
{p \in ProcSet : barrier2(p)} | definition | barriers | [
"Integers",
"FiniteSets",
"FiniteSetTheorems",
"TLAPS"
] | barriers/Barriers.tla | ProcsInB2 | null |
Inv ==
/\ gate_1 \in 0..N
/\ gate_2 \in 0..N
/\ rdv = Cardinality(ProcsInRdv)
/\ gate_1 > 0 => \E p \in ProcSet : pc[p] \in {"a5", "a6"}
/\ gate_2 > 0 => \E p \in ProcSet : pc[p] \in {"a11", "a12"}
/\ (gate_1 = 0) \/ (gate_2 = 0)
/\ (\E p \in ProcSet: pc[p] \in {"a0", "a1", "a2", "a... | definition | barriers | [
"Integers",
"FiniteSets",
"FiniteSetTheorems",
"TLAPS"
] | barriers/Barriers.tla | Inv | null |
FlushInv ==
/\ gate_1 > 0 => gate_1 = Cardinality(ProcsInB1)
/\ gate_2 > 0 => gate_2 = Cardinality(ProcsInB2) | definition | barriers | [
"Integers",
"FiniteSets",
"FiniteSetTheorems",
"TLAPS"
] | barriers/Barriers.tla | FlushInv | null |
pc_translation(self) ==
IF pc[self] \in {"a1", "a2", "a3", "a4", "a5", "a6", "a7", "a8", "a9", "a10"}
THEN "b1"
ELSE IF pc[self] = "a0"
THEN "b0"
ELSE IF gate_2 > 0
THEN "b0"
ELSE "b1" | definition | barriers | [
"Integers",
"FiniteSets",
"FiniteSetTheorems",
"TLAPS"
] | barriers/Barriers.tla | pc_translation | null |
B == INSTANCE Barrier WITH pc <- [p \in ProcSet |-> pc_translation(p)] | definition | barriers | [
"Integers",
"FiniteSets",
"FiniteSetTheorems",
"TLAPS"
] | barriers/Barriers.tla | B | null |
BSpec == B!Spec | definition | barriers | [
"Integers",
"FiniteSets",
"FiniteSetTheorems",
"TLAPS"
] | barriers/Barriers.tla | BSpec | null |
FS_NonEmptySet == ASSUME NEW S, IsFiniteSet(S)
PROVE Cardinality(S) > 0 <=> \E x: x \in S
BY FS_EmptySet, FS_CardinalityType | theorem | barriers | [
"Integers",
"FiniteSets",
"FiniteSetTheorems",
"TLAPS"
] | barriers/Barriers.tla | FS_NonEmptySet | null |
FS_TwoElements == ASSUME NEW S, IsFiniteSet(S)
PROVE Cardinality(S) > 1 => \E x, y \in S: x # y
<1> SUFFICES ASSUME Cardinality(S) > 1
PROVE \E x, y \in S: x # y
OBVIOUS
<1>1. PICK x : x \in S
<2>1. Cardinality(S) > 0
BY FS_CardinalityType
<2>2. QED
BY <2>1, FS_NonEmptySet... | theorem | barriers | [
"Integers",
"FiniteSets",
"FiniteSetTheorems",
"TLAPS"
] | barriers/Barriers.tla | FS_TwoElements | null |
Invariant == Spec => []Inv
<1> USE N_Assumption
DEF Inv, lockcs, rdvsection, ProcsInRdv,
barrier1, ProcsInB1, barrier2, ProcsInB2
<1>1. Init => Inv
<2> SUFFICES ASSUME Init
PROVE Inv
OBVIOUS
<2>1. gate_1 \in 0..N
BY DEF Init
<2>2. gate_2 \in 0..N
BY ... | theorem | barriers | [
"Integers",
"FiniteSets",
"FiniteSetTheorems",
"TLAPS"
] | barriers/Barriers.tla | Invariant | null |
BarrierExclusion == Inv => \/ ~(\E p \in ProcSet: pc[p] \in {"a0", "a1", "a2", "a3", "a4"})
\/ ~(\E p \in ProcSet: pc[p] \in {"a7", "a8", "a9", "a10"})
BY N_Assumption DEF Inv | theorem | barriers | [
"Integers",
"FiniteSets",
"FiniteSetTheorems",
"TLAPS"
] | barriers/Barriers.tla | BarrierExclusion | null |
BarrierExclusion2 == TypeOK /\ Inv =>
\/ (\A p \in ProcSet: pc[p] \in
{"a5", "a6", "a7", "a8", "a9", "a10", "a11", "a12"})
\/ (\A p \in ProcSet: pc[p] \in
{"a11", "a12", "a0", "a1", "a2", "a3", "a4", "a5", "a6"})
BY N_Assumption DEF TypeOK, Inv | theorem | barriers | [
"Integers",
"FiniteSets",
"FiniteSetTheorems",
"TLAPS"
] | barriers/Barriers.tla | BarrierExclusion2 | null |
FlushInvariant == Spec => []FlushInv
<1> USE N_Assumption DEF FlushInv, ProcSet,
ProcsInB1, barrier1, ProcsInB2, barrier2
<1>1. Init => FlushInv
BY FS_EmptySet DEF Init
<1>2. /\ [Next]_vars
/\ TypeOK
/\ LockInv
/\ Inv
/\ FlushInv
=> FlushInv'... | theorem | barriers | [
"Integers",
"FiniteSets",
"FiniteSetTheorems",
"TLAPS"
] | barriers/Barriers.tla | FlushInvariant | null |
Spec => B!Spec
<1> USE DEF ProcSet, B!ProcSet, pc_translation
<1>1. Init => B!Init
BY DEF Init, B!Init
<1>2. /\ [Next]_vars
/\ TypeOK /\ TypeOK'
/\ LockInv /\ LockInv'
/\ Inv /\ Inv'
/\ FlushInv /\ FlushInv'
=> [B!Next]_B!vars
<2> USE DEF Next, vars, B!Next, B!vars... | theorem | barriers | [
"Integers",
"FiniteSets",
"FiniteSetTheorems",
"TLAPS"
] | barriers/Barriers.tla | Spec | null |
Typing == Spec => []TypeOK
<1> USE N_Assumption DEF TypeOK
<1>1. Init => TypeOK
BY DEF Init
<1>2. TypeOK /\ [Next]_vars => TypeOK'
BY DEF Next, proc, vars,
a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12
<1>3. QED
BY <1>1, <1>2, PTL DEF Spec | lemma | barriers | [
"Integers",
"FiniteSets",
"FiniteSetTheorems",
"TLAPS"
] | barriers/Barriers.tla | Typing | null |
LockExclusion == Spec => []LockInv
<1> USE DEF LockInv, lockcs, TypeOK
<1>1. Init => LockInv
BY DEF Init
<1>2. LockInv /\ TypeOK /\ [Next]_vars => LockInv'
<2> SUFFICES ASSUME LockInv /\ TypeOK /\ [Next]_vars
PROVE LockInv'
OBVIOUS
<2>1. ASSUME NEW self \in 1..N, a0(self)
... | lemma | barriers | [
"Integers",
"FiniteSets",
"FiniteSetTheorems",
"TLAPS"
] | barriers/Barriers.tla | LockExclusion | null |
ProcSetSubSetsBound == /\ IsFiniteSet(ProcsInRdv) /\ Cardinality(ProcsInRdv) \in 0..N
/\ IsFiniteSet(ProcsInB1) /\ Cardinality(ProcsInB1) \in 0..N
/\ IsFiniteSet(ProcsInB1)' /\ Cardinality(ProcsInB1)' \in 0..N
/\ IsFiniteSet(ProcsInB2) /\ Cardinality(ProcsInB2) \in 0..N
/\ IsFiniteSet(ProcsInB2)' /\ Car... | lemma | barriers | [
"Integers",
"FiniteSets",
"FiniteSetTheorems",
"TLAPS"
] | barriers/Barriers.tla | ProcSetSubSetsBound | null |
AllProcsInRdv == (Cardinality(ProcsInRdv) = N) => (\A p \in ProcSet : rdvsection(p))
<1> USE N_Assumption
<1>1. ProcsInRdv \subseteq ProcSet
BY DEF ProcSet, ProcsInRdv
<1>2. /\ IsFiniteSet(ProcSet)
/\ Cardinality(ProcSet) = N
BY FS_Interval DEF ProcSet
<1>3. (Cardinality(ProcsInRdv) = N) => Pro... | lemma | barriers | [
"Integers",
"FiniteSets",
"FiniteSetTheorems",
"TLAPS"
] | barriers/Barriers.tla | AllProcsInRdv | null |
AllProcsNotInRdv == (Cardinality(ProcsInRdv) = 0) => ~(\E p \in ProcSet : rdvsection(p))
<1> USE N_Assumption
<1>1. IsFiniteSet(ProcsInRdv)
BY ProcSetSubSetsBound, PTL
<1>2. (Cardinality(ProcsInRdv) = 0) => (ProcsInRdv = {})
BY <1>1, FS_EmptySet
<1>3. (Cardinality(ProcsInRdv) = 0) => ~(\E p \in ProcSet ... | lemma | barriers | [
"Integers",
"FiniteSets",
"FiniteSetTheorems",
"TLAPS"
] | barriers/Barriers.tla | AllProcsNotInRdv | null |
N_Assumption == N \in Nat \ {0} | assume | barriers | [
"Integers",
"FiniteSets",
"FiniteSetTheorems",
"TLAPS"
] | barriers/Barriers.tla | N_Assumption | null |
Proc == 1 .. N | definition | bcastByz | [
"Naturals"
] | bcastByz/bcastByz.tla | Proc | null |
M == { "ECHO" } | definition | bcastByz | [
"Naturals"
] | bcastByz/bcastByz.tla | M | TLA+ encoding of a parameterized model of the broadcast distributed
algorithm with Byzantine faults.
This is a one-round version of asynchronous reliable broadcast (Fig. 7) from:
[1] T. K. Srikanth, Sam Toueg. Simulating authenticated broadcasts to derive
simple fault-tolerant algorithms. Distribute... |
ByzMsgs == Faulty \X M | definition | bcastByz | [
"Naturals"
] | bcastByz/bcastByz.tla | ByzMsgs | TLA+ encoding of a parameterized model of the broadcast distributed
algorithm with Byzantine faults.
This is a one-round version of asynchronous reliable broadcast (Fig. 7) from:
[1] T. K. Srikanth, Sam Toueg. Simulating authenticated broadcasts to derive
simple fault-tolerant algorithms. Distribute... |
vars == << pc, rcvd, sent, Corr, Faulty >> | definition | bcastByz | [
"Naturals"
] | bcastByz/bcastByz.tla | vars | null |
Init ==
/\ sent = {}
/\ pc \in [ Proc -> {"V0", "V1"} ]
/\ rcvd = [ i \in Proc |-> {} ]
/\ Corr \in SUBSET Proc
/\ Cardinality(Corr) = N - F
/\ Faulty = Proc \ Corr | definition | bcastByz | [
"Naturals"
] | bcastByz/bcastByz.tla | Init | null |
InitNoBcast == pc \in [ Proc -> {"V0"} ] /\ Init | definition | bcastByz | [
"Naturals"
] | bcastByz/bcastByz.tla | InitNoBcast | TLA+ encoding of a parameterized model of the broadcast distributed
algorithm with Byzantine faults.
This is a one-round version of asynchronous reliable broadcast (Fig. 7) from:
[1] T. K. Srikanth, Sam Toueg. Simulating authenticated broadcasts to derive
simple fault-tolerant algorithms. Distribute... |
Receive(self, includeByz) ==
\E newMessages \in SUBSET ( sent \cup (IF includeByz THEN ByzMsgs ELSE {}) ) :
rcvd' = [ i \in Proc |-> IF i # self THEN rcvd[i] ELSE rcvd[self] \cup newMessages ] | definition | bcastByz | [
"Naturals"
] | bcastByz/bcastByz.tla | Receive | TLA+ encoding of a parameterized model of the broadcast distributed
algorithm with Byzantine faults.
This is a one-round version of asynchronous reliable broadcast (Fig. 7) from:
[1] T. K. Srikanth, Sam Toueg. Simulating authenticated broadcasts to derive
simple fault-tolerant algorithms. Distribute... |
ReceiveFromCorrectSender(self) == Receive(self, FALSE) | definition | bcastByz | [
"Naturals"
] | bcastByz/bcastByz.tla | ReceiveFromCorrectSender | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.