Skip to content

Commit 92cf6dd

Browse files
lemmyclaude
andcommitted
Name unnamed ASSUMEs in three example specifications
Give the existing top-level `ASSUME` blocks a name so that downstream TLAPS proofs can cite them by reference instead of restating the conjuncts. The conjuncts themselves are preserved verbatim, so the specifications and their TLC checks are unchanged. Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com> Signed-off-by: Markus Alexander Kuppe <github.com@lemmster.de>
1 parent 82bc012 commit 92cf6dd

7 files changed

Lines changed: 10 additions & 7 deletions

File tree

specifications/CigaretteSmokers/CigaretteSmokers.tla

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ VARIABLE smokers, dealer
1414
(* {matches, paper, tobacco}. 'Offers' is a subset of subsets of *)
1515
(* ingredients, each missing just one ingredient *)
1616
(***************************************************************************)
17-
ASSUME /\ Offers \subseteq (SUBSET Ingredients)
17+
ASSUME OffersAssumption ==
18+
/\ Offers \subseteq (SUBSET Ingredients)
1819
/\ \A n \in Offers : Cardinality(n) = Cardinality(Ingredients) - 1
1920

2021
(***************************************************************************)

specifications/CoffeeCan/CoffeeCan.tla

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ EXTENDS Naturals
3939

4040
CONSTANT MaxBeanCount
4141

42-
ASSUME MaxBeanCount \in Nat /\ MaxBeanCount >= 1
42+
ASSUME MaxBeanFact == MaxBeanCount \in Nat /\ MaxBeanCount >= 1
4343

4444
VARIABLES can
4545

specifications/PaxosHowToWinATuringAward/Voting.tla

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ CONSTANTS Value, Acceptor, Quorum
2525
(* element (an acceptor) in common. Think of a quorum as a set consisting *)
2626
(* of a majority (more than half) of the acceptors. *)
2727
(***************************************************************************)
28-
ASSUME /\ \A Q \in Quorum : Q \subseteq Acceptor
28+
ASSUME QuorumAssumption ==
29+
/\ \A Q \in Quorum : Q \subseteq Acceptor
2930
/\ \A Q1, Q2 \in Quorum : Q1 \cap Q2 /= {}
3031

3132
(***************************************************************************)

specifications/allocator/SchedulingAllocator.tla

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ CONSTANTS
1818
Clients, \* set of all clients
1919
Resources \* set of all resources
2020

21-
ASSUME
21+
ASSUME SchedulingAllocatorAssumptions ==
2222
IsFiniteSet(Resources)
2323

2424
VARIABLES

specifications/ewd687a/EWD687a.tla

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,8 @@ OutEdges(p) == {e \in Edges : e[1] = p}
123123
(* something that was not stated explicitly: that a process can't send *)
124124
(* messages to itself, so an edge joins two different processes. *)
125125
(***************************************************************************)
126-
ASSUME /\ \* Every edge is a pair of distinct processes
126+
ASSUME EdgeFacts ==
127+
/\ \* Every edge is a pair of distinct processes
127128
\A e \in Edges :
128129
/\ (e \in Procs \X Procs)
129130
/\ (e[1] # e[2])

specifications/spanning/spanning.tla

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
------------------------------ MODULE spanning ------------------------------
22
EXTENDS Integers
33
CONSTANTS Proc, NoPrnt, root, nbrs
4-
ASSUME NoPrnt \notin Proc /\ nbrs \subseteq Proc \times Proc
4+
ASSUME NoPrntFact == NoPrnt \notin Proc /\ nbrs \subseteq Proc \times Proc
55
VARIABLES prnt, rpt, msg
66
vars == <<prnt, rpt, msg>>
77

specifications/transaction_commit/PaxosCommit.tla

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ CONSTANT RM, \* The set of resource managers.
4444
Majority, \* The set of majorities of acceptors
4545
Ballot \* The set of ballot numbers
4646

47-
ASSUME \* We assume these properties of the declared constants.
47+
ASSUME PaxosCommitAssumptions == \* We assume these properties of the declared constants.
4848
/\ Ballot \subseteq Nat
4949
/\ 0 \in Ballot
5050
/\ Majority \subseteq SUBSET Acceptor

0 commit comments

Comments
 (0)