freshcrate
Skin:/
Home > Uncategorized > tlaiser

tlaiser

Extract state machines from code and model-check with TLA+/PlusCal

Why this rank:Recent releaseHealthy release cadenceStrong adoption

Description

Extract state machines from code and model-check with TLA+/PlusCal

README

Tlaiser

What Is This?

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.

Pipeline

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  โ”‚
                                               โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

TLA+ Concepts

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

Key Value

  • 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

Use Cases

  • 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

How It Works

Describe your systemโ€™s state transitions in tlaiser.toml. TLAiser:

  1. Extracts state machine models from your code (or from the manifest)

  2. Generates TLA+ specifications with safety and liveness properties

  3. Runs the TLC model checker to exhaustively verify all reachable states

  4. 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 = 50

Architecture

Follows 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.

Quick Start

# 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

Status

Pre-alpha. Architecture defined, scaffolding in place, codegen pending.

License

SPDX-License-Identifier: PMPL-1.0-or-later

Release History

VersionChangesUrgencyDate
main@2026-06-02Latest activity on main branchHigh6/2/2026
0.0.0No release found โ€” using repo HEADHigh4/11/2026

Dependencies & License Audit

Loading dependencies...

Similar Packages

ponyiserWrap concurrent code in Pony reference capabilities for data-race freedommain@2026-06-02
oblibeniserMake operations reversible and auditable via Oblรญbenรฝmain@2026-06-02
typedqliserAdd formal type safety (10 levels, dependent/linear/session types) to any query language โ€” SQL, GraphQL, Cypher, SPARQL, VQLmain@2026-06-02
verisimiserAugment any database with VeriSimDB octad capabilities โ€” drift detection, provenance, temporal versioning, modality overlaysmain@2026-06-02
phronesiserAdd provably safe ethical constraints to AI agents via Phronesismain@2026-06-02

More from hyperpolymath

verisimiserAugment any database with VeriSimDB octad capabilities โ€” drift detection, provenance, temporal versioning, modality overlays
ponyiserWrap concurrent code in Pony reference capabilities for data-race freedom
phronesiserAdd provably safe ethical constraints to AI agents via Phronesis
otpiserGenerate OTP supervision trees and fault-tolerance scaffolding

More in Uncategorized

llama.cppLLM inference in C/C++
modal-clientSDK libraries for Modal
anolisaANOLISA - Agentic Nexus Operating Layer & Interface System Architecture