Teaching rigorous distributed systems with efficient model checking
blog.acolyer.org
blog.acolyer.org
It requires a fair amount of boilerplate (see the examples in the tests directory) but it is so, so much more powerful than manually coding a bunch of unit test cases that it was worth it (and it unearthed a tricky bug!)
I think a great project would be to write a spec in TLA+, run its model checker in simulation mode, then use the generated event traces to execute corresponding event traces in this (or some other) model checker, all the while translating the program's state back into values understood by TLA+ for checking against the TLA+ spec's invariants. Would be a nice lightweight method of enforcing correspondence between spec and code.
If they were going to do that, they should have just used Erlang instead. That’s precisely the OTP model.
I doubt there's one true distributed systems model, but there are some good ones which overlap, and some which excel in different domains.
[1] https://www.microsoft.com/en-us/research/publication/cloud-t...
And now I see this, and I'm already having second thoughts. Prima facie, what I like about DSLabs is it's not so steep learning curve as it's written in a mainstream OOP language. Can anyone who has worked on both TLA+ and DSLabs share thoughts?
I happen to agree with the argument made by proponents of both TLA+ and Alloy that model checking and specification is better accomplished when detached from an implementation language, but I think you would benefit most from simply starting with one of them (DSLabs or TLA+) and decide later if you'd like to learn the other.
I haven't seriously sat down and deep dived yet, but I'm really liking what I've seen of Runway: https://runway.systems/. It's advantages over all three are
1. A repl
2. A repl
3. You can try it online
4. Oh my god, there's a repl
The core hasn't been updated in three years, so I'm not as ludicrously-overhyped on applying it to real systems, but to build your model thinking? I really like what I've seen so far.
As well the TLA+ toolbox has other tools in addition to the model checker: a pretty printer, and a proof system as well.
https://courses.cs.washington.edu/courses/cse452/19sp/
DSLabs' code is enclosed in our GitLab instance though, as far as I'm concerned.