Formalizing refactorings with graph transformations

2005; Wiley; Volume: 17; Issue: 4 Linguagem: Inglês

10.1002/smr.316

ISSN

1532-0618

Autores

Tom Mens, Niels Van Eetvelde, Serge Demeyer, Dirk Janssens,

Tópico(s)

Software Engineering Techniques and Practices

Resumo

Journal of Software Maintenance and Evolution: Research and PracticeVolume 17, Issue 4 p. 247-276 Research Article Formalizing refactorings with graph transformations Tom Mens, Corresponding Author Tom Mens [email protected] Service de Génie Logiciel, Université de Mons-Hainaut, Avenue du Champ de Mars 6, 7000 Mons, BelgiumService de Génie Logiciel, Université de Mons-Hainaut, Avenue du Champ de Mars 6, 7000 Mons, Belgium===Search for more papers by this authorNiels Van Eetvelde, Niels Van Eetvelde Department of Mathematics and Computer Science, Universiteit Antwerpen, Middelheimlaan 1, 2020 Antwerpen, BelgiumSearch for more papers by this authorSerge Demeyer, Serge Demeyer Department of Mathematics and Computer Science, Universiteit Antwerpen, Middelheimlaan 1, 2020 Antwerpen, BelgiumSearch for more papers by this authorDirk Janssens, Dirk Janssens Department of Mathematics and Computer Science, Universiteit Antwerpen, Middelheimlaan 1, 2020 Antwerpen, BelgiumSearch for more papers by this author Tom Mens, Corresponding Author Tom Mens [email protected] Service de Génie Logiciel, Université de Mons-Hainaut, Avenue du Champ de Mars 6, 7000 Mons, BelgiumService de Génie Logiciel, Université de Mons-Hainaut, Avenue du Champ de Mars 6, 7000 Mons, Belgium===Search for more papers by this authorNiels Van Eetvelde, Niels Van Eetvelde Department of Mathematics and Computer Science, Universiteit Antwerpen, Middelheimlaan 1, 2020 Antwerpen, BelgiumSearch for more papers by this authorSerge Demeyer, Serge Demeyer Department of Mathematics and Computer Science, Universiteit Antwerpen, Middelheimlaan 1, 2020 Antwerpen, BelgiumSearch for more papers by this authorDirk Janssens, Dirk Janssens Department of Mathematics and Computer Science, Universiteit Antwerpen, Middelheimlaan 1, 2020 Antwerpen, BelgiumSearch for more papers by this author First published: 27 July 2005 https://doi.org/10.1002/smr.316Citations: 64AboutPDF ToolsRequest permissionExport citationAdd to favoritesTrack citation ShareShare Give accessShare full text accessShare full-text accessPlease review our Terms and Conditions of Use and check box below to share full-text version of article.I have read and accept the Wiley Online Library Terms and Conditions of UseShareable LinkUse the link below to share a full-text version of this article with your friends and colleagues. Learn more.Copy URL Share a linkShare onEmailFacebookTwitterLinkedInRedditWechat Abstract The widespread interest in refactoring—transforming the source-code of an object-oriented program without changing its external behaviour—has increased the need for a precise definition of refactoring transformations and their properties. In this paper we explore the use of graph rewriting for specifying refactorings and their effect on programs. We introduce a graph representation for programs and show how two representative refactorings can be expressed by graph productions. Then we demonstrate that it is possible to prove that refactorings preserve certain program properties, and that graph rewriting is a suitable formalism for such proofs. Copyright © 2005 John Wiley & Sons, Ltd. REFERENCES 1Fowler M. Refactoring: Improving the Design of Existing Programs. Addison-Wesley: Reading MA, 1999. Google Scholar 2Opdyke WF. Refactoring object-oriented frameworks. PhD Thesis, University of Illinois at Urbana-Champaign, IL, 1992. Google Scholar 3Opdyke WF, Johnson RE. Creating abstract superclasses by refactoring. Proceedings ACM Computer Science Conference. ACM Press: New York NY, 1993; 66–73. 10.1145/170791.170804 Google Scholar 4Mens T, Tourwé T. A survey of software refactoring. Transactions on Software Engineering 2004; 30(2): 126–139. 10.1109/TSE.2004.1265817 Web of Science®Google Scholar 5Roberts D, Brant J, Johnson RE. A refactoring tool for Smalltalk. Theory and Practice of Object Systems 1997; 3(4): 253–263. 10.1002/(SICI)1096-9942(1997)3:4 3.0.CO;2-T Google Scholar 6Casais E. Automatic reorganization of object-oriented hierarchies: A case study. Object Oriented Systems 1994; 1: 95–115. Google Scholar 7Tichelaar S. Modeling object-oriented software for reverse engineering and refactoring. PhD Thesis, University of Bern, 2001. Google Scholar 8Lämmel R. Towards generic refactoring. RULE '02: Proceedings of the 2002 ACM SIGPLAN Workshop on Rule-based Programming. ACM Press: New York NY, 2002; 15–28. 10.1145/570186.570188 Google Scholar 9Boger M, Sturm T, Fragemann P. Refactoring browser for UML. Proceedings 3rd International Conference on eXtreme Programming and Agile Processes in Software Engineering. IEEE Computer Society Press: Washington DC, 2002; 77–81. Google Scholar 10Sunyé G, Pollet D, LeTraon Y, Jézéquel J-M. Refactoring UML models. Proceedings UML 2001 ( Lecture Notes in Computer Science, vol. 2185). Springer: Berlin, 2001; 134–138. 10.1007/3-540-45441-1_11 Google Scholar 11Roberts D. Practical analysis for refactoring. PhD Thesis, University of Illinois at Urbana-Champaign, IL, 1999. Google Scholar 12Mens T, Demeyer S, Janssens D. Formalising behaviour preserving program transformations. Proceedings 1st International Conference on Graph Transformation ( Lecture Notes in Computer Science, vol. 2505). Springer: Berlin, 2002; 286–301. 10.1007/3-540-45832-8_22 Web of Science®Google Scholar 13Van Eetvelde N, Janssens D. Extending graph transformation for refactoring. Graph Transformations ( Lecture Notes in Computer Science, vol. 3256). Springer: Berlin, 2004; 399–415. 10.1007/978-3-540-30203-2_28 Web of Science®Google Scholar 14Taentzer G, Bottoni P, Presicce FP. Specifying integrated refactoring with distributed graph transformations. Proceedings of AGTIVE 2003 ( Lecture Notes in Computer Science, vol. 3062). Springer: Berlin, 2003; 227–242. Google Scholar 15Kniesel G, Koch H. Static composition of refactorings. Science of Computer Programming 2004; 52(1–3): 9–51. 10.1016/j.scico.2004.03.002 Web of Science®Google Scholar 16Demeyer S, Janssens D, Mens T. Simulation of a LAN ( Electronic Notes in Theoretical Computer Science, vol. 72(4)). Elsevier: Amsterdam, 2002. Available at: http://www.informatik.uni-trier.de/˜ley/db/journals/entcs/entcs72.html. Google Scholar 17Demeyer S, DuBois B. Refactoring lab session experiment. http://www.lore.ua.ac.be/Research/Artefacts/refactoringLabSession/ [6 May 2005]. Google Scholar 18Van Eetvelde N. Refactorings as graph transformations. Technical Report UA WIS/INF 2005/04, University of Antwerp, Antwerp, Belgium, 2005. Google Scholar 19Mens T, Taentzer G, Runge O. Analysing refactoring dependencies using graph transformation. Technical Report, University of Mons-Hainaut, Mons, Belgium, 2005. Google Scholar 20Van Gorp P, Stenten H, Mens T, Demeyer S. Towards automating source-consistent UML refactorings. Proceedings UML 2003 (The Unified Modeling Language) ( Lecture Notes in Computer Science, vol. 2863), P Stevens, J Whittle, G Booch (eds.). Springer: Berlin, October 2003; 144–159. 10.1007/978-3-540-45221-8_15 Google Scholar 21Engels G, Schürr A. Encapsulated Hierarchical Graphs, Graph Types and Meta Types ( Electronic Notes in Theoretical Computer Science, vol. 2). Elsevier: Amsterdam, 1995. Available at: http://www.informatik.uni-trier.de/˜ley/db/journals/entcs/entcs2.html. Google Scholar 22Corradini A, Ehrig H, Löwe M, Montanari U, Padberg J. The category of typed graph grammars and their adjunction with categories of derivations. Proceedings 5th International Workshop on Graph Grammars and their Application to Computer Science ( Lecture Notes in Computer Science, vol. 1073). Springer: Berlin, 1996; 56–74. 10.1007/3-540-61228-9_79 Google Scholar 23Mendelzon AO, Wood PT. Finding regular simple paths in graph databases. Proceedings of the 15th International Conference on Very Large Data Bases. Morgan Kaufmann: San Mateo CA, 1989; 185–193. Web of Science®Google Scholar 24Consens MP, Mendelzon AO. GraphLog: A visual formalism for real life recursion. Proceedings of the ACM Symposium on Principles of Database Systems. ACM Press: New York NY, 1990; 404–416. Web of Science®Google Scholar 25Bunke H. Programmed graph grammars. Graph Grammars and Their Application to Computer Science and Biology ( Lecture Notes in Computer Science, vol. 73). Springer: Berlin, 1979; 155–166. 10.1007/BFb0025718 Google Scholar 26Kreowski H-J, Kuske S. Graph transformation units and modules. Handbook of Graph Grammars and Computing by Graph Transformation, vol. 2. World Scientific: Singapore, 1999; 607–638. 10.1142/9789812815149_0015 Google Scholar 27Schürr A. Logic based programmed structure rewriting systems. Fundamenta Informaticae 1996; 26(3–4): 363–385. Google Scholar 28Ehrig H. Introduction to the algebraic theory of graph grammars. Graph Grammars and Their Application to Computer Science and Biology ( Lecture Notes in Computer Science, vol. 73), V Claus, H Ehrig, G Rozenberg (eds.). Springer: Berlin, 1979; 1–69. 10.1007/BFb0025714 Google Scholar 29Engelfriet J, Rozenberg G. Node replacement graph grammars. Handbook of Graph Grammars and Computing by Graph Transformation, vol. 1. World Scientific: Singapore, 1997; 1–94. 10.1142/9789812384720_0001 Google Scholar 30Janssens D, Mens T. Abstract semantics for ESM systems. Fundamenta Informaticae 1996; 26(3–4): 315–339. Google Scholar 31Habel A, Heckel R, Taentzer G. Graph grammars with negative application conditions. Fundamenta Informaticae 1996; 26(3–4): 287–313. Google Scholar 32Heckel R. Algebraic graph transformations with application conditions. Master's Thesis, TU Berlin, 1995. Google Scholar 33Köhler HJ, Nickel U, Niere J, Zündorf A. Integrating UML diagrams for production control systems. Proceedings International Conference Software Engineering. ACM Press: New York NY, 2000; 241–251. Web of Science®Google Scholar 34Niere J, Zündorf A. Using Fujaba for the development of production control systems. Proceedings International Workshop Agtive 99 ( Lecture Notes in Computer Science, vol. 1779), M Nagl, A Schürr, M Münch (eds.). Springer: Berlin, 2000; 181–191. 10.1007/3-540-45104-8_13 Web of Science®Google Scholar 35Taentzer G. AGG: A tool environment for algebraic graph transformation. Proceedings AGTIVE 99 ( Lecture Notes in Computer Science, vol. 1779). Springer: Berlin, 1999; 481–488. Google Scholar 36Object Management Group. Unified Modeling Language specification version 1.4, formal/2001-09-67, September 2001. Google Scholar Citing Literature Volume17, Issue4July/August 2005Pages 247-276 ReferencesRelatedInformation

Referência(s)