Refactoring = Substitution + Rewriting
Simon Thompson, D\'aniel Horp\'acsi

TL;DR
This paper introduces a language-independent framework for describing code refactorings through substitution and rewriting, connecting to API migration research and enabling broader application.
Contribution
It proposes an abstract, class-based approach to refactoring that separates substitution from rewriting, facilitating language-independent transformations.
Findings
Framework unifies refactoring and API migration concepts
Implementation demonstrates language-independent substitution
Rewrites incorporate language-specific details
Abstract
We present an approach to describing refactorings that abstracts away from particular refactorings to classes of similar transformations, and presents an implementation of these that works by substitution and subsequent rewriting. Substitution is language-independent under this approach, while the rewrites embody language-specific aspects. Intriguingly, it also goes back to work on API migration by Huiqing Li and the first author, and sets refactoring in that general context.
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsSoftware Engineering Research · Web Data Mining and Analysis · Service-Oriented Architecture and Web Services
