|
1 | 1 | ---------------- MODULE MC_Vortex_DSE_CSlot_AE ---------------- |
2 | | -(* Apalache harness for Vortex_DSE_CSlot_AE. *) |
3 | | -(* Fixes constants and bundles the safety invariants for a single *) |
4 | | -(* symbolic (SMT-backed) check via Apalache. *) |
5 | | - |
| 2 | +(***************************************************************************) |
| 3 | +(* Harness for Vortex_DSE_CSlot_AE, used by both TLC and Apalache. *) |
| 4 | +(* *) |
| 5 | +(* The specification has no slot horizon; NextCslot advances without bound *) |
| 6 | +(* and DuplicateInject may forge any slot in Nat. The horizon is a *) |
| 7 | +(* model-checking concern and is imposed here inside the actions, not as a *) |
| 8 | +(* CONSTRAINT, so no successor state is discarded while temporal properties *) |
| 9 | +(* are checked. *) |
| 10 | +(* *) |
| 11 | +(* Invariants are deliberately left separate rather than bundled into one *) |
| 12 | +(* conjunction, so that a checker reports which one was violated. *) |
| 13 | +(***************************************************************************) |
6 | 14 | EXTENDS Vortex_DSE_CSlot_AE |
7 | 15 |
|
| 16 | +CONSTANT MaxSlot |
| 17 | + |
| 18 | +Slots == 0..MaxSlot |
| 19 | + |
| 20 | +MCNextCslot == |
| 21 | + /\ current_slot < MaxSlot |
| 22 | + /\ NextCslot |
| 23 | + |
| 24 | +MCNext == |
| 25 | + \/ \E id \in MsgIDs : Submit(id) |
| 26 | + \/ \E n \in Nodes, m \in network : Process(n, m) |
| 27 | + \/ \E n \in Nodes : Freeze(n) |
| 28 | + \/ Reconcile |
| 29 | + \/ \E id \in MsgIDs, k \in Slots : DuplicateInject(id, k) |
| 30 | + \/ MCNextCslot |
| 31 | + |
| 32 | +MCSpec == Init /\ [][MCNext]_vars |
| 33 | + |
| 34 | +MCFairness == |
| 35 | + /\ SF_vars(Reconcile) |
| 36 | + /\ SF_vars(MCNextCslot) |
| 37 | + /\ \A n \in Nodes : WF_vars(Freeze(n)) |
| 38 | + |
| 39 | +MCLiveSpec == Init /\ [][MCNext]_vars /\ MCFairness |
| 40 | + |
| 41 | +MCTypeInvariant == |
| 42 | + /\ TypeInvariant |
| 43 | + /\ current_slot \in Slots |
| 44 | + /\ \A m \in network : m.cslot \in Slots |
| 45 | + |
| 46 | +\* Apalache entry point: constants fixed symbolically. |
8 | 47 | ConstInit == |
9 | 48 | /\ Nodes = {"n1", "n2"} |
10 | 49 | /\ MsgIDs = {"a", "b"} |
11 | 50 | /\ MaxSlot = 1 |
12 | 51 |
|
13 | | -\* Conjunction of every safety invariant in the module. |
14 | | -AllInv == |
15 | | - /\ TypeInvariant |
16 | | - /\ MerkleAgreement |
17 | | - /\ CommittedSupersetsProcessed |
18 | | - /\ NoPhantomInCommitted |
19 | | - /\ NoReorderAcrossCslot |
20 | | - /\ PhaseProgressionValid |
21 | | - |
22 | 52 | =============================================================== |
0 commit comments