Praveen Perera released Warpspec, an open-source (Apache-2.0) TLA+ model checker that compiles specifications into fixed-size, bit-packed no_std Rust state machines executable on NVIDIA GPUs or multi-core CPUs, achieving verified parity with TLC on distinct states, generated states, and search depth. The compiler tla-gpu-gen reuses tla-mc 's parser, evaluates constants from .cfg files, derives fixed types from TypeOK or Init / Next , and flattens values into [u64; W] arrays: finite sets become bitsets, strings/enums become integers, records split into fields, and integers use minimal bit-widths with runtime overflow checks. On an RTX 5090, Warpspec checked PaxosCommit (RM=3, 1.36B distinct states) in 3.65s versus TLC's 4h40m (4,600× speedup), EWD998 (N=4, 248M states) in 0.121s (3,318×), and LamportMutex (N=4, 561M states) in 0.473s (3,856×); the 24-thread CPU version was 68–224× faster than TLC. The GPU kernel uses a two-phase successor generation—computing enabled-action bitmasks then looping over a shared emit path with atomic compare-and-swap into a VRAM hash table—avoiding instruction-cache thrashing that limited a naive branch-per-action kernel to 3.6×. Warpspec compiles 152 of 191 tlaplus/Examples configs with zero mismatches; unsupported constructs (VIEW, infinite sets, recursion, stateful INSTANCE ) cause compile-time errors. Memory-limited to VRAM/RAM (32GB on RTX 5090 holds ~2.1B states via compact bucketed table), it currently supports safety properties only; liveness and disk spill are planned. Installation via npx warpspec check Spec.tla requires Rust 1.89+ and a C compiler; GPU mode needs CUDA 12.8+ driver and cuda-oxide .
Read original
hackernews