Cloning and Expanding Graph Transformation Rules for Refactoring

  • Authors:
  • Berthold Hoffmann;Dirk Janssens;Niels Van Eetvelde

  • Affiliations:
  • Technologiezentrum Informatik, Universität Bremen, D-28334 Bremen, Germany;Departement Wiskunde & Informatica, Universiteit Antwerpen, B-2020 Antwerpen, Belgium;Departement Wiskunde & Informatica, Universiteit Antwerpen, B-2020 Antwerpen, Belgium

  • Venue:
  • Electronic Notes in Theoretical Computer Science (ENTCS)
  • Year:
  • 2006

Quantified Score

Hi-index 0.00

Visualization

Abstract

Refactoring is a software engineering technique that aims at enhancing the structure of object-oriented software while preserving its behavior. Several authors have studied how graph transformation can be used to specify refactoring, because such specifications are more precise and can thus, in principle, easier be verified to preserve a program's behavior. It has turned out that ''standard'' ways of graph transformation do not suffice to define refactoring: their expressive power must be increased if they shall be useful in this application area. Two mechanisms have been proposed so far: one for cloning, and one for expanding nodes by graphs. However, the mechanisms and notations needed are rather complex. In this paper we provide, in the context of double pushout graph transformation, a more elegant and intuitive description. It is based on a notion of rule instantiation, where the instantiation transforms rule schemes into rule instances by cloning and expansion. The power of the technique is demonstrated by an application to two well-known refactoring operations.