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
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>>
definition
allocator
[ "Naturals", "FiniteSets", "Sequences" ]
allocator/AllocatorImplementation.tla
RAlloc
null
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>>
definition
allocator
[ "Naturals", "FiniteSets", "Sequences" ]
allocator/AllocatorImplementation.tla
Return
null
RRet(m) == /\ m \in network /\ m.type = "return" /\ alloc' = [alloc EXCEPT ![m.clt] = @ \ m.rsrc] /\ network' = network \ {m} /\ UNCHANGED <<unsat,sched,requests,holding>>
definition
allocator
[ "Naturals", "FiniteSets", "Sequences" ]
allocator/AllocatorImplementation.tla
RRet
null
Schedule == /\ Sched!Schedule /\ UNCHANGED <<requests,holding,network>>
definition
allocator
[ "Naturals", "FiniteSets", "Sequences" ]
allocator/AllocatorImplementation.tla
Schedule
null
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
allocator
[ "Naturals", "FiniteSets", "Sequences" ]
allocator/AllocatorImplementation.tla
Next
null
vars == <<unsat,alloc,sched,requests,holding,network>>
definition
allocator
[ "Naturals", "FiniteSets", "Sequences" ]
allocator/AllocatorImplementation.tla
vars
null
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))
definition
allocator
[ "Naturals", "FiniteSets", "Sequences" ]
allocator/AllocatorImplementation.tla
Liveness
null
Specification == Init /\ [][Next]_vars /\ Liveness
definition
allocator
[ "Naturals", "FiniteSets", "Sequences" ]
allocator/AllocatorImplementation.tla
Specification
null
RequestsInTransit(c) == { msg.rsrc : msg \in {m \in network : m.type = "request" /\ m.clt = c} }
definition
allocator
[ "Naturals", "FiniteSets", "Sequences" ]
allocator/AllocatorImplementation.tla
RequestsInTransit
null
AllocsInTransit(c) == { msg.rsrc : msg \in {m \in network : m.type = "allocate" /\ m.clt = c} }
definition
allocator
[ "Naturals", "FiniteSets", "Sequences" ]
allocator/AllocatorImplementation.tla
AllocsInTransit
null
ReturnsInTransit(c) == { msg.rsrc : msg \in {m \in network : m.type = "return" /\ m.clt = c} }
definition
allocator
[ "Naturals", "FiniteSets", "Sequences" ]
allocator/AllocatorImplementation.tla
ReturnsInTransit
null
Invariant == /\ Sched!AllocatorInvariant /\ \A c \in Clients : /\ Cardinality(RequestsInTransit(c)) <= 1 /\ requests[c] = unsat[c] \cup UNION RequestsInTransit(c) \cup UNION AllocsInTransit(c) /\ alloc[c] = holding[c] \cup UN...
definition
allocator
[ "Naturals", "FiniteSets", "Sequences" ]
allocator/AllocatorImplementation.tla
Invariant
null
ResourceMutex == \A c1,c2 \in Clients : holding[c1] \cap holding[c2] # {} => c1 = c2
definition
allocator
[ "Naturals", "FiniteSets", "Sequences" ]
allocator/AllocatorImplementation.tla
ResourceMutex
null
ClientsWillReturn == \A c \in Clients: (requests[c]={} ~> holding[c]={})
definition
allocator
[ "Naturals", "FiniteSets", "Sequences" ]
allocator/AllocatorImplementation.tla
ClientsWillReturn
null
ClientsWillObtain == \A c \in Clients, r \in Resources : r \in requests[c] ~> r \in holding[c]
definition
allocator
[ "Naturals", "FiniteSets", "Sequences" ]
allocator/AllocatorImplementation.tla
ClientsWillObtain
null
InfOftenSatisfied == \A c \in Clients : []<>(requests[c] = {})
definition
allocator
[ "Naturals", "FiniteSets", "Sequences" ]
allocator/AllocatorImplementation.tla
InfOftenSatisfied
null
SchedAllocator == Sched!Allocator
definition
allocator
[ "Naturals", "FiniteSets", "Sequences" ]
allocator/AllocatorImplementation.tla
SchedAllocator
null
Specification => []TypeInvariant
theorem
allocator
[ "Naturals", "FiniteSets", "Sequences" ]
allocator/AllocatorImplementation.tla
Specification
null
Specification => []ResourceMutex
theorem
allocator
[ "Naturals", "FiniteSets", "Sequences" ]
allocator/AllocatorImplementation.tla
Specification
null
Specification => []Invariant
theorem
allocator
[ "Naturals", "FiniteSets", "Sequences" ]
allocator/AllocatorImplementation.tla
Specification
null
Specification => ClientsWillReturn
theorem
allocator
[ "Naturals", "FiniteSets", "Sequences" ]
allocator/AllocatorImplementation.tla
Specification
null
Specification => ClientsWillObtain
theorem
allocator
[ "Naturals", "FiniteSets", "Sequences" ]
allocator/AllocatorImplementation.tla
Specification
null
Specification => InfOftenSatisfied
theorem
allocator
[ "Naturals", "FiniteSets", "Sequences" ]
allocator/AllocatorImplementation.tla
Specification
null
Specification => SchedAllocator
theorem
allocator
[ "Naturals", "FiniteSets", "Sequences" ]
allocator/AllocatorImplementation.tla
Specification
null
Simple == INSTANCE SimpleAllocator
definition
allocator
[ "SchedulingAllocator" ]
allocator/AllocatorRefinement.tla
Simple
null
SimpleAllocator == Simple!SimpleAllocator
definition
allocator
[ "SchedulingAllocator" ]
allocator/AllocatorRefinement.tla
SimpleAllocator
null
Allocator => SimpleAllocator
theorem
allocator
[ "SchedulingAllocator" ]
allocator/AllocatorRefinement.tla
Allocator
null
TypeInvariant == /\ unsat \in [Clients -> SUBSET Resources] /\ alloc \in [Clients -> SUBSET Resources] /\ sched \in Seq(Clients)
definition
allocator
[ "TLC", "Naturals", "FiniteSets", "Sequences" ]
allocator/SchedulingAllocator.tla
TypeInvariant
null
PermSeqs(S) == LET perms[ss \in SUBSET S] == IF ss = {} THEN { << >> } ELSE LET ps == [ x \in ss |-> { Append(sq,x) : sq \in perms[ss \ {x}] } ] IN UNION { ps[x] : x \in ss } IN perms[S]
definition
allocator
[ "TLC", "Naturals", "FiniteSets", "Sequences" ]
allocator/SchedulingAllocator.tla
PermSeqs
null
Drop(seq,i) == SubSeq(seq, 1, i-1) \circ SubSeq(seq, i+1, Len(seq))
definition
allocator
[ "TLC", "Naturals", "FiniteSets", "Sequences" ]
allocator/SchedulingAllocator.tla
Drop
null
available == Resources \ (UNION {alloc[c] : c \in Clients})
definition
allocator
[ "TLC", "Naturals", "FiniteSets", "Sequences" ]
allocator/SchedulingAllocator.tla
available
null
Range(f) == { f[x] : x \in DOMAIN f }
definition
allocator
[ "TLC", "Naturals", "FiniteSets", "Sequences" ]
allocator/SchedulingAllocator.tla
Range
null
toSchedule == { c \in Clients : unsat[c] # {} /\ c \notin Range(sched) }
definition
allocator
[ "TLC", "Naturals", "FiniteSets", "Sequences" ]
allocator/SchedulingAllocator.tla
toSchedule
null
Init == /\ unsat = [c \in Clients |-> {}] /\ alloc = [c \in Clients |-> {}] /\ sched = << >>
definition
allocator
[ "TLC", "Naturals", "FiniteSets", "Sequences" ]
allocator/SchedulingAllocator.tla
Init
null
Request(c,S) == /\ unsat[c] = {} /\ alloc[c] = {} /\ S # {} /\ unsat' = [unsat EXCEPT ![c] = S] /\ UNCHANGED <<alloc,sched>>
definition
allocator
[ "TLC", "Naturals", "FiniteSets", "Sequences" ]
allocator/SchedulingAllocator.tla
Request
null
Allocate(c,S) == /\ S # {} /\ S \subseteq available \cap unsat[c] /\ \E i \in DOMAIN sched : /\ sched[i] = c /\ \A j \in 1..i-1 : unsat[sched[j]] \cap S = {} /\ sched' = IF S = unsat[c] THEN Drop(sched,i) ELSE sched /\ alloc' = [alloc EXCEPT ![c] = @ \cup S] /\ unsat' = [unsat EXCEPT ![c...
definition
allocator
[ "TLC", "Naturals", "FiniteSets", "Sequences" ]
allocator/SchedulingAllocator.tla
Allocate
null
Return(c,S) == /\ S # {} /\ S \subseteq alloc[c] /\ alloc' = [alloc EXCEPT ![c] = @ \ S] /\ UNCHANGED <<unsat,sched>>
definition
allocator
[ "TLC", "Naturals", "FiniteSets", "Sequences" ]
allocator/SchedulingAllocator.tla
Return
null
Schedule == /\ toSchedule # {} /\ \E sq \in PermSeqs(toSchedule) : sched' = sched \circ sq /\ UNCHANGED <<unsat,alloc>>
definition
allocator
[ "TLC", "Naturals", "FiniteSets", "Sequences" ]
allocator/SchedulingAllocator.tla
Schedule
null
Next == \/ \E c \in Clients, S \in SUBSET Resources : Request(c,S) \/ Allocate(c,S) \/ Return(c,S) \/ Schedule
definition
allocator
[ "TLC", "Naturals", "FiniteSets", "Sequences" ]
allocator/SchedulingAllocator.tla
Next
null
vars == <<unsat,alloc,sched>>
definition
allocator
[ "TLC", "Naturals", "FiniteSets", "Sequences" ]
allocator/SchedulingAllocator.tla
vars
null
Liveness == /\ \A c \in Clients : WF_vars(unsat[c]={} /\ Return(c,alloc[c])) /\ \A c \in Clients : WF_vars(\E S \in SUBSET Resources : Allocate(c, S)) /\ WF_vars(Schedule)
definition
allocator
[ "TLC", "Naturals", "FiniteSets", "Sequences" ]
allocator/SchedulingAllocator.tla
Liveness
null
Allocator == Init /\ [][Next]_vars /\ Liveness
definition
allocator
[ "TLC", "Naturals", "FiniteSets", "Sequences" ]
allocator/SchedulingAllocator.tla
Allocator
null
ResourceMutex == \A c1,c2 \in Clients : c1 # c2 => alloc[c1] \cap alloc[c2] = {}
definition
allocator
[ "TLC", "Naturals", "FiniteSets", "Sequences" ]
allocator/SchedulingAllocator.tla
ResourceMutex
null
UnscheduledClients == Clients \ Range(sched)
definition
allocator
[ "TLC", "Naturals", "FiniteSets", "Sequences" ]
allocator/SchedulingAllocator.tla
UnscheduledClients
null
PrevResources(i) == available \cup (UNION {unsat[sched[j]] \cup alloc[sched[j]] : j \in 1..i-1}) \cup (UNION {alloc[c] : c \in UnscheduledClients})
definition
allocator
[ "TLC", "Naturals", "FiniteSets", "Sequences" ]
allocator/SchedulingAllocator.tla
PrevResources
null
AllocatorInvariant == /\ \A i \in DOMAIN sched : unsat[sched[i]] # {} /\ \A c \in toSchedule : unsat[c] # {} /\ \A i \in DOMAIN sched : \A j \in 1..i-1 : alloc[sched[i]] \cap unsat[sched[j]] = {} /\ \A i \in DOMAIN sched : unsat[sched[i]] \subseteq PrevResources(i)
definition
allocator
[ "TLC", "Naturals", "FiniteSets", "Sequences" ]
allocator/SchedulingAllocator.tla
AllocatorInvariant
null
ClientsWillReturn == \A c \in Clients: (unsat[c]={} ~> alloc[c]={})
definition
allocator
[ "TLC", "Naturals", "FiniteSets", "Sequences" ]
allocator/SchedulingAllocator.tla
ClientsWillReturn
null
ClientsWillObtain == \A c \in Clients, r \in Resources : r \in unsat[c] ~> r \in alloc[c]
definition
allocator
[ "TLC", "Naturals", "FiniteSets", "Sequences" ]
allocator/SchedulingAllocator.tla
ClientsWillObtain
null
InfOftenSatisfied == \A c \in Clients : []<>(unsat[c] = {})
definition
allocator
[ "TLC", "Naturals", "FiniteSets", "Sequences" ]
allocator/SchedulingAllocator.tla
InfOftenSatisfied
null
Symmetry == Permutations(Resources)
definition
allocator
[ "TLC", "Naturals", "FiniteSets", "Sequences" ]
allocator/SchedulingAllocator.tla
Symmetry
null
Allocator => []TypeInvariant
theorem
allocator
[ "TLC", "Naturals", "FiniteSets", "Sequences" ]
allocator/SchedulingAllocator.tla
Allocator
null
Allocator => []ResourceMutex
theorem
allocator
[ "TLC", "Naturals", "FiniteSets", "Sequences" ]
allocator/SchedulingAllocator.tla
Allocator
null
Allocator => []AllocatorInvariant
theorem
allocator
[ "TLC", "Naturals", "FiniteSets", "Sequences" ]
allocator/SchedulingAllocator.tla
Allocator
null
Allocator => ClientsWillReturn
theorem
allocator
[ "TLC", "Naturals", "FiniteSets", "Sequences" ]
allocator/SchedulingAllocator.tla
Allocator
null
Allocator => ClientsWillObtain
theorem
allocator
[ "TLC", "Naturals", "FiniteSets", "Sequences" ]
allocator/SchedulingAllocator.tla
Allocator
null
Allocator => InfOftenSatisfied
theorem
allocator
[ "TLC", "Naturals", "FiniteSets", "Sequences" ]
allocator/SchedulingAllocator.tla
Allocator
null
TypeInvariant == /\ unsat \in [Clients -> SUBSET Resources] /\ alloc \in [Clients -> SUBSET Resources]
definition
allocator
[ "TLC", "FiniteSets" ]
allocator/SimpleAllocator.tla
TypeInvariant
null
available == Resources \ (UNION {alloc[c] : c \in Clients})
definition
allocator
[ "TLC", "FiniteSets" ]
allocator/SimpleAllocator.tla
available
null
Init == /\ unsat = [c \in Clients |-> {}] /\ alloc = [c \in Clients |-> {}]
definition
allocator
[ "TLC", "FiniteSets" ]
allocator/SimpleAllocator.tla
Init
null
Request(c,S) == /\ unsat[c] = {} /\ alloc[c] = {} /\ S # {} /\ unsat' = [unsat EXCEPT ![c] = S] /\ UNCHANGED alloc
definition
allocator
[ "TLC", "FiniteSets" ]
allocator/SimpleAllocator.tla
Request
null
Allocate(c,S) == /\ S # {} /\ S \subseteq available \cap unsat[c] /\ alloc' = [alloc EXCEPT ![c] = @ \cup S] /\ unsat' = [unsat EXCEPT ![c] = @ \ S]
definition
allocator
[ "TLC", "FiniteSets" ]
allocator/SimpleAllocator.tla
Allocate
null
Return(c,S) == /\ S # {} /\ S \subseteq alloc[c] /\ alloc' = [alloc EXCEPT ![c] = @ \ S] /\ UNCHANGED unsat
definition
allocator
[ "TLC", "FiniteSets" ]
allocator/SimpleAllocator.tla
Return
null
Next == \E c \in Clients, S \in SUBSET Resources : Request(c,S) \/ Allocate(c,S) \/ Return(c,S)
definition
allocator
[ "TLC", "FiniteSets" ]
allocator/SimpleAllocator.tla
Next
null
vars == <<unsat,alloc>>
definition
allocator
[ "TLC", "FiniteSets" ]
allocator/SimpleAllocator.tla
vars
null
SimpleAllocator == /\ Init /\ [][Next]_vars /\ \A c \in Clients: WF_vars(Return(c, alloc[c])) /\ \A c \in Clients: SF_vars(\E S \in SUBSET Resources: Allocate(c,S))
definition
allocator
[ "TLC", "FiniteSets" ]
allocator/SimpleAllocator.tla
SimpleAllocator
null
ResourceMutex == \A c1,c2 \in Clients : c1 # c2 => alloc[c1] \cap alloc[c2] = {}
definition
allocator
[ "TLC", "FiniteSets" ]
allocator/SimpleAllocator.tla
ResourceMutex
null
ClientsWillReturn == \A c \in Clients : unsat[c]={} ~> alloc[c]={}
definition
allocator
[ "TLC", "FiniteSets" ]
allocator/SimpleAllocator.tla
ClientsWillReturn
null
ClientsWillObtain == \A c \in Clients, r \in Resources : r \in unsat[c] ~> r \in alloc[c]
definition
allocator
[ "TLC", "FiniteSets" ]
allocator/SimpleAllocator.tla
ClientsWillObtain
null
InfOftenSatisfied == \A c \in Clients : []<>(unsat[c] = {})
definition
allocator
[ "TLC", "FiniteSets" ]
allocator/SimpleAllocator.tla
InfOftenSatisfied
null
Symmetry == Permutations(Clients) \cup Permutations(Resources)
definition
allocator
[ "TLC", "FiniteSets" ]
allocator/SimpleAllocator.tla
Symmetry
null
SimpleAllocator2 == /\ Init /\ [][Next]_vars /\ \A c \in Clients: WF_vars(unsat[c] = {} /\ Return(c, alloc[c])) /\ \A c \in Clients: SF_vars(\E S \in SUBSET Resources: Allocate(c,S))
definition
allocator
[ "TLC", "FiniteSets" ]
allocator/SimpleAllocator.tla
SimpleAllocator2
null
SimpleAllocator => []TypeInvariant
theorem
allocator
[ "TLC", "FiniteSets" ]
allocator/SimpleAllocator.tla
SimpleAllocator
null
SimpleAllocator => []ResourceMutex
theorem
allocator
[ "TLC", "FiniteSets" ]
allocator/SimpleAllocator.tla
SimpleAllocator
null
SimpleAllocator => ClientsWillReturn
theorem
allocator
[ "TLC", "FiniteSets" ]
allocator/SimpleAllocator.tla
SimpleAllocator
null
SimpleAllocator2 => ClientsWillReturn
theorem
allocator
[ "TLC", "FiniteSets" ]
allocator/SimpleAllocator.tla
SimpleAllocator2
null
SimpleAllocator => ClientsWillObtain
theorem
allocator
[ "TLC", "FiniteSets" ]
allocator/SimpleAllocator.tla
SimpleAllocator
null
SimpleAllocator => InfOftenSatisfied
theorem
allocator
[ "TLC", "FiniteSets" ]
allocator/SimpleAllocator.tla
SimpleAllocator
null
Procs == 1..N a \prec b == \/ a[1] < b[1] \/ (a[1] = b[1]) /\ (a[2] < b[2])
definition
Bakery-Boulangerie
[ "Naturals", "TLAPS" ]
Bakery-Boulangerie/Bakery.tla
Procs
null
vars == << num, flag, pc, unchecked, max, nxt >>
definition
Bakery-Boulangerie
[ "Naturals", "TLAPS" ]
Bakery-Boulangerie/Bakery.tla
vars
null
ProcSet == (Procs)
definition
Bakery-Boulangerie
[ "Naturals", "TLAPS" ]
Bakery-Boulangerie/Bakery.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] /\ pc = [self \in ProcSet |-> "ncs"]
definition
Bakery-Boulangerie
[ "Naturals", "TLAPS" ]
Bakery-Boulangerie/Bakery.tla
Init
null
ncs(self) == /\ pc[self] = "ncs" /\ pc' = [pc EXCEPT ![self] = "e1"] /\ UNCHANGED << num, flag, unchecked, max, nxt >>
definition
Bakery-Boulangerie
[ "Naturals", "TLAPS" ]
Bakery-Boulangerie/Bakery.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
[ "Naturals", "TLAPS" ]
Bakery-Boulangerie/Bakery.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
[ "Naturals", "TLAPS" ]
Bakery-Boulangerie/Bakery.tla
e2
null
e3(self) == /\ pc[self] = "e3" /\ \/ /\ \E k \in Nat: num' = [num EXCEPT ![self] = k] /\ pc' = [pc EXCEPT ![self] = "e3"] \/ /\ \E i \in {j \in Nat : j > max[self]}: num' = [num EXCEPT ![self] = i] /\ pc' = [pc ...
definition
Bakery-Boulangerie
[ "Naturals", "TLAPS" ]
Bakery-Boulangerie/Bakery.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] = Procs \...
definition
Bakery-Boulangerie
[ "Naturals", "TLAPS" ]
Bakery-Boulangerie/Bakery.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]] /\ pc' = [pc EXCEPT ![self] = "w2"] ELSE /\ pc' = [p...
definition
Bakery-Boulangerie
[ "Naturals", "TLAPS" ]
Bakery-Boulangerie/Bakery.tla
w1
null
w2(self) == /\ pc[self] = "w2" /\ \/ num[nxt[self]] = 0 \/ <<num[self], self>> \prec <<num[nxt[self]], nxt[self]>> /\ unchecked' = [unchecked EXCEPT ![self] = unchecked[self] \ {nxt[self]}] /\ pc' = [pc EXCEPT ![self] = "w1"] /\ UNCHANGED << num, flag, max,...
definition
Bakery-Boulangerie
[ "Naturals", "TLAPS" ]
Bakery-Boulangerie/Bakery.tla
w2
null
cs(self) == /\ pc[self] = "cs" /\ TRUE /\ pc' = [pc EXCEPT ![self] = "exit"] /\ UNCHANGED << num, flag, unchecked, max, nxt >>
definition
Bakery-Boulangerie
[ "Naturals", "TLAPS" ]
Bakery-Boulangerie/Bakery.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
[ "Naturals", "TLAPS" ]
Bakery-Boulangerie/Bakery.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
[ "Naturals", "TLAPS" ]
Bakery-Boulangerie/Bakery.tla
p
null
Next == (\E self \in Procs: p(self))
definition
Bakery-Boulangerie
[ "Naturals", "TLAPS" ]
Bakery-Boulangerie/Bakery.tla
Next
null
Spec == /\ Init /\ [][Next]_vars /\ \A self \in Procs : WF_vars((pc[self] # "ncs") /\ p(self))
definition
Bakery-Boulangerie
[ "Naturals", "TLAPS" ]
Bakery-Boulangerie/Bakery.tla
Spec
null
MutualExclusion == \A i,j \in Procs : (i # j) => ~ /\ pc[i] = "cs" /\ pc[j] = "cs"
definition
Bakery-Boulangerie
[ "Naturals", "TLAPS" ]
Bakery-Boulangerie/Bakery.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
[ "Naturals", "TLAPS" ]
Bakery-Boulangerie/Bakery.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] \/ /\ pc[j] = "e3" /\ max[j] >= num[i] \/ /\ pc[j] \in...
definition
Bakery-Boulangerie
[ "Naturals", "TLAPS" ]
Bakery-Boulangerie/Bakery.tla
Before
null
IInv == \A i \in Procs : /\ (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 {"w1", "w2"} => i \notin unchecked[i] /\ (pc[i] \in {"w1", "w2"}) => \A j \in ...
definition
Bakery-Boulangerie
[ "Naturals", "TLAPS" ]
Bakery-Boulangerie/Bakery.tla
IInv
null
Inv == TypeOK /\ IInv
definition
Bakery-Boulangerie
[ "Naturals", "TLAPS" ]
Bakery-Boulangerie/Bakery.tla
Inv
null
Trying(i) == pc[i] = "e1"
definition
Bakery-Boulangerie
[ "Naturals", "TLAPS" ]
Bakery-Boulangerie/Bakery.tla
Trying
null
InCS(i) == pc[i] = "cs"
definition
Bakery-Boulangerie
[ "Naturals", "TLAPS" ]
Bakery-Boulangerie/Bakery.tla
InCS
null