Title
Teaching practical realistic verification of distributed algorithms in Erlang with TLA+
Abstract
Distributed systems are inherently complex as they need to address the interplay between features like communication, concurrency, and failure. Due to the inherent complexity of these interacting features, it is typically not possible to systematically test these kind of systems; yet, unexpected and unlikely combinations of events might cause corner cases that are hard to find. But since these systems are running typically for long durations, these events are likely to materialize eventually and must be handled correctly. Caught in such a dilemma, students are able to experience the benefits of applying verification tools to check their own algorithms and implementations. Having executable models with automatically generated executions allows them to experiment with different solutions by iteratively adapting and refining their algorithms. In this experience report, we report on our experience of teaching verification in a (hands-on) distributed systems course. We argue that broadcast algorithms provide a sweet spot in design and verification complexity. To this end, we give an implementation of these algorithms in Erlang and derive a TLA+ specification. TLA+ is a formal language for describing and reasoning about distributed and concurrent systems and provides a model checker, TLC, among other things. Our study reveals interesting parallels between the Erlang and TLA+ code, while exposing the challenges of formally modeling communication and parallelism in distributed systems. Presenting selected aspects of our course design, we aim to motivate the feasibility and need for introducing verification in close correspondence to programming tasks.
Year
DOI
Venue
2020
10.1145/3406085.3409009
ICFP '20: ACM SIGPLAN International Conference on Functional Programming Virtual Event USA August, 2020
DocType
ISBN
Citations 
Conference
978-1-4503-8049-2
0
PageRank 
References 
Authors
0.34
0
3
Name
Order
Citations
PageRank
Peter Zeller192.21
Annette Bieniusa215819.61
Carla Ferreira300.34