Incremental Co-Evolution of Java Programs based on Bidirectional Graph Transformation

Modern Java IDE aim at assisting object-oriented software development workflows with continuously interleaved co-evolution steps of program editing and program refactoring. Program editing usually comprises manually performed program changes applied by a programmer at source code level. In contrast, refactorings consist of behavior-preserving program restructuring rules with complex preconditions, usually formulated over an appropriate program abstraction. To integrate both steps into a comprehensive program evolution framework, we present a graph-based approach for incremental co-evolution of Java programs. Our approach is based on a concise graph-based representation of Java programs by means of a reduced abstract syntax tree, augmented with additional cross-tree edges denoting crucial semantic information. On this basis, a precise formal specification of object-oriented program refactorings can be defined in terms of endogenous graph-transformation rules. In addition, we use Triple Graph Grammars (TGG) to define exogenous bidirectional graph transformation rules for automated incremental synchronization between a program graph and the corresponding source code. Our implementation relies on the graph-transformation engine eMoflon and currently supports the Java refactorings Pull Up Method and Create Superclass.

[1]  Tom Mens,et al.  Design preservation over subsequent releases of a software product: a case study of Baan ERP: Practice Articles , 2005 .

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

[3]  David Lorge Parnas,et al.  Software aging , 1994, Proceedings of 16th International Conference on Software Engineering.

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

[5]  Andy Schürr,et al.  Developing eMoflon with eMoflon , 2014, ICMT.

[6]  Fernando Luís Dotti,et al.  Translating Java Code to Graph Transformation Systems , 2004, ICGT.

[7]  Mauricio A. Saca Refactoring improving the design of existing code , 2017, 2017 IEEE 37th Central America and Panama Convention (CONCAPAN XXXVII).

[8]  Torbjörn Ekman,et al.  Stepping Stones over the Refactoring Rubicon , 2009, ECOOP.

[9]  Tom Mens,et al.  A formal approach to model refactoring and model refinement , 2007, Software & Systems Modeling.

[10]  Frank Tip,et al.  Refactoring using type constraints , 2011, TOPL.

[11]  Dirk Janssens,et al.  A Hierarchical Program Representation for Refactoring , 2003, Electron. Notes Theor. Comput. Sci..

[12]  Terrence W. Pratt A hierarchical graph model of the semantics of programs , 1969, AFIPS '69 (Spring).

[13]  Tibor Gyimóthy,et al.  Columbus - reverse engineering tool and schema for C++ , 2002, International Conference on Software Maintenance, 2002. Proceedings..

[14]  Tom Mens,et al.  Analysing refactoring dependencies using graph transformation , 2007, Software & Systems Modeling.

[15]  Oege de Moor,et al.  Specifying and implementing refactorings , 2010, OOPSLA.

[16]  Andy Schürr,et al.  Efficient Model Synchronization with View Triple Graph Grammars , 2014, ECMFA.

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

[18]  Torbjörn Ekman,et al.  Sound and extensible renaming for java , 2008, OOPSLA.

[19]  Hartmut Ehrig,et al.  Fundamentals of Algebraic Graph Transformation (Monographs in Theoretical Computer Science. An EATCS Series) , 1992 .

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

[21]  Andy Schürr,et al.  Specification of Graph Translators with Triple Graph Grammars , 1994, WG.

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

[23]  David D. McDonald,et al.  Programs , 1984, CL.

[24]  Ulrich Norbisrath,et al.  Story Driven Modeling , 1999 .

[25]  Rohit Gheyi,et al.  Making Program Refactoring Safer , 2010, IEEE Software.

[26]  Jordi Cabot,et al.  MoDisco: a generic and extensible framework for model driven reverse engineering , 2010, ASE.

[27]  Marian Vittek Refactoring browser with preprocessor , 2003, Seventh European Conference onSoftware Maintenance and Reengineering, 2003. Proceedings..

[28]  Terence Parr The Definitive ANTLR Reference: Building Domain-Specific Languages , 2007 .

[29]  Beszé Columbus - Reverse Engineering Tool and Schema for C++ , 2002 .

[30]  Albert Zündorf,et al.  Applying Story Driven Modeling to the Paderborn Shuttle System Case Study , 2003, Scenarios: Models, Transformations and Tools.

[31]  Renaud Pawlak,et al.  Spoon: Program Analysis and Transformation in Java , 2006 .

[32]  Tom Mens,et al.  A Taxonomy of Model Transformation , 2006, GRaMoT@GPCE.

[33]  Jose Meseguer,et al.  Formal Specification and Verification of Java Refactorings , 2006, 2006 Sixth IEEE International Workshop on Source Code Analysis and Manipulation.

[34]  Berthold Hoffmann,et al.  Cloning and Expanding Graph Transformation Rules for Refactoring , 2006, GRaMoT@GPCE.

[35]  Friedrich Steimann,et al.  From Public to Private to Absent: Refactoring Java Programs under Constrained Accessibility , 2009, ECOOP.

[36]  P. Cochat,et al.  Et al , 2008, Archives de pediatrie : organe officiel de la Societe francaise de pediatrie.

[37]  Mirko Seifert,et al.  Closing the Gap between Modelling and Java , 2009, SLE.

[38]  M.M. Lehman,et al.  Programs, life cycles, and laws of software evolution , 1980, Proceedings of the IEEE.

[39]  Hartmut Ehrig,et al.  Fundamentals of Algebraic Graph Transformation , 2006, Monographs in Theoretical Computer Science. An EATCS Series.