A state-machine based programming language for formally modeling and systematically checking the correctness of distributed systems.
aidenybai/tla-ts
A TypeScript implementation of the TLA+ interpreter and model checker, a drop-in replacement for the Java-based TLC that runs in browsers, Node, and Bun.
Open-source alternative to:TLC
- Stars
- 232
- Forks
- 9
- Open issues
- 9
- Last commit
- 2 days ago
What is it?
tla-ts is a TLA+ interpreter and model checker written in TypeScript. It is meant as a drop-in replacement for TLC, the reference model checker for TLA+ specifications, which is written in Java and requires the JVM. Because tla-ts runs wherever JavaScript runs, including the browser, Node, and Bun, formal models can be checked without a Java installation.
The project also checks TLAPS proofs, so proof obligations can be verified without installing tlapm. It exposes a JavaScript API with `check`, `prove`, `parseModule`, and `parseConfig`, plus a command line that accepts TLC's options and a tlapm-style interface. Errors are reported through typed classes for syntax, configuration, evaluation, and unsupported constructs.
The repository reports benchmarks against TLC, with speedups of roughly 1.1× to 2.4× depending on the spec and worker count. It includes a browser playground and a conformance suite compared against TLC's recorded results.
Key features
- 01Runs TLA+ model checking in browsers, Node, and Bun without the JVM.
- 02Checks TLAPS proof obligations without installing tlapm.
- 03Provides `check`, `prove`, and parser functions in a JavaScript API.
- 04Ships a command line that accepts TLC options and tlapm-style commands.
- 05Supports multiple worker threads for parallel state exploration.
Use cases
- Model checking distributed protocol specs from a Node or browser environment.
- Running TLA+ checks in a JavaScript-based CI pipeline without a Java setup.
- Sharing an interactive TLA+ playground in the browser for teaching or demos.
- Checking TLAPS proofs in projects that already use a Node toolchain.
Quick start
- 1
Install the package from npm
npm install tla-ts - 2
Check a TLA+ spec from the command line
npx tla-ts Spec.tla
Things to know
- Early-stage project with a relatively small community (191 stars).
Topics
FAQ
- What is tla-ts?
- A TypeScript implementation of the TLA+ interpreter and model checker, a drop-in replacement for the Java-based TLC that runs in browsers, Node, and Bun. tla-ts is a TLA+ interpreter and model checker written in TypeScript. It is meant as a drop-in replacement for TLC, the reference model checker for TLA+ specifications, which is written in Java and requires the JVM. Because tla-ts runs wherever JavaScript runs, including the browser, Node, and Bun, formal models can be checked without a Java installation.
- Is tla-ts free to use? What license does it have?
- tla-ts is open source under the MIT license. Check the license terms before using it in commercial products.
- Is tla-ts still maintained?
- Actively maintained. The last commit to tla-ts was on Nov 5, 2026.
- What can I use tla-ts for?
- Model checking distributed protocol specs from a Node or browser environment. Running TLA+ checks in a JavaScript-based CI pipeline without a Java setup. Sharing an interactive TLA+ playground in the browser for teaching or demos. Checking TLAPS proofs in projects that already use a Node toolchain.
- How do I install tla-ts?
- Install the package from npm: npm install tla-ts Check a TLA+ spec from the command line: npx tla-ts Spec.tla
- Where can I get tla-ts?
- The source code and installation instructions are on GitHub: https://github.com/aidenybai/tla-ts
Summary generated by AI from the project's README. GitHub stats refresh daily.
Related projects
A programming language that uses laws and proofs to make AI-written code verifiable, and compiles to fast parallel CPU and GPU code.
LLM-powered proof automation for the Lean theorem prover, offering tactic suggestions, proof search and premise selection.
A Lean 4 framework for specifying, executing, and formally verifying neural networks, with shape-checked tensors and PyTorch-style training.
A Lean 4 framework for machine-checked proofs of correctness and memory safety against compiled .NET CIL from C#, F#, and other .NET languages.
A Lean 4 formalization of the Stacks Project, the open-source algebraic geometry reference, built on Mathlib with machine-checked proofs.