Abstract
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.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
References
Fowler, M.: Refactoring: Improving the Design of Existing Programs. Addison-Wesley (1999)
Opdyke, W.: Refactoring Object-Oriented Frameworks. PhD thesis, University of Illinois at Urbana-Champaign (1992)
Opdyke, W., Johnson, R.: Creating abstract superclasses by refactoring. In: Proc. ACM Computer Science Conference, ACM Press (1993) 66–73
Roberts, D., Brant, J., Johnson, R.: A refactoring tool for Smalltalk. Theory and Practice of Object Systems 3 (1997) 253–263
Casais, E.: Automatic reorganization of object-oriented hierarchies: a case study. Object Oriented Systems 1 (1994) 95–115
Tichelaar, S.: Modeling Object-Oriented Software for Reverse Engineering and Refactoring. PhD thesis, University of Bern (2001)
Sunyé, G., Pollet, D., LeTraon, Y., Jézéquel, J.M.: Refactoring UML models. In: Proc. UML 2001. Volume 2185 of Lecture Notes in Computer Science., Springer-Verlag (2001) 134–138
Roberts, D.: Practical Analysis for Refactoring. PhD thesis, University of Illinois at Urbana-Champaign (1999)
Corradini, A., Ehrig, H., Löwe, M., Montanari, U., Padberg, J.: The category of typed graph grammars and their adjunction with categories of derivations. In: Proceedings 5th International Workshop on Graph Grammars and their Application to Computer Science. Volume 1073 of Lecture Notes in Computer Science., Springer-Verlag (1996) 56–74
Engels, G., Schürr, A.: Encapsulated hierarchical graphs, graph types and meta types. Electronic Notes in Theoretical Computer Science 2 (1995)
Schürr, A., Winter, A.J., Zündorf, A.: Graph grammar engineering with PROGRES. In Schëfer, W., Botella, P., eds.: Proc. European Conf. Software Engineering. Volume 989 of Lecture Notes in Computer Science., Springer-Verlag (1995) 219–234
Janssens, D., Mens, T.: Abstract semantics for ESM systems. Fundamenta Informaticae 26 (1996) 315–339
Niere, J., Zündorf, A.: Using Fujaba for the development of production control systems. In Nagl, M., Schürr, A., Münch, M., eds.: Proc. Int. Workshop Agtive 99. Volume 1779 of Lecture Notes in Computer Science., Springer-Verlag (2000) 181–191
Ehrig, H.: Introduction to the algebraic theory of graph grammars. In Claus, V., Ehrig, H., Rozenberg, G., eds.: Graph Grammars and Their Application to Computer Science and Biology. Volume 73 of Lecture Notes in Computer Science., Springer-Verlag (1979) 1–69
Löwe, M.: Algebraic approach to single-pushout graph transformation. Theoretical Computer Science 109 (1993) 181–224
Bunke, H.: Programmed graph grammars. In Claus, V., Ehrig, H., Rozenberg, G., eds.: Graph Grammars and Their Application to Computer Science and Biology. Volume 73 of Lecture Notes in Computer Science., Springer-Verlag (1979) 155–166
Kreowski, H.J., Kuske, S.: Graph transformation units and modules. Handbook of Graph Grammars and Computing by Graph Transformation 2 (1999) 607–638
Schürr, A.: Logic based programmed structure rewriting systems. Fundamenta Informaticae 26 (1996) 363–385
Habel, A., Heckel, R., Taentzer, G.: Graph grammars with negative application conditions. Fundamenta Informaticae 26 (1996) 287–313
Heckel, R.: Algebraic graph transformations with application conditions. Master’s thesis, TU Berlin (1995)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2002 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Mens, T., Demeyer, S., Janssens, D. (2002). Formalising Behaviour Preserving Program Transformations. In: Corradini, A., Ehrig, H., Kreowski, H.J., Rozenberg, G. (eds) Graph Transformation. ICGT 2002. Lecture Notes in Computer Science, vol 2505. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-45832-8_22
Download citation
DOI: https://doi.org/10.1007/3-540-45832-8_22
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-44310-0
Online ISBN: 978-3-540-45832-6
eBook Packages: Springer Book Archive