Sciweavers

GG
2004
Springer

Extending Graph Rewriting for Refactoring

14 years 4 months ago
Extending Graph Rewriting for Refactoring
Refactorings are transformations that change the structure of a program, while preserving the behavior. The topic has attracted a lot of attention recently, since it is a promising approach towards the problem of program erosion. Nevertheless a solid theoretical foundation is still lacking. In this paper we focus on improving the expressive power of graph rewriting rules, so that more refactorings can be expressed by single rules. Two new mechanisms are introduced: a notion of refinement of graphs, enabling one to treat specific substructures (e.g. syntax trees of expressions) as a whole, and a notion of duplication, enabling one to use parts of rewriting rules as prototypes that can be instantiated several times. Both mechanisms can be viewed as ways to specify large or infinite sets of rules in a concise way. It is shown that the refactorings PushdownMethod, ExtractMethod and InlineMethod can be expressed using the proposed techniques.
Niels Van Eetvelde, Dirk Janssens
Added 01 Jul 2010
Updated 01 Jul 2010
Type Conference
Year 2004
Where GG
Authors Niels Van Eetvelde, Dirk Janssens
Comments (0)