Project members Results Downloads Collaboration

Refactoring Erlang Programs

Introduction

Refactoring is about improving the design of existing program code, that is, making changes to the source code which preserve the meaning of the program in order to improve non-functional characteristics of the code like readability or maintainability. Refactoring can be applied easily in projects built on the object-oriented paradigm, and software tools already exist to support safe refactoring. Functional languages, however, still lack proper tool support, only prototypes are available for pure functional languages like HaRe for Haskell.

The goal of this project is to develop a refactoring tool for the Erlang functional programming language. We are investigating implementation possibilities of refactoring using our experiences from previous research, and building a refactoring framework that can be integrated with any development environment.

The project is run by the Department of Programming Languages and Compilers at the Faculty of Informatics, Eötvös Loránd University in Budapest, Hungary.

The project is supported by:

Project members

Horváth, Zoltán hz at inf dot elte dot hu Professor, supervisor
Kozsik, Tamás kto at inf dot elte dot hu Associate professor
Tejfel, Máté matej at inf dot elte dot hu Assistant professor
Király, Roland kiralyroland at inf dot elte dot hu Assistant lecturer
Kitlei, Róbert kitlei at elte dot hu Assistant lecturer
Lövei, László lovei at inf dot elte dot hu Assistant researcher
Bozó, István bozo_i at inf dot elte dot hu PhD student
Horpácsi, Dániel daniel_h at inf dot elte dot hu PhD student
Kőszegi, Judit kojqaai at inf dot elte dot hu PhD student
Tóth, Melinda toth_m at inf dot elte dot hu PhD student

MSc students

Czini, Gábor; Erdődi, Atilla; Hajós, Lilla; Láng, László Károly; Horváth, Gábor; Nagy, Tamás; Oláh, Gábor; Somhegyi, Benjámin

BSc students

Karácsonyi, Mátyás; Zempléni, Csaba Imre

Project results

Software

Prototype refactoring software is available for download under the conditions of Erlang Public License. The latest release of the refactoring tool supports 24 refactoring steps:

  1. Eliminate function call
  2. Eliminate import
  3. Eliminate macro substitution
  4. Eliminate variable
  5. Expand fun expression
  6. Generalize function definition
  7. Introduce function
  8. Introduce import
  9. Introduce record
  10. Introduce variable
  11. Move function
  12. Move macro
  13. Move record
  14. Rename function
  15. Rename header
  16. Rename macro
  17. Rename module
  18. Rename record
  19. Rename record field
  20. Rename variable
  21. Reorder function parameters
  22. Transform list comprehension
  23. Tuple function parameters
  24. Upgrade regexp interface

Publications

Collaboration

We have a collaboration on this topic with the University of Kent, where the refactoring group is led by Simon Thompson. More information on their work can be found on the FORSE refactoring page.