Refactoring Erlang programs

Authors

  • László Lövei
  • Zoltán Horváth
  • Tamás Kozsik
  • Anikó Víg
  • Tamás Nagy
https://doi.org/10.3311/pp.ee.2007-3-4.02

Abstract

This paper presents the model, the design principles and the prototype of a refactoring toolset for Erlang programs. With this toolset one can incrementally carry out programmer-guided meaning-preserving program transformations. Erlang is a mostly dynamically typed language, and many of its semantical rules are also dynamic. Therefore the main challenge in this research is to ensure the safety of (the statically performed) refactoring steps. The paper analyses the language constructs of Erlang with respect to refactoring. A novelty of the presented approach is that programs are represented, stored and manipulated in a relational database. This feature makes it possible to express refactoring steps in a fairly compact and comprehensible way. The proposed software development environment with the integrated refactoring tool provides multiple editing modes. These editing modes support changes ranging from fully controlled (allowing only meaning-preserving transformations) to uncontrolled (editing program text freely). Transformations are performed more safely and efficiently in an editing mode with higher control.

Keywords:

Erlang, refactoring tool, semantical analysis, functional language

How to Cite

Lövei, L., Horváth, Z., Kozsik, T., Víg, A., Nagy, T. “Refactoring Erlang programs”, Periodica Polytechnica Electrical Engineering, 51(3-4), pp. 75–84, 2007. https://doi.org/10.3311/pp.ee.2007-3-4.02

Issue

Section

Articles