Gradual typing of erlang programs: a wrangler experience

  • Authors:
  • Konstantinos Sagonas;Daniel Luna

  • Affiliations:
  • National Technical University of Athens, Athens, Greece;Uppsala University, Uppsala, Sweden

  • Venue:
  • Proceedings of the 7th ACM SIGPLAN workshop on ERLANG
  • Year:
  • 2008

Quantified Score

Hi-index 0.00

Visualization

Abstract

Currently most Erlang programs contain no or very little type information. This sometimes makes them unreliable, hard to use, and difficult to understand and maintain. In this paper we describe our experiences from using static analysis tools to gradually add type information to a medium sized Erlang application that we did not write ourselves: the code base of Wrangler. We carefully document the approach we followed, the exact steps we took, and discuss possible difficulties that one is expected to deal with and the effort which is required in the process. We also show the type of software defects that are typically brought forward, the opportunities for code refactoring and improvement, and the expected benefits from embarking in such a project. We have chosen Wrangler for our experiment because the process is better explained on a code base which is small enough so that the interested reader can retrace its steps, yet large enough to make the experiment quite challenging and the experiences worth writing about. However, we have also done something similar on large parts of Erlang/OTP. The result can partly be seen in the source code of Erlang/OTP R12B-3.