hn.today

Show HN: Warpspec – TLA+ model checking on a GPU, 4,600× faster than TLC

praveenperera.com105 points19 comments
Screenshot of Show HN: Warpspec – TLA+ model checking on a GPU, 4,600× faster than TLC

Warpspec is an Apache-2.0 tool that compiles a supported TLA+ specification and TLC configuration into a fixed-width, bit-packed Rust state machine, then explores its reachable states on an NVIDIA GPU or a multicore CPU. Instead of interpreting dynamically typed values, it encodes states as arrays of 64-bit integers: finite sets become bitsets, records and fixed-key functions become fields, and bounded sequences become packed slots. This makes operations such as updating or checking a set a few bitwise instructions rather than repeated allocation and traversal. The same generated code runs on CPU and GPU; it can report TLC-format counterexample traces for safety and deadlock errors, while CPU runs also check temporal liveness and fairness.

The central claim is that this specialized representation, combined with GPU parallelism, can sharply reduce model-checking time without changing results. In tested runs, warpspec matched TLC’s distinct-state, generated-state, and search-depth counts. On an RTX 5090, it checked EWD998 with four nodes in 0.121 seconds, versus TLC’s 401.5 seconds, and a PaxosCommit model with three resource managers in 3.65 seconds, versus 4 hours 40 minutes. Its generated CPU checker was already 13-73 times faster than compiled tla-mc on reported benchmarks; restructuring the GPU kernel raised its advantage over a 24-thread CPU to as much as 26.9 times. Of 191 exhaustive-search configurations in the TLA+ examples, 152 compiled and matched TLC’s counts or verdicts; 39 were rejected at compile time. The approach depends on fixed, bounded state representations, so it does not support every TLA+ specification.

Read on praveenperera.com19 comments on Hacker News

Summary generated by AI from the linked article. hn.today is not affiliated with Hacker News or Y Combinator.

More in Programming

Show HN: Rust Commander

Show HN: Rust Commander

Rust Commander is a Rust terminal file manager modeled on Midnight Commander, with dual-pane navigation, a persistent shell, archive and remote browsing, and background file operations. Version 0.3.1 adds file-change alerts, viewer copy controls, customizable skins, and faster SFTP previews and copying. (github.com)

The daily digest

Today's best Hacker News stories, summarized and screenshotted, one email a day.