Teaching Practical Realistic Verification of Distributed Algorithms in Erlang with TLA+
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.
Sun 23 AugDisplayed time zone: Eastern Time (US & Canada) change
07:50 - 09:30 | |||
07:50 10mDay opening | Opening Erlang | ||
08:00 30mShort-paper | Transformations towards Clean Functional Code Erlang Boldizsár Poór Eötvös Loránd University, Melinda Tóth Eötvös Loránd University, Faculty of Informatics, Department of Programming Languages and Compilers & ELTE-Soft Nonprofit Ltd., István Bozó Eötvös Loránd University DOI | ||
08:30 30mTalk | Supporting Secure Coding with RefactorErl Erlang Brigitta Baranyai ELTE Eötvös Loránd University, István Bozó Eötvös Loránd University, Melinda Tóth Eötvös Loránd University, Faculty of Informatics, Department of Programming Languages and Compilers & ELTE-Soft Nonprofit Ltd. | ||
09:00 30mFull-paper | Teaching Practical Realistic Verification of Distributed Algorithms in Erlang with TLA+ Erlang Peter Zeller TU Kaiserslautern, Annette Bieniusa Technische Universität Kaiserslautern, Carla Ferreira Universidade Nova Lisboa DOI |