Teaching practical realistic verification of distributed algorithms in Erlang with TLA+

Peter Zeller, Annette Bieniusa, Carla Ferreira

Research output: Chapter in Book/Report/Conference proceedingConference contributionpeer-review

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.

Original languageEnglish
Title of host publicationErlang 2020 - Proceedings of the 19th ACM SIGPLAN International Workshop on Erlang, co-located with ICFP 2020
EditorsAnnette Bieniusa, Viktoria Fordos
PublisherAssociation for Computing Machinery
Pages14-23
Number of pages10
ISBN (Electronic)9781450380492
DOIs
Publication statusPublished - 23 Aug 2020
Event19th ACM SIGPLAN International Workshop on Erlang, Erlang 2020, co-located with the Annual International Conference on Functional Programming, ICFP 2020 - Virtual, Online, United States
Duration: 23 Aug 2020 → …

Conference

Conference19th ACM SIGPLAN International Workshop on Erlang, Erlang 2020, co-located with the Annual International Conference on Functional Programming, ICFP 2020
CountryUnited States
CityVirtual, Online
Period23/08/20 → …

Keywords

  • Broadcast algorithms
  • Distributed algorithms
  • Formal verification
  • TLA+

Fingerprint Dive into the research topics of 'Teaching practical realistic verification of distributed algorithms in Erlang with TLA+'. Together they form a unique fingerprint.

Cite this