Print Email Facebook Twitter Renaming for Everyone Title Renaming for Everyone: Language-parametric Renaming in Spoofax Author Misteli, Phil (TU Delft Electrical Engineering, Mathematics and Computer Science) Contributor Pelsmaeker, D.A.A. (mentor) Visser, Eelco (mentor) Zwaan, A.S. (graduation committee) Aniche, Maurício (graduation committee) Degree granting institution Delft University of Technology Programme Computer Science Date 2021-05-25 Abstract A refactoring is a program transformation that improves the design of the source code, while preserving its behavior. Most modern IDEs offer a number of automated refactorings as editor services. The Rename refactoring is the most-commonly applied refactoring and is used to change the identifier of a program entity such as a variable, a function, or a type. Correctly implementing refactorings is notoriously complex and these state-of-the-art implementations are known to be faulty and too restrictive. When developing a new programming language, it is both difficult and time-consuming to implement sound and complete automated refactoring transformations. Language-parametric definitions of refactorings that can be reused by instantiation with the syntax and semantics of a language, allow the development effort of refactorings to be amortized across language implementations. In this thesis, we developed a language-parametric Rename refactoring algorithm that works on an abstract model of a program's name binding structure. We implemented the algorithm in the Spoofax language workbench, building on the language-parametric representation of name binding with scope graphs and using generic traversals in the Stratego transformation language. We evaluated the algorithm with five different languages implemented in Spoofax, which uses both NaBL2 and Statix to declare their static semantics and name binding rules. As a result, Spoofax now provides an automated Rename refactoring that works for any language developed with the language workbench using NaBL2/Statix. Subject refactoringrenamingspoofaxstatixstrategolanguage-parametric To reference this document use: http://resolver.tudelft.nl/uuid:60f5710d-445d-4583-957c-79d6afa45be5 Part of collection Student theses Document type master thesis Rights © 2021 Phil Misteli Files PDF Misteli_Thesis_Report_Final.pdf 957.71 KB Close viewer /islandora/object/uuid:60f5710d-445d-4583-957c-79d6afa45be5/datastream/OBJ/view