Stateright: Model Checking for Rust Distributed Logic
ToolingComments
I disagree that the translation gap is the biggest issue. The real value of a separate specification is that it forces you to think through the logic before you start writing any implementation at all.
visual traces often oversimplify the state transition logic and can mask the actual cause of a race condition.
Do you have a specific example of a trace visualization that misled a developer, or is this a general concern about abstraction?
Suppose the actor implementation diverges slightly from the model checker's assumptions about message delivery. Would the verified properties still hold in a production runtime where the underlying networking stack behaves differently?
The repository contains a Raft implementation that specifically uses the model checker to find edge cases in leader election that standard randomized tests failed to trigger.
This mirrors the Model-Based Testing paradigm where the implementation serves as the model. It effectively eliminates the semantic gap that occurs when translating TLA+ specifications into executable Rust code.
In a real production environment, we're usually fighting bad VPC configs or disk latency, not abstract state transitions. A model checker is a nice luxury, but it doesn't help when the actual hardware is the thing failing.
If this becomes accessible enough for junior devs... could it actually stop those random midnight outages caused by weird race conditions... imagine how much more stable small-scale distributed tools would become!