Skip to content

Releases

v0.2.1

Choose a tag to compare

@github-actions github-actions released this 04 Dec 01:56
4d25887
  • The five platform binary npm packages moved to the @warpspec scope: @warpspec/linux-x64-gnu, @warpspec/linux-arm64-gnu, @warpspec/darwin-arm64, @warpspec/darwin-x64 and @warpspec/win32-x64-msvc. npm's spam check refused the unscoped Windows package name, so scoped names let Windows npm installs work. npx warpspec and npm install -g warpspec are unchanged.

v0.2.0

Choose a tag to compare

@github-actions github-actions released this 04 Dec 00:41
a896e72

Most checks no longer need a Rust toolchain. CPU checks compile the model in-process with Cranelift, NVIDIA GPU checks need only the driver, and Apple silicon Macs check on the GPU through Metal. This release also adds TLC's command line (warpspec tlc) and exit codes, a pure-Rust front end that matches SANY, and most of TLC's other search modes: simulation, depth-first iterative deepening, -continue, checkpoints, state-graph dumps and coverage. New prebuilt binaries cover Intel Macs and Windows x64.

Breaking changes

  • Exit codes now follow TLC wherever TLC defines one. A PROPERTY that fails in an initial state or on a step ([][A]_v) exits 13, as TLC files it with liveness; 0.1.0 exited 12. A spec SANY rejects, or a missing spec file, exits 150, and a cfg TLC rejects exits 151; both used to exit 1. The full table is under TLC compatibility below.
  • The default CPU backend is now the Cranelift JIT, not a runner compiled with rustc. Pass --cpu-backend rustc (or set WARPSPEC_CPU_BACKEND=rustc) for the old path.
  • NVIDIA GPU checks no longer compile Rust kernels. warpspec writes the kernels as PTX itself and uses NVRTC only when needed (see below).
  • Without --slots, CPU runs size the fingerprint table themselves. The table starts at 2^20 slots (8 MiB), grows as it fills and spills to disk past a memory budget; 0.1.0 always reserved 2^27 slots (1 GiB). --slots N still fixes the size.
  • --int-bits accepts only 1 to 32, matching TLC's 32-bit integers, and --slots accepts at most 2^32.
  • Counterexample steps are named by the bare operator, as TLC prints them (RMPrepare, not RMPrepare(r1)). --json keeps the full call in each step's new call field.
  • Inputs TLC rejects are now rejected too: cfg substitutions of a variable or of an undefined name, substitution chains and cycles, and INSTANCEs that leave a constant or variable unsubstituted or substitute one twice.
  • Model libraries loaded with the runner's gen-cpu-bfs --lib PATH (not warpspec check --lib DIR, which adds a module search directory) use model ABI version 6. Versions 1 to 5 still load, but --dump-dot and --coverage need version 3 or later.
  • --json reports no longer carry unchecked_assumptions. An ASSUME the generator cannot evaluate now stops the check (exit 1) instead of passing with a warning.

Zero-toolchain execution and backends

  • warpspec check compiles a CPU check's model in-process with Cranelift, with no cargo, rustc or C compiler involved. A small spec's first check into an empty cache takes about 0.1 s (it took about 7 s with rustc), and a warm check of a small spec starts in about 10 ms. Search speed is within about 10% of a rustc build.
  • The JIT runs every CPU search mode and counterexample traces. It also runs the liveness pass (PROPERTY, WF, SF, ~>, initial-state and [][A]_v conjuncts), including under SYMMETRY, with the same verdicts, counts and lasso counterexamples as the rustc runner.
  • --cpu-backend auto|jit|c|rustc (or WARPSPEC_CPU_BACKEND) picks the compiler. auto, the default, tries the JIT first. A model the JIT cannot compile goes to a C compiler if one is on the machine (optional; WARPSPEC_CC, then clang, gcc, cc or zig cc), and otherwise to the rustc runner, with a note saying why. An explicit jit or c stops with the reason instead.
  • A few models still need the rustc runner. These are models with a VIEW, a state wider than 64 words, or liveness atoms the lowering cannot translate. With no cargo on PATH, such a check stops and explains why it needs Rust.
  • A checkpoint saved under one CPU backend resumes under any other.
  • When a check cannot use the GPU, stderr lists every reason with how to fix it, naming the variable, PROPERTY or flag and its location, and --json reports them in gpu_ineligible.
  • If the spec, cfg, modules and flags are unchanged, a cached check skips the generator (generate cached in the summary, cache.inputs_hit in --json).
  • Killing warpspec now kills the runner, compiler and generator it started. On Linux this holds under kill -9 too.

NVIDIA direct PTX and Apple silicon Metal

  • NVIDIA: warpspec writes the model's CUDA kernels as PTX in pure Rust, and the NVIDIA driver compiles them, so a GPU check needs only the driver. This covers sm_70 and newer, including states wider than 64 bits and Windows. Against NVRTC-compiled kernels, the search ran 1.6 to 1.8 times faster on PaxosCommit and LamportMutex, and within 6% on EWD998. The LamportMutex and EWD998 runs predate the GPU's refusal of CONSTRAINT checks on pruned states, so --gpu now refuses those configs and the default backend checks them on the CPU. --compact and --spill run on the GPU, and the PTX is cached per model.
  • NVRTC is needed only for --simulate, GPUs older than sm_70, and models the PTX emitter refuses. If no toolkit, Python wheel or cached copy is found, warpspec install-nvrtc, --install-nvrtc, WARPSPEC_INSTALL_NVRTC=1 or a yes at an interactive prompt downloads NVIDIA's redistributable NVRTC (13.5.37 or 12.9.86, whichever compiles for the GPU), checked against pinned SHA-256s. warpspec itself ships nothing of NVIDIA's. WARPSPEC_CUDA_BACKEND=ptx or nvrtc forces one compiler. See Direct PTX and Finding and installing NVRTC.
  • Apple silicon: on macOS 15 or later, --gpu and the default backend lower the model to Metal and search it in-process, with no Rust toolchain or Xcode. Metal checks safety and liveness (PROPERTY, WF/SF) and prints invariant, deadlock and lasso counterexamples from the GPU. It also runs --compact, --spill and --simulate, and the fingerprint table grows in place. See Metal and Metal liveness.
  • --frontier N sizes the GPU frontier buffers. A full buffer stops with a hint to raise it.
  • The default backend falls back to the CPU, and --gpu refuses, for anything the GPU does not run. That includes liveness PROPERTIES on NVIDIA, a VIEW, CONSTRAINT checks on pruned states, TLC's runtime operators, --no-deadlock, --continue, --dfid, --checkpoint, --dump-dot and --coverage. On NVIDIA, counterexample traces are rebuilt on the CPU. See When a check cannot use the GPU.

TLC compatibility and warpspec tlc

  • warpspec tlc [-option] Spec[.tla] takes TLC's command line, so scripts written for java tlc2.TLC can run warpspec instead. It reads TLC's search, checkpoint and output options and prints TLC's messages in TLC's order, framed with TLC's message codes under -tool. Options that only tune TLC are accepted with a warning, and options whose output warpspec cannot produce are refused by name.

  • warpspec check and warpspec tlc exit with TLC's codes:

    Outcome Exit
    No error 0
    Paused by Ctrl-C or SIGTERM under --checkpoint 3
    An ASSUME that is false, not a Boolean, or raises an error 10
    Deadlock 11
    An invariant, or a []P PROPERTY, violated 12
    A temporal PROPERTY, or one that fails in an initial state or on a step ([][A]_v), violated 13
    An error evaluating an action or computing a successor 75
    An error evaluating an invariant 76
    A spec SANY rejects, or a missing spec file 150
    A cfg TLC rejects 151
    Anything else that stops the check (usage, unsupported construct, capacity) 1

    Four differences from TLC remain. A failed Assert in an action exits 75 where TLC exits 14. An error evaluating Init exits 1 where TLC exits 75. An error evaluating a [][A]_v property exits 76 where TLC exits 14. --continue exits with its highest-ranked failure's code where TLC exits 0. See Exit codes and TLC's command line.

  • TLC's TLCGet("level"), TLCGet(i), TLCSet(i, v), Print and PrintT run during the CPU search, where TLC runs them. Printed lines appear before the result and in --json's prints. A model that calls TLCSet searches on one worker. Combinations whose effects TLC orders around a CONSTRAINT or ACTION_CONSTRAINT in a way warpspec cannot match are refused, naming the operator. See Runtime builtins.

  • The Java-implemented operators of TLC and the CommunityModules are evaluated in ASSUMEs and constant definitions instead of being refused. This covers ToString, SortSeq, IOEnv, the JSON and CSV operators and a seeded RandomElement, among others. A call that depends on the state is refused, with its location.

  • Counterexamples print through the cfg's ALIAS, as in TLC, in text and --json. See ALIAS.

  • False ASSUMEs are reported in TLC's words. ASSUMEs that fail an Assert, raise an error or are not Boolean exit 10 instead of being left unchecked.

  • Values are ordered as TLC orders them, so CHOOSE and iteration order match TLC. Evaluation errors such as a CHOOSE with no match, comparisons across incompatible kinds, an error computing a quantifier's domain, and errors inside ENABLED are raised where TLC raises them.

Language coverage and builtins

  • warpspec-syntax is a pure-Rust TLA+ parser and semantic checker ported from SANY. It accepts and rejects what SANY does, including user-defined operators, indentation-sensitive /\ and \/ lists, proofs, unicode and modules ...
Read more

v0.1.0

Choose a tag to compare

@github-actions github-actions released this 01 Dec 23:35
05a1a38
  • Add the warpspec command: warpspec check Spec.tla [Spec.cfg] generates the model, compiles it into a cached runner (~/.cache/warpspec) and checks it on an NVIDIA GPU or every CPU core, printing a TLC-style summary (and shortest counterexample trace on safety/deadlock violations) or, with --json, one JSON object. Its exit codes are TLC's: 0 for no error, 12 for a violated invariant or safety/action property, 13 for a violated liveness property, 11 for deadlock, 10 for a false assumption, 76 for an error evaluating an invariant and 75 for one computing a successor, and 1 when the check couldn't run. warpspec gen writes only the generated Rust
  • Add shortest counterexample traces with decoded TLA+ states for invariant and deadlock violations (--no-trace, --trace-limit N), in both TLC text output and --json
  • Add CPU liveness, WF/SF fairness, and initial/action PROPERTY checking via generalized Büchi automata over the explored state graph (pass --skip-liveness for safety only)
  • Bundle CommunityModules, TLCExt and Randomization into tla-gpu-gen, removing the need for --lib on specs that extend them
  • Each GitHub release ships warpspec and tla-gpu-gen for Linux x86_64 and arm64 (glibc 2.28 or newer) and Apple silicon, with SHA-256 checksums, an install.sh that installs them into ~/.local/bin (curl -LSfs https://github.com/praveenperera/warpspec/releases/latest/download/install.sh | sh), and cargo binstall metadata
  • Publish warpspec to npm: npx warpspec check Spec.tla or npm install -g warpspec. The warpspec package runs the binaries from warpspec-linux-x64-gnu, warpspec-linux-arm64-gnu or warpspec-darwin-arm64, which each hold the release's warpspec and tla-gpu-gen, and needs no install script
  • Add the skills/warpspec agent skill for modelling a design in TLA+ and reading warpspec check --json
  • Replace the 26 Python and shell maintenance scripts in scripts/ with cargo xtask (including sharded parallel PTX compilation for GPU corpus verification)