Semi-formal development of a fault-tolerant leader election protocol in erlang

  • Authors:
  • Thomas Arts;Koen Claessen;Hans Svensson

  • Affiliations:
  • IT University in Göteborg, Göteborg, Sweden;Chalmers University of Technology, Göteborg, Sweden;Chalmers University of Technology, Göteborg, Sweden

  • Venue:
  • FATES'04 Proceedings of the 4th international conference on Formal Approaches to Software Testing
  • Year:
  • 2004

Quantified Score

Hi-index 0.00

Visualization

Abstract

We present a semi-formal analysis method for fault-tolerant distributed algorithms written in the distributed functional programming language Erlang. In this setting, standard model checking techniques are often too expensive or too limiting, whereas testing techniques often do not cover enough of the state space. Our idea is to first run instances of the algorithm on generated stimuli, thereby creating traces of events and states. Then, using an abstraction function specified by the user, our tool generates from these traces an abstract state transition diagram of the system, which can be nicely visualized and thus greatly helps in debugging the system. Lastly, formal requirements of the system specified in temporal logic can be checked automatically to hold for the generated abstract state transition diagram. Because the state transition diagram is abstract, we know that the checked requirements hold for a lot more traces than just the traces we actually ran. We have applied our method to a commonly used open-source fault-tolerant leader election algorithm, and discovered two serious bugs. We have also implemented a new algorithm that does not have these bugs.