Identifying composite refactorings with a scripting language

Jin Huang,Federico Carminati,Latchezar L. Betev,Cinzia Luzzi,Yansheng Lu,Daicui Zhou
DOI: https://doi.org/10.1109/ICCSN.2011.6014267
2011-01-01
Abstract:Automatic refactoring techniques guarantee the correctness and effectiveness for the transformation of legacy software systems. Our experience of identifying composite refactorings shows that existing techniques can not easily be used to identify them because of the complexity of their composition and the behavior preservation requirement. Inspired by the HTN model which is adopted to formalize the behaviors of composite refactorings, we design a scripting language FLAT, which expresses users' solution for refactoring identification. It provides expressive and understandable representation for composite refactorings. To perform this language, we implement its interpreter EXTRACTOR, an extensible framework with template mechanism. Refactoring compositions are identified by EXTRACTOR constructor, while low-level logic operations on program's intermediate representation are provided by logic query engine. We evaluate EXTRACTOR through various cases and prove its effectiveness of identifying composite refactorings even for aspect-oriented programs.
What problem does this paper attempt to address?