
TLA+ Demo: Trading Platform Bug Hunt

Formal methods with Hillel Wayne
Topic 6 of 17
Published Jul 29, 2026 · Clip 29:25–36:53 (7:28)
Hillel demos TLA+, a language invented by Leslie Lamport to model distributed systems as state machines checked via brute-force model checking. He walks through a trading platform spec (people trading a stick) with a change invariant, runs the model checker, and it finds a violation in 53 states: an item transferred from Carol to Bob without Carol making an offer, due to interleaved concurrent actions. He explains how state space exploration catches concurrency issues humans can't enumerate, mentions newer programmer-friendly languages (Quint, P), and notes the 2014 Amazon paper popularized TLA+.