Roadmap
Manyan aims to be the TLC people run every day. It should give the same answers and the same output, start instantly, need nothing installed, and be easy to embed. It is not a new model checker with its own semantics, a proof checker (TLAPS) or a symbolic one (Apalache).
The goals come in order. A later goal never costs an earlier one.
1. Same as TLC
Every other goal relies on people trusting a result from Manyan as much as one from TLC.
- Run the specs of tlaplus/Examples
against TLC (
make full-bench) and publish how many give identical output (full benchmark). Each spec that differs becomes a test intests/spec, then a fix. The goal is all of them. - Check and pass tlaplus/ValidationTestSuite,
TLC's qualification suite for ISO 26262 and other safety-critical use:
tests made from pairwise combinations of over 100 features of a subset
of TLA⁺. Run what it generates with Manyan in TLC's place, with one
worker, two and all, and with
-symbolicin Apalache's, and publish how many pass, as the full benchmark does. Each difference becomes a test intests/spec, then a fix, but for those itsexplanation.yamlaccepts of TLC. It pins TLC 1.7.2, where the oracle is 1.8.0. - The manual lists the gaps left by decision,
each with its reason; one is reopened when a specification needs it.
Its known gaps are to be closed. Two differences are TLC's threads'
timing and stay: the order of
Printoutput in a simulation that stops early, and the counts after an error stops a simulation, as TLC's worker runs on until stopped (the runners keep those lines but for their numbers). - Open, found by the fuzzers:
ToStringandToJsonkeep a record's written order, as TLC's Java does, only in the search. Before it (anASSUME, a constant-level invariant) Manyan sorts the fields, where TLC sorts only a constant's definition; and a variable's record keeps its order in its state's invariants, where TLC sorted it as it fingerprinted the state.- Follow new TLC releases: re-pin the oracle and re-bless the tests that changed.
- Give TLC's counterexample to a temporal property. Of 1500 random graphs
tests/fuzz.py livemakes on five seeds, each checked with the same random-fp, all print what TLC prints: Manyan orders a state's successors as TLC's table of them does, by TLC's fingerprints, checks the properties as TLC does, by its possible error models, and builds TLC's tableau of particles. A simulation searches its behavior as TLC'sLiveCheck1does, and prints the lasso it finds where TLC prints the behavior's first states. - Check Manyan against the semantics of TLA⁺, not only TLC:
make fuzz-proveasks TLAPS to prove the value Manyan prints,make fuzz-refcompares it withlean/, a reference semantics in Lean 4, andmake fuzz-modelManyan's verdicts, counts and traces;lean/proves that its computable oracle agrees with the classical one. Next: a proof that its evaluator respects=for values it keeps unevaluated (it is proved for the rest;make fuzz-reftests it with twins of each expression written otherwise). - Model more of Manyan's algorithms in
tests/tla, such as symmetry, and fuzz what the models cannot reach. The parallel search, the slicing of Init, the search for a fair cycle, the tableau, level checking and canonical formatting have models.
2. Fast where TLC is slow
- Most specs are small or medium and get checked again after every edit. They should finish in milliseconds, fast enough to check on save, in a pre-commit hook or in CI.
- Large models should fit in less memory per state, and state spaces
larger than RAM should check at disk speed.
-metadirmaps the states, their records and liveness's steps from files, and keeps the fingerprint set as TLC'sDiskFPSetdoes: the latest fingerprints in-fpmem's share of the memory, the older ones in a sorted file. In a Linux container without swap, PaxosCommit (1.32M states, 149 MB in memory) is killed under 100 MB without it, and with it checks under 100 MB in 55 s, as fast as uncapped, under 50 MB in 180 s and under 30 MB in 984 s. Still in memory, in order of what to move next: - A temporal property's check. Of 810K states,
[]<>Punder fairness takes 300 MB more than the safety check's 33 MB and is killed under 200 MB: per state, its decoded value, its product with the tableau, its successors' fingerprints and atoms, and the cache of atoms. TLC'sDiskGraphkeeps the product in files, with an in-memory table from fingerprint to file offset. - Every state found, encoded, for traces and liveness. TLC keeps only
the states still to expand (
DiskStateQueue), and for a trace a file of each state's fingerprint and predecessor (TLCTrace), from which it computes the states again. Limits: up to 2^29 states (the fingerprint set's slots are 30 bits), and each spill rewrites the whole file, as TLC's does, so a table far smaller than the states costs time quadratic in them. - Checking should scale with cores, liveness checking included.
- Before any speedup is kept,
docs/benchmark.mdmust show it and show no regression elsewhere.
3. Embeddable
- Make
manyan.ha stable C API: load a spec, check it, and walk the result without parsing printed text. - Build bindings on that API: Python first, then an editor or language server integration.
- Done in 0.14.0: the executable on PyPI, a WebAssembly build on npm, and a browser playground that checks a pasted spec with nothing installed.
Next: 0.21.0
0.20 followed TLC 1.8.0 to 40a7882 and read @ as TLA⁺ and SANY do:
@' is (f[d])', in model checking and -symbolic, and @ is of the
level of the function it updates.
- Liveness on every core. A property of state atoms alone is checked on one process, where forking the workers costs more than they save (optimizations). Make more workers check it faster, its output unchanged.
What stays
- The core language in one C file and one header, and the operators TLC computes in Java in another pair, on the core's API; no dependencies.
- Every expected output comes from TLC, unless TLA⁺'s semantics says TLC's verdict is wrong: then the semantics wins, and the manual says where. How a result is printed stays TLC's.
- With any number of workers, the output is identical to a one-worker run.
- An improvement over TLC that changes the output, such as a clearer error message, is opt-in. The default output stays TLC's.