Show HN: Warpspec – TLA+ model checking on a GPU, 4,600× faster than TLC praveen...
HN Best 200 @best
Show HN: Warpspec – TLA+ model checking on a GPU, 4,600× faster than TLC praveenperera.com · 24 points · 2 comments · HN thread
TL;DR Warpspec is an open-source (Apache-2.0) tool that compiles a TLA+ spec and its TLC config into fixed-width bit-packed Rust and runs exhaustive state-space search on an NVIDIA GPU or all CPU cores. The author reports matching TLC's distinct-state, generated-state and depth counts on every model both finished, with up to about 4,600× speedup over TLC on an RTX 5090 for EWD998 N=4 and PaxosCommit RM=3.
- The generator packs each TLA+ state into a few 64-bit words, using bitsets for sets and fixed-width integers with runtime overflow checks, then emits plain no_std Rust shared by the CPU and GPU drivers.
- On EWD998 N=4 (248M distinct states), TLC took 401.5 s with 24 workers, warpspec CPU 5.93 s and RTX 5090 0.121 s; on PaxosCommit RM=3 (1.36B states) TLC took 4 h 40 min versus 3.65 s on the GPU.
- A first GPU kernel that inlined the successor code per action was slow due to instruction-cache stalls; funneling all next states through one shared emit path raised LamportMutex speedup over 24 CPU threads from 3.6× to 26.9×.
- Of 191 exhaustive configs in tlaplus/Examples, warpspec compiles 152 with no count or verdict mismatches against TLC v1.8.0 and refuses 39 at compile time.
- Limits: GPU checks are safety-only, the seen-states table and frontier must fit in VRAM (32 GB on the RTX 5090), and specs need a type from a TypeOK invariant or Init; TLC remains the reference for full TLA+.
Discussion The thread is very short, with only two comments. One commenter questions whether the implementation and the blog post were largely generated by Claude, suggesting the author may have outsourced both. The other is an enthusiastic reply from a user with a gaming PC who would like to use the GPU to brute-force their own TLA+ specs. The mood is mildly skeptical with some interest.
- Interesting idea, but doubts about AI-generated code and writing (some): One commenter finds the approach very cool but asks whether the implementation and blog post were outsourced to Claude. The comment questions authorship rather than the technical claims.
- Enthusiastic about using idle GPU for TLA+ (some): A commenter finds the work unbelievably neat and says a gaming PC with a powerful GPU is underused, so brute-forcing TLA+ models on it seems a good use.
#TLAPlus #GPU #ModelChecking #Rust #CUDA #FormalVerification