Analysing refactoring dependencies using graph transformation

Refactoring is a widely accepted technique to improve the structure of object-oriented software. Nevertheless, existing tool support remains restricted to automatically applying refactoring transformations. Deciding what to refactor and which refactoring to apply still remains a difficult manual process, due to the many dependencies and interrelationships between relevant refactorings. In this paper, we represent refactorings as graph transformations, and we propose the technique of critical pair analysis to detect the implicit dependencies between refactorings. The results of this analysis can help the developer to make an informed decision of which refactoring is most suitable in a given context and why. We report on several experiments we carried out in the AGG graph transformation tool to support our claims.

[1]  Hartmut Ehrig,et al.  Fundamental Theory for Typed Attributed Graph Transformation , 2004, ICGT.

[2]  Tom Mens,et al.  A survey of software refactoring , 2004, IEEE Transactions on Software Engineering.

[3]  Shi-Kuo Chang,et al.  Visual Languages , 1986, Management and Information Systems.

[4]  Gabriele Taentzer,et al.  Specifying Integrated Refactoring with Distributed Graph Transformations , 2003, AGTIVE.

[5]  Oscar Nierstrasz,et al.  A meta-model for language-independent refactoring , 2000, Proceedings International Symposium on Principles of Software Evolution.

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

[7]  Gabriele Taentzer,et al.  Specifying Coherent Refactoring of Software Artefacts with Distributed Graph Transformation , 2004 .

[8]  Takuya Katayama Principles of Software Evolution , 1996, APSEC.

[9]  Bernhard Westfechtel,et al.  Structure-oriented merging of revisions of software documents , 1991, SCM '91.

[10]  Tom Mens,et al.  Case Study: Simulation of a LAN , 2003, Software Evolution Through Transformations @ ICGT.

[11]  Tom Mens,et al.  Formalizing refactorings with graph transformations , 2005, J. Softw. Maintenance Res. Pract..

[12]  Alan Bundy,et al.  Constructing Induction Rules for Deductive Synthesis Proofs , 2006, CLASE.

[13]  Thorsten Sturm,et al.  Refactoring Browser for UML , 2002, NetObjectDays.

[14]  Reiko Heckel,et al.  Detection of conflicting functional requirements in a use case-driven approach , 2002, Proceedings of the 24th International Conference on Software Engineering. ICSE 2002.

[15]  Claus Lewerentz,et al.  Metrics Based Refactoring , 2001, CSMR.

[16]  Ivar Jacobson,et al.  Unified Modeling Language , 2020, Definitions.

[17]  Tom Mens,et al.  Towards Automating Source-Consistent UML Refactorings , 2003, UML.

[18]  Perdita Stevens,et al.  Object-Oriented Technology: ECOOP’98 Workshop Reader , 1998 .

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

[20]  Ragnhild Van Der Straeten,et al.  Detecting and resolving model inconsistencies using transformation dependency analysis , 2006, MoDELS'06.

[21]  Detlef Plump,et al.  Hypergraph rewriting: critical pairs and undecidability of confluence , 1993 .

[22]  Reiko Heckel,et al.  Confluence of Typed Attributed Graph Transformation Systems , 2002, ICGT.

[23]  Hartmut Ehrig,et al.  Efficient Detection of Conflicts in Graph-based Model Transformation , 2006, Electron. Notes Theor. Comput. Sci..

[24]  Dirk Janssens,et al.  Extending Graph Rewriting for Refactoring , 2004, ICGT.

[25]  Jeffrey G. Gray,et al.  Generic and Domain-Specific Model Refactoring Using a Model Transformation Engine , 2005, Model-Driven Software Development.

[26]  Gabriele Taentzer,et al.  Efficient parsing of visual languages based on critical pair analysis and contextual layered graph transformation , 2000, Proceeding 2000 IEEE International Symposium on Visual Languages.

[27]  Stuart Kent,et al.  Model Driven Engineering , 2002, IFM.

[28]  Radu Marinescu Using Object-Oriented Metrics for Automatic Design Flaws Detection in Large Scale Systems , 1998, ECOOP Workshops.

[29]  Patrick van Bommel,et al.  Transformation of Knowledge, Information and Data: Theory and Applications , 2005 .

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

[31]  Serge Demeyer,et al.  Object-Oriented Technology ECOOP’99 Workshop Reader , 1999, Lecture Notes in Computer Science.

[32]  Tom Mens,et al.  Conditional Graph Rewriting as a Domain-Independent Formalism for Software Evolution , 1999, AGTIVE.

[33]  Tom Mens,et al.  Identifying refactoring opportunities using logic meta programming , 2003, Seventh European Conference onSoftware Maintenance and Reengineering, 2003. Proceedings..

[34]  Pieter Van Gorp,et al.  Leveraging UML Profiles to Generate Plugins From Visual Model Transformations , 2005, Electron. Notes Theor. Comput. Sci..

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

[36]  Leon Moonen,et al.  Java quality assurance by detecting code smells , 2002, Ninth Working Conference on Reverse Engineering, 2002. Proceedings..

[37]  Marko C. J. D. van Eekelen,et al.  Term Graph Rewriting , 1987, PARLE.

[38]  Jan Willem Klop,et al.  Term Graph Rewriting , 1995, HOA.

[39]  Tom Mens,et al.  A State-of-the-Art Survey on Software Merging , 2002, IEEE Trans. Software Eng..

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

[41]  Kathryn A. Ingle,et al.  Reverse Engineering , 1996, Springer US.

[42]  Cláudia Maria Lima Werner,et al.  Applying Refactoring Techniques to UML/OCL Models , 2004, UML.

[43]  Tom Mens,et al.  Detecting Structural Refactoring Conflicts Using Critical Pair Analysis , 2005, SETra@ICGT.

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

[45]  Gabriele Taentzer,et al.  Parallel and distributed graph transformation - formal description and application to communication-based systems , 1996, Berichte aus der Informatik.

[46]  Eugene Miya,et al.  On "Software engineering" , 1985, SOEN.

[47]  Perdita Stevens,et al.  «UML» 2003 - The Unified Modeling Language. Modeling Languages and Applications , 2003, Lecture Notes in Computer Science.

[48]  Ivan Porres,et al.  Model Refactorings as Rule-Based Update Transformations , 2003, UML.

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

[50]  Tom Mens,et al.  Formalising Behaviour Preserving Program Transformations , 2002, ICGT.