Obtaining Statistical Properties by Simulating Specs with TLC
summary
Uses TLA+ with TLC generate mode to collect counters into CSV and validate statistical claims empirically. Implements modular rationals and a CSV write helper, plus a postcondition g-square check to detect skewed samples. Reproduces Knuth–Yao fair-die and Crooked-coin distributions (matches PRISM), finds eager-abort is a huge de-optimization in EWD 998, exposes severe churn in a RabbitMQ client (hundreds of queue releases) and fixes it with a non-active-release optimization, and shows sticky Kafka assignment dramatically cuts revocations.
AI-written summary · about
chapters (11)
- 0:00Introduction to simulation with TLC
- 5:09Demo introduction and setup
- 10:29Knuth-Yao die simulation
- 15:32Crooked coin simulation
- 25:12Testing intuition with EWD998
- 34:44Real-world case studies
- 45:14SWIM protocol analysis
- 45:34RabbitMQ client library study
- 50:55Kafka partition assignment
- 53:17Technique effectiveness and limitations
- 57:34Q&A and closing
