Compiling Distributed System Models into Implementations with PGo
summary
PGo compiles MPCal models to PlusCal for TLC and to executable Go, providing a MPCal→Go compiler plus a runtime library and plugins; it implements a Raft-based key‑value store (930 LOC MPCal, 7 archetypes, ~22 person‑days) that survives leader failover and re‑election and outperforms other spec‑to‑code baselines in throughput tests. Compilation uses local pre‑commit (two‑phase) with resource contracts, persistent state via RocksDB, modular verification of protocol+service, and implementation tracing with vector clocks and a trace‑checker to compare traces to the spec.
AI-written summary · about
chapters (16)
- 0:00Introduction to PGo
- 1:09Distributed systems are hard
- 3:00What is PGo and why use it
- 6:32MPCal and modular pluscal
- 13:42Compilation process overview
- 18:20State machine and I/O handling
- 19:02Trusted code base size
- 20:06RAFT-based key-value store
- 25:44Failure recovery in practice
- 26:05Performance challenges
- 31:08Modular verification concept
- 35:40Modular verification results
- 36:01Implementation tracing introduction
- 45:31Implementation tracing details
- 45:52Summary and future work
- 46:13Q&A session
