Formalising Behaviour Preserving Program Transformations

The notion of refactoring --transforming the source-code of an object-oriented program without changing its external behaviour-- has increased the need for a precise definition of refactorings and their properties. This paper introduces a graph representation of those aspects of the source code that should be preserved by a refactoring, and graph rewriting rules as a formal specification for the refactoring transformations themselves. To this aim, we use type graphs, forbidden subgraphs, embedding mechansims, negative application conditions and controlled graph rewriting. We show that it is feasible to reason about the effect of refactorings on object-oriented programs independently of the programming language being used. This is crucial for the next generation of refactoring tools.

[1]  Hartmut Ehrig,et al.  Introduction to the Algebraic Theory of Graph Grammars (A Survey) , 1978, Graph-Grammars and Their Application to Computer Science and Biology.

[2]  Andy Schürr Logic Based Programmed Structure Rewriting Systems , 1996, Fundam. Informaticae.

[3]  Horst Bunke Programmed Graph Grammars , 1978, Graph-Grammars and Their Application to Computer Science and Biology.

[4]  Albert Zündorf,et al.  Using FUJABA for the Development of Production Control Systems , 1999, AGTIVE.

[5]  Francesca Rossi,et al.  Graph Processes , 1996, Fundam. Informaticae.

[6]  Don Roberts,et al.  Practical analysis for refactoring , 1999 .

[7]  Jean-Marc Jézéquel,et al.  Refactoring UML Models , 2001, UML.

[8]  H. Kreowski,et al.  Graph transformation units and modules , 1999 .

[9]  Tom Mens,et al.  Abstract Semantics for ESM Systems , 1996, Fundam. Informaticae.

[10]  Bertrand Meyer,et al.  Object-Oriented Software Construction, 2nd Edition , 1997 .

[11]  Martin Fowler,et al.  Refactoring - Improving the Design of Existing Code , 1999, Addison Wesley object technology series.

[12]  Ralph E. Johnson,et al.  Creating abstract superclasses by refactoring , 1993, CSC '93.

[13]  Paul L. Bergstein Maintenance of object-oriented systems during structural evolution , 1997 .

[14]  Hartmut Ehrig,et al.  Graph-Grammars and Their Application to Computer Science and Biology , 1978, Lecture Notes in Computer Science.

[15]  Hartmut Ehrig,et al.  Parallel and Distributed Derivations in the Single-Pushout Approach , 1993, Theor. Comput. Sci..

[16]  Michael Löwe,et al.  Algebraic Approach to Single-Pushout Graph Transformation , 1993, Theor. Comput. Sci..

[17]  Reiko Heckel,et al.  Ensuring consistency of conditional graph rewriting - a constructive approach , 1995, SEGRAGRA.

[18]  Ralph E. Johnson,et al.  A Refactoring Tool for Smalltalk , 1997, Theory Pract. Object Syst..

[19]  Gregor Engels,et al.  Encapsulated hierarchical graphs, graph types, and meta types , 1995, SEGRAGRA.

[20]  簡聰富,et al.  物件導向軟體之架構(Object-Oriented Software Construction)探討 , 1989 .

[21]  Eduardo Casais The Automatic Reorganization of Object Oriented Hierarchies - A Case Study , 1994 .

[22]  Reiko Heckel,et al.  Graph Grammars with Negative Application Conditions , 1996, Fundam. Informaticae.

[23]  Andy Schürr,et al.  Graph Grammar Engineering with PROGRES , 1995, ESEC.

[24]  Sander Tichelaar,et al.  Modeling Object-Oriented Software for Reverse Engineering and Refactoring , 2001 .

[25]  Hartmut Ehrig,et al.  The Category of Typed Graph Grammars and its Adjunctions with Categories , 1994, TAGT.

[26]  Manfred Nagl,et al.  Graph-Grammars and Their Application to Computer Science , 1986, Lecture Notes in Computer Science.

[27]  William F. Opdyke,et al.  Refactoring object-oriented frameworks , 1992 .