A Domain-Specific Language for Scripting Refactorings in Erlang

Refactoring is the process of changing the design of a program without changing its behaviour. Many refactoring tools have been developed for various programming languages; however, their support for composite refactorings --- refactorings that are composed from a number of primitive refactorings --- is limited. In particular, there is a lack of powerful and easy-to-use frameworks that allow users to script their own large-scale refactorings efficiently and effectively. This paper introduces the domain-specific language framework of Wrangler --- a refactoring and code inspection tool for Erlang programs ---that allows users to script composite refactorings, test them and apply them on the fly. The composite refactorings are fully integrated into Wrangler and so can be previewed, applied and ‘undone' interactively.

[1]  Huiqing Li,et al.  Automated API migration in a user-extensible refactoring tool for Erlang programs , 2011, 2012 Proceedings of the 27th IEEE/ACM International Conference on Automated Software Engineering.

[2]  Zoltán Horváth,et al.  Introducing records by refactoring , 2007, ERLANG '07.

[3]  Don Roberts,et al.  Practical analysis for refactoring , 1999 .

[4]  Eelco Visser,et al.  Stratego/XT 0.17. A language and toolset for program transformation , 2008, Sci. Comput. Program..

[5]  Simon Thompson,et al.  Incremental Code Clone Detection and Elimination for Erlang Programs , 2022 .

[6]  Huiqing Li,et al.  Refactoring with Wrangler, updated , 2008 .

[7]  Ralph E. Johnson,et al.  A Refactoring Tool for Smalltalk , 1997, Theory Pract. Object Syst..

[8]  Günter Kniesel,et al.  Static composition of refactorings , 2004, Sci. Comput. Program..

[9]  Huiqing Li,et al.  The Haskell Refactorer, HaRe, and its API , 2005, Electron. Notes Theor. Comput. Sci..

[10]  Andrew P. Black,et al.  How we refactor, and how we know it , 2009, 2009 IEEE 31st International Conference on Software Engineering.

[11]  Perdita Stevens,et al.  Modelling Recursive Calls with UML State Diagrams , 2003, FASE.

[12]  William F. Opdyke,et al.  Refactoring object-oriented frameworks , 1992 .

[13]  R Day,et al.  The eclipse open-development platform , 2008 .

[14]  Huiqing Li,et al.  Incremental Clone Detection and Elimination for Erlang Programs , 2011, FASE.

[15]  Huiqing Li,et al.  Refactoring with wrangler, updated: data and process refactorings, and integration with eclipse , 2008, ERLANG '08.

[16]  Mel O Cinn eide Automated application of design patterns: a refactoring approach , 2001 .