Reference

Reference

Contents

Operators

ASCII, typeset and spoken reading
ASCIITypesetRead aloud as
/\∧and
\/∨or
~¬not
=>⇒implies
<=>⇔if and only if
==≜is defined as
\in∈in
\notin∉not in
#≠not equal to
/=≠not equal to
<=≤less than or equal to
=<≤less than or equal to
>=≥greater than or equal to
\A∀for all
\E∃there exists
\AA∀∀for all, temporally
\EE∃∃there exists, temporally
'′prime
[]□always
<>◇eventually
~>⇝leads to
-+->⇸guarantees while
\cup∪union
\union∪union
\cap∩intersection
\intersect∩intersection
\subseteq⊆subset of or equal to
\subset⊂proper subset of
\supseteq⊇superset of or equal to
\∖set minus
\X×cross
\times×cross
|->↦maps to
->→to
<<⟨tuple of
>>⟩end tuple
\o∘concatenated with
\circ∘concatenated with
\div÷integer divided by
\cdot·composed with
\land∧and
\lor∨or
\lnot¬not
\neg¬not
\equiv≡is equivalent to
\leq≤less than or equal to
\geq≥greater than or equal to

TLC output

Every line quoted here was printed by the pinned TLC jar. Letters such as N stand for numbers that change from model to model; the course never asks you to remember them.

TLC printsWhat it means
Model checking completed. No error has been found.TLC explored every reachable state of this one finite model and none broke a configured check. It says nothing about checks you did not configure, or about bigger models.
N states generated, M distinct states found, K states left on queue.Generated counts every successor TLC computed, repeats included. Distinct counts the different states it found. Left on queue is work not yet done when TLC stopped, often because it found a violation.
The depth of the complete state graph search is D.The number of breadth-first levels TLC explored, with the initial states as the first level.
Error: Invariant NeverFive is violated.Some reachable state makes the invariant false. The trace that follows leads to that state.
Error: Temporal property Reach was violated.Some behavior allowed by the spec breaks the property. The counterexample is usually a lasso.
State 1: <Initial predicate>The first state of a trace. TLC numbers states from 1.
Back to state 2: <Wrap ...>The end of a lasso: the action named here leads back to an earlier state, and the behavior loops from there forever.
State 6: StutteringThe end of a lasso in which the behavior stops changing and repeats its last state forever.
Error: Deadlock reached.A reachable state in which no Next step is possible. Deadlock is a report TLC makes, not part of the logic: a stuttering step is always allowed.
Error: Successor state is not completely specified by action Bad of the next-state relation. The following variable is not defined: y.An action did not say what the named variable becomes. In the math it could become anything; TLC refuses to guess.
Error: The constant parameter Big is not assigned a value by the configuration file.The module declares a constant that the .cfg never sets.
[] followed by action not of form [A]_v.SANY rejects a box applied to an action without a subscript.

Glossary

Action
A formula about a step. Unprimed variables refer to the state before, primed variables to the state after. Taught in 02-01 Primes
Behavior
An infinite sequence of states. A program that halts is modelled by its last state repeating forever. Taught in 01-03 Behaviors are infinite
Counterexample
A trace that TLC prints to show how a check fails. Taught in 03-02 Your first counterexample
Deadlock
A reachable state in which no Next step is possible. TLC reports it unless the .cfg turns the check off. Taught in 06-05 Deadlock as TLC reports it
Depth
The number of breadth-first levels TLC explored, with the initial states as the first level. Taught in 03-04 Reading the numbers
Distinct states
The number of different states TLC found. Generated states also count repeats. Taught in 03-04 Reading the numbers
Frame condition
The part of an action that says which variables stay the same, usually written with UNCHANGED. Taught in 02-02 UNCHANGED and the frame
Inductive invariant
An invariant that holds initially and is preserved by every step from any state that satisfies it, reachable or not. Taught in 12-05 Reachable versus inductive
Interleaving
One ordering of the atomic steps of several processes. A concurrent system's behaviors include every interleaving the spec allows. Taught in 06-01 Productive failure
Invariant
A state predicate that should hold in every reachable state. TLC checks the ones listed under INVARIANT in the .cfg. Taught in 03-02 Your first counterexample
Lasso
A finite path that ends by looping back into itself. It is how an infinite behavior fits inside a finite state graph. Taught in 01-03 Behaviors are infinite
Liveness property
A property that no finite prefix can refute: something good eventually happens. Taught in 09-01 The prefix judge
Model value
A constant that TLC treats as an uninterpreted value, equal only to itself. Taught in 05-05 Constants and model values
Mutant
A copy of a spec with one deliberate change. A good property set catches it. Taught in 00-04 How this course works
PlusCal
An algorithm language that translates to TLA+. Labels mark the atomic steps. Taught in 07-01 Read the translation first
Refinement mapping
Definitions of the abstract spec's variables in terms of the detailed spec's variables, used to check that the detailed spec implements the abstract one. Taught in 11-03 Refinement mappings
Safety property
A property that a finite prefix of a behavior can refute: something bad never happens. Taught in 09-01 The prefix judge
SANY
The TLA+ parser and semantic checker. It catches syntax and scoping errors before TLC runs. Taught in 03-01 One command
State
An assignment of a value to every variable of the spec. Nothing in it is special, not even a program counter. Taught in 01-01 A state is a snapshot
Step
A pair of states: the one before and the one after. Taught in 01-02 Steps and the state graph
Strong fairness
An assumption that an action that is enabled again and again eventually takes a step, even if it is disabled in between. Taught in 10-03 When WF is not enough
Stuttering step
A step that leaves the variables in the subscript unchanged. Every spec of the form Init /\ [][Next]_vars allows them. Taught in 04-02 Stuttering steps
Symmetry set
A set of model values TLC may permute to skip equivalent states. It can hide bugs, and it can make liveness checking unsound. Taught in 12-03 Symmetry and its traps
TLC
The explicit-state model checker. It explores the reachable states of one finite model. Taught in 03-01 One command
Trace validation
Checking that a log of a real run is a behavior the spec allows. Taught in 14-02 TraceSpec
TypeOK
An ordinary invariant that states the set each variable ranges over. TLA+ itself is untyped. Taught in 03-05 TypeOK, and the check you didn't configure
Weak fairness
An assumption that an action that stays enabled forever eventually takes a step. Taught in 10-02 Weak fairness from a starvation trace
Witness
A state you expect to be reachable. Checking that its negation is violated shows the model can get there, so a passing check is not passing by doing nothing. Taught in 03-03 Break it on purpose

Misconceptions

  1. M1 An action is an equation about two states, not an assignment. Conjunct order matters to TLC but not to the logic. 02-01, 02-04
  2. M2 Behaviors are infinite; termination is a final state repeating forever. 01-03
  3. M3 The state graph is not the set of behaviors. A lasso is how an infinite behavior fits in a finite graph. 01-03
  4. M4 In the math, an unmentioned primed variable can become anything. TLC refuses to run with "successor state is not completely specified". 02-02
  5. M5 TLA, the temporal logic, is not the same thing as TLA+, the language built on it. 04-01
  6. M6 A stuttering step leaves the subscript's variables unchanged, not the whole universe. 04-02
  7. M7 []Next with an action Next is not well-formed. SANY rejects it. 04-03
  8. M8 TLC does not prove a property. It found no violation in one finite model. 03-05
  9. M9 TLA+ is untyped; TypeOK is an ordinary invariant. 05-05
  10. M10 Deadlock is a TLC report, not part of the logic. 06-05, 07-01
  11. M11 Safety and liveness have precise definitions: refutable by a finite prefix, or never refutable by one. 09-01
  12. M12 PROPERTY P with a state predicate P and no [] checks only the initial states. 09-03
  13. M13 WF and SF are defined over <<A>>_v and ENABLED <<A>>_v. 10-02, 10-03
  14. M14 Fairness on subactions of Next can hide liveness bugs, never safety bugs. 10-04
  15. M15 Loss is free in a message set until fairness on Receive forbids it; then you need an explicit Lose action. 08-02, 10-05
  16. M16 Refinement is substitution plus implication; it may need auxiliary variables, and fairness does not carry over by itself. 11-03, 11-05
  17. M17 Symmetry reduction can make liveness checking unsound. 12-03
  18. M18 An invariant is not necessarily an inductive invariant. 12-05

AI taxonomy

Every AI fixture in the course carries one of these tags. Lesson 15-01, How plausible specs fail, gives one example of each and the check that usually reveals it.

  • hallucinated-operator
  • missing-enabling-condition
  • missing-frame
  • wrong-fairness
  • vacuous-property
  • over-constrained-init
  • stuttering-blind
  • type-only-invariant
  • refinement-mapping-wrong
  • assumes-fifo
  • unbounded-model
  • model-too-small
  • deadlock-masked
  • property-not-configured
  • constraint-hides-bug
  • symmetry-unsound
  • overclaimed-evidence
  • spec-gaming
  • correct

Evidence

This table is the one canonical source for what each kind of evidence covers. Every "What this run did not show" box in the course draws on it.

MethodWhat it coversBound it leaves
TLC BFSevery reachable state of one finite modelconstants, constraints, symmetry
TLC simulationsampled behaviorscoverage (unknown)
Apalachesymbolic, boundedbehavior length, data types
TLAPSunbounded proof of what is statednone in the claim, but high effort and the spec may still be wrong
Trace validationobserved runs conform to the speconly the runs and logged variables observed