Skip to content

Commit 89a796b

Browse files
final touches
Signed-off-by: Stephan Merz <stephan.merz@loria.fr>
1 parent 535c498 commit 89a796b

5 files changed

Lines changed: 11 additions & 22 deletions

File tree

specifications/ewd687a/EWD687a.tla

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -377,13 +377,13 @@ RcvMsg(p) == \E e \in InEdges(p) :
377377
/\ UNCHANGED <<acks, sentUnacked>>
378378

379379
(***************************************************************************)
380-
(* A process p may finish its computation and become idle at any time. *)
380+
(* An active process p may become idle at any time. *)
381381
(* *)
382-
(* If a non-leader process p is neutral after an idle step, it implies *)
383-
(* that p was not a node of the overlay tree when it became idle. Thus, *)
384-
(* there is no need to change upEdge[p] in the Idle subaction. *)
382+
(* Since p is active before the step, it must be a node of the overlay *)
383+
(* tree. If it is a leaf, it can be removed from the tree in a subsequent *)
384+
(* SendAck transition. *)
385385
(***************************************************************************)
386-
Idle(p) == /\ active[p] \* otherwise this step is subsumed by stuttering
386+
Idle(p) == /\ active[p]
387387
/\ active' = [active EXCEPT ![p] = FALSE]
388388
/\ UNCHANGED <<msgs, acks, sentUnacked, rcvdUnacked, upEdge>>
389389

@@ -419,9 +419,7 @@ THEOREM Spec => []CountersConsistent
419419

420420
TreeWithRoot ==
421421
LET E == {upEdge[p] : p \in DOMAIN upEdge} \ {NotAnEdge}
422-
\* The original definition includes every node occurring in the tree
423-
\* twice (except the leader), which unnecessarily complicates the proof.
424-
N == (* {e[1] : e \in E} \cup *) {e[2] : e \in E} \cup {Leader}
422+
N == {e[2] : e \in E} \cup {Leader}
425423
O == Transpose([edge |-> E, node |-> N])
426424
IN \* O is a tree rooted in the leader.
427425
/\ IsTreeWithRoot(O, Leader)

specifications/ewd687a/EWD687a_anim.cfg

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,3 @@ ALIAS
3535
CHECK_DEADLOCK
3636
FALSE
3737

38-
ACTION_CONSTRAINT
39-
NoSuperfluousIdleSteps
40-

specifications/ewd687a/EWD687a_anim.tla

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -160,11 +160,6 @@ InterestingBehavior ==
160160
\* 30 states with the Leader neutral in the final state.
161161
TLCGet("level") > 20 => ~neutral(Leader)
162162

163-
NoSuperfluousIdleSteps ==
164-
\* Disable Idle steps that leave the variables unchange (an idle process becoming idle)
165-
\* to prevent finite stuttering when simulating.
166-
~UNCHANGED vars
167-
168163
----------------------------------------------------------------------------
169164

170165
\* Processes.

specifications/ewd687a/MCEWD687a.cfg

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
CONSTANTS
22
\* model values for processes
3-
L = L
3+
Leader = Leader
44
P1 = P1
55
P2 = P2
66
P3 = P3
77
MaxCounter = 3
8-
Leader = L
98
Procs <- MCProcs
109
Edges <- MCEdges
1110

specifications/ewd687a/MCEWD687a.tla

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
EXTENDS EWD687a, TLC
33

44
CONSTANTS
5-
L, P1, P2, P3, \* constants representing the processes in the MC instance
6-
MaxCounter \* bound on counter values
5+
P1, P2, P3, \* constants representing the non-leader processes in the MC instance
6+
MaxCounter \* bound on counter values
77

8-
MCProcs == {L, P1, P2, P3}
8+
MCProcs == {Leader, P1, P2, P3}
99
MCEdges ==
10-
{<<L, P1>>, <<P1, P2>>, <<P1, P2>>, <<P2, P1>>, <<P2,P3>>}
10+
{<<Leader, P1>>, <<P1, P2>>, <<P1, P2>>, <<P2, P1>>, <<P2,P3>>}
1111

1212
StateConstraint == \A e \in Edges :
1313
/\ msgs[e] < MaxCounter

0 commit comments

Comments
 (0)