TLA+ is the Temporal Logic of Actions — a mathematical language for describing concurrent and distributed systems. TLC is its model checker, which explores every reachable state of your specification and proves properties hold — or hands you the exact counterexample that breaks them.
A specification language built on mathematical logic. You write what the system is — its initial state, its allowed steps, and the fairness conditions that guarantee progress — not how to implement it. A spec is a single logical formula.
An explicit-state model checker. TLC enumerates the spec's reachable state space and checks invariants, temporal properties, and deadlock-freedom against it. When a property fails, it produces a reproducible error trace — a concrete sequence of states leading to the violation.
TLA+ describes the system; TLC verifies it. The loop is fast — minutes, not days — so you catch design errors before a line of implementation exists.
Concurrency bugs are the expensive ones: race conditions, lost updates, split-brain, deadlock. They hide in the interleavings that tests never exercise. A model checker exhausts all interleavings.
TLC checks the entire reachable state space, not a sample of paths. If a property holds, it holds for every reachable behavior.
Design errors found in the spec cost minutes to repair. The same error found in production can cost outages and weeks of debugging.
Ambiguity in a design doc becomes a machine-checked formula. The spec is the design, and it's executable.
Formal methods left academia when large systems started depending on them. TLA+ is the most widely used formal specification language in industry.
AWS's engineers have documented finding subtle bugs in production algorithms — including one in DynamoDB — that TLA+ model checking then confirmed and fixed.
| Property | Question it answers | Violation looks like |
|---|---|---|
| Safety | What may the system do? | A reachable state that breaks an invariant |
| Liveness | What must the system eventually do? | An infinite stuttering behavior that never makes progress |
The standard workflow: write the spec in TLA+ (or the PlusCal algorithm language), model-check it with TLC via the TLA+ Toolbox or the VS Code extension. Explore the pages below for the theory and a worked example.
Learn more: tlapl.us · Lamport's TLA+ page · github.com/tlaplus