TLAiser extracts state machine specifications from existing code and model-checks them with TLA+/PlusCal โ catching concurrency bugs that no amount of testing finds.
TLA+ (Temporal Logic of Actions, by Leslie Lamport) is the gold standard for specifying and verifying concurrent and distributed systems. PlusCal is its imperative-style front-end that compiles to TLA+. The TLC model checker exhaustively explores all possible states to find invariant violations and liveness failures.
Amazon, Microsoft, and Intel use TLA+ internally to verify distributed systems. TLAiser brings this power to everyone โ you describe your system, TLAiser generates the spec and runs the checker.
Source Code TLA+ Spec TLC Model Checker
โ โ โ
โผ โผ โผ
โโโโโโโโโโโโ extract โโโโโโโโโโโโ generate โโโโโโโโโโโโ
โ Your code โ โโโโโโโโโบ โ State โ โโโโโโโโโบ โ TLA+/ โ
โ or TOML โ โ Machine โ โ PlusCal โ
โ manifest โ โ Model โ โ Spec โ
โโโโโโโโโโโโ โโโโโโโโโโโโ โโโโโโโโโโโโ
โ
โผ model-check
โโโโโโโโโโโโ
โ TLC โ
โ Checker โ
โโโโโโโโโโโโ
โ
โผ
โโโโโโโโโโโโ
โ Invariantโ
โ Violationโ
โ Report โ
โโโโโโโโโโโโTLAiser leverages the full power of TLA+ temporal logic:
-
โก (Always) โ safety properties: "bad things never happen" (e.g., no deadlock, no data corruption, mutual exclusion holds)
-
โ (Eventually) โ liveness properties: "good things eventually happen" (e.g., every request gets a response, every lock is eventually released)
-
โ (Leads-to) โ temporal ordering: "if A happens, B eventually follows" (e.g., if a message is sent, it is eventually delivered)
-
Fairness conditions โ weak/strong fairness constraints that prevent unrealistic infinite stuttering of enabled actions
-
Catch distributed systems bugs before production โ deadlocks, race conditions, protocol violations, split-brain scenarios
-
Exhaustive verification โ TLC checks ALL possible interleavings, not just the ones your tests happen to exercise
-
Counterexample traces โ when a violation is found, TLAiser shows exactly the sequence of steps that triggers the bug
-
Safety + Liveness โ verify both that bad things never happen AND that good things eventually do
-
Distributed protocol verification โ Raft, Paxos, 2PC, custom consensus
-
Database transaction isolation โ verify serialisability, snapshot isolation, read-committed guarantees under concurrent transactions
-
Consensus algorithm validation โ prove agreement, validity, and termination properties before implementation
-
Microservice choreography checking โ verify saga patterns, event-driven workflows, and distributed state machines for deadlock-freedom
-
Lock-free data structure verification โ prove linearisability of concurrent algorithms
Describe your systemโs state transitions in tlaiser.toml. TLAiser:
-
Extracts state machine models from your code (or from the manifest)
-
Generates TLA+ specifications with safety and liveness properties
-
Runs the TLC model checker to exhaustively verify all reachable states
-
Reports violations with concrete counterexample traces
# tlaiser.toml โ example: distributed lock service
[workload]
name = "distributed-lock"
entry = "src/lock_service.rs::LockStateMachine"
strategy = "state-extraction"
[data]
input-type = "LockRequest"
output-type = "LockGrant | LockDenied | LockTimeout"
[properties]
safety = ["MutualExclusion", "NoDeadlock"]
liveness = ["EventualAccess"]
fairness = "weak"
[model]
processes = 3
max-steps = 50Follows the hyperpolymath -iser pattern (same as Chapeliser):
-
Manifest (
tlaiser.toml) โ describe WHAT you want to verify -
Idris2 ABI (
src/interface/abi/) โ formal proofs: state machine types, temporal formulae, model check results all verified at compile time -
Zig FFI (
src/interface/ffi/) โ C-ABI bridge to TLC runtime and state extraction engine -
Codegen (
src/codegen/) โ generates TLA+/PlusCal specifications from extracted state machines -
Rust CLI โ parses manifest, extracts state machines, generates specs, invokes TLC, reports results
User writes zero TLA+. TLAiser generates everything.
Part of the -iser family of acceleration frameworks.
# Initialise a manifest in your project
tlaiser init
# Edit tlaiser.toml to describe your state machine
# Generate TLA+ specs and run TLC
tlaiser generate
tlaiser run
# Or all at once
tlaiser build && tlaiser run