Building Refactoring Tools: Insights from RefactorEx
Resumo
Refactoring plays a crucial role in software maintenance and evolution, yet emerging programming languages often lack the tooling to automatically and confidently perform the refactoring tasks. This paper presents insights gained from developing RefactorEx, a refactoring tool for the Elixir functional language. We discuss architectural considerations, design patterns and technical challenges encountered while implementing automated code transformations. The presented patterns and lessons aim to provide some guidance for researchers and developers seeking to build similar tooling.Referências
Aho, A. V., Lam, M. S., Sethi, R., and Ullman, J. D. (2006). Compilers: Principles, Techniques, and Tools. Addison-Wesley, 2 edition.
Beck, K. and Andres, C. (2004). Extreme Programming Explained: Embrace Change. Addison-Wesley Professional, 2 edition.
Fowler, M. (2018). Refactoring: improving the design of existing code. Addison-Wesley, 2 edition.
Gamma, E., Helm, R., Johnson, R., and Vlissides, J. (1994). Design patterns: Elements of reusable object-oriented software. Pearson Education, 1 edition.
Horpácsi, D. (2013). Extending Erlang by utilising RefactorErl. In 12h ACM SIGPLAN Workshop on Erlang, page 63–72.
JetBrains (2023). IntelliJ IDEA: the leading Java and Kotlin IDE. Available at: [link].
Jurić, S. (2024). Elixir in action. Manning, 3 edition.
Li, H., Reinke, C., and Thompson, S. (2003). Tool support for refactoring functional programs. In 2003 ACM SIGPLAN Workshop on Haskell, page 27–38.
Li, H. and Thompson, S. (2006). Comparative study of refactoring Haskell and Erlang programs. In 6th IEEE International Workshop on Source Code Analysis and Manipulation (SCAM), pages 197–206.
Li, H., Thompson, S., Orosz, G., and Tóth, M. (2008). Refactoring with Wrangler, updated: Data and process refactorings, and integration with Eclipse. In 7th ACM SIGPLAN Workshop on ERLANG, pages 61–72.
Murphy-Hill, E. and Black, A. P. (2008). Breaking the barriers to successful refactoring: observations and tools for extract method. In 30th International Conference on Software Engineering (ICSE), page 421–430.
Myers, E. W. (1986). An O(ND) difference algorithm and its variations. Algorithmica, 1(1):251–266.
Rowe, R. N. S., Férée, H., Thompson, S., and Owens, S. (2019). Characterising renaming within OCaml’s module system: Theory and implementation. In 40th ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI), pages 950–965.
Rudi, A. G. (2006). Rope: Python refactoring library. Available at: [link].
Vegi, L. F. M. and Valente, M. T. (2023). Understanding code smells in Elixir functional language. Empirical Software Engineering, 28(102):1–32.
Vegi, L. F. M. and Valente, M. T. (2025). Understanding refactorings in Elixir functional language. Empirical Software Engineering, 30(108):1–58.
Beck, K. and Andres, C. (2004). Extreme Programming Explained: Embrace Change. Addison-Wesley Professional, 2 edition.
Fowler, M. (2018). Refactoring: improving the design of existing code. Addison-Wesley, 2 edition.
Gamma, E., Helm, R., Johnson, R., and Vlissides, J. (1994). Design patterns: Elements of reusable object-oriented software. Pearson Education, 1 edition.
Horpácsi, D. (2013). Extending Erlang by utilising RefactorErl. In 12h ACM SIGPLAN Workshop on Erlang, page 63–72.
JetBrains (2023). IntelliJ IDEA: the leading Java and Kotlin IDE. Available at: [link].
Jurić, S. (2024). Elixir in action. Manning, 3 edition.
Li, H., Reinke, C., and Thompson, S. (2003). Tool support for refactoring functional programs. In 2003 ACM SIGPLAN Workshop on Haskell, page 27–38.
Li, H. and Thompson, S. (2006). Comparative study of refactoring Haskell and Erlang programs. In 6th IEEE International Workshop on Source Code Analysis and Manipulation (SCAM), pages 197–206.
Li, H., Thompson, S., Orosz, G., and Tóth, M. (2008). Refactoring with Wrangler, updated: Data and process refactorings, and integration with Eclipse. In 7th ACM SIGPLAN Workshop on ERLANG, pages 61–72.
Murphy-Hill, E. and Black, A. P. (2008). Breaking the barriers to successful refactoring: observations and tools for extract method. In 30th International Conference on Software Engineering (ICSE), page 421–430.
Myers, E. W. (1986). An O(ND) difference algorithm and its variations. Algorithmica, 1(1):251–266.
Rowe, R. N. S., Férée, H., Thompson, S., and Owens, S. (2019). Characterising renaming within OCaml’s module system: Theory and implementation. In 40th ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI), pages 950–965.
Rudi, A. G. (2006). Rope: Python refactoring library. Available at: [link].
Vegi, L. F. M. and Valente, M. T. (2023). Understanding code smells in Elixir functional language. Empirical Software Engineering, 28(102):1–32.
Vegi, L. F. M. and Valente, M. T. (2025). Understanding refactorings in Elixir functional language. Empirical Software Engineering, 30(108):1–58.
Publicado
23/09/2025
Como Citar
PEREIRA, Gabriel Philippe; VEGI, Lucas Francisco da Matta; DI IORIO, Vladimir.
Building Refactoring Tools: Insights from RefactorEx. In: WORKSHOP EM ENGENHARIA DE SOFTWARE PARA PROGRAMAÇÃO FUNCIONAL (SE4FP), 1. , 2025, Recife/PE.
Anais [...].
Porto Alegre: Sociedade Brasileira de Computação,
2025
.
p. 9-14.
DOI: https://doi.org/10.5753/se4fp.2025.13088.