A Tour of Temporal Typing Refinement & Models · 3/5
Refinement & Models · Page 3 of 5

Symmetry, Constraints & Slicing

Real state spaces grow exponentially with the number of nodes or processes. Model gives you four precision tools to keep checking fast and sound:

  • Symmetry(S): tells the checker that permuting a set of ModelValues maps behaviours to behaviours (TLC's SYMMETRY), collapsing symmetric states into one. Because symmetry reduction is unsound for liveness, it is automatically dropped (with a symmetry-dropped warning) when a model checks any Property or Refines.
  • Slicing: pass actions=(...), invariants=(...), or properties=() to check a subset by name — e.g., a fast safety-only model with Symmetry alongside a full liveness model!
  • state_constraint / action_constraint: bound otherwise-infinite state spaces (verdicts explicitly note the constraint).
  • check_deadlock=False: allow valid terminating states.
Try it: Click Check to compare full_model (8 states) against safety_model (4 states under symmetry!). Now delete properties=(), from safety_model and click Check to see the WARN [symmetry-dropped] diagnostic!
Click Check (or press Shift+Enter) to run the front-end and check this specification. Switch to TLA⁺ to view its TLA⁺ meaning.
---- MODULE Cluster ----
CONSTANT nodes
VARIABLE ready

Init == ready = {}
Join(n) == n \notin ready /\ ready' = ready \cup {n}
Next == \E n \in nodes : Join(n)

\* full_model: 2^3 = 8 states
\* safety_model (SYMMETRY Permutations(nodes)): 4 states (sizes 0, 1, 2, 3)
====