Extracting Visual Contracts from Java Programs (T)

Visual contracts model the operations of components or services by pre-and post-conditions formalised as graph transformation rules. They provide a precise intuitive notation to support testing, understanding and analysis of software. However, due to their detailed specification of data states and transformations, modelling real applications is an error-prone process. In this paper we propose a dynamic approach to reverse engineering visual contracts from Java based on tracing the execution of Java operations. The resulting contracts give an accurate description of the observed object transformations, their effects and preconditions in terms of object structures, parameter and attribute values, and their generalised specification by universally quantified (multi) objects. While this paper focusses on the fundamental technique rather than a particular application, we explore potential uses in our evaluation, including in program understanding, review of test reports and debugging.

[1]  Ricardo Terra,et al.  On-the-fly extraction of hierarchical object graphs , 2012, Journal of the Brazilian Computer Society.

[2]  Reiko Heckel,et al.  Model-Driven Monitoring: An Application of Graph Transformation for Design by Contract , 2006, ICGT.

[3]  Lawrence B. Holder,et al.  Learning patterns in the dynamics of biological networks , 2009, KDD.

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

[5]  Dániel Varró,et al.  Model transformation by example using inductive logic programming , 2008, Software & Systems Modeling.

[6]  Reiko Heckel,et al.  Testing against Visual Contracts: Model-Based Coverage , 2012, ICGT.

[7]  Gabriele Taentzer,et al.  Henshin: advanced concepts and tools for in-place EMF model transformations , 2010, MODELS'10.

[8]  Salvatore Tabbone,et al.  Attributed Graph Matching Using Local Descriptions , 2009, ACIVS.

[9]  Stanley M. Sutton,et al.  Hyper/J™: multi-dimensional separation of concerns for Java™ , 2001, ICSE '02.

[10]  Qingshan Jiang,et al.  Notice of Retraction A New Approach of Graph Isomorphism Detection Based on Decision Tree , 2010 .

[11]  Gerti Kappel,et al.  Model Transformation By-Example: A Survey of the First Wave , 2012, Conceptual Modelling and Its Theoretical Foundations.

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

[13]  Reiko Heckel,et al.  Test Case Generation Using Visual Contracts , 2013, Electron. Commun. Eur. Assoc. Softw. Sci. Technol..

[14]  Dénes Bisztray,et al.  Verification of Architectural Refactorings: Rule Extraction and Tool Support , 2008, ICGT.

[15]  H. J. Sander Bruggink,et al.  Towards Process Mining with Graph Transformation Systems , 2014, ICGT.

[16]  Horst Bunke,et al.  Efficient subgraph matching using topological node feature constraints , 2015, Pattern Recognit..

[17]  Clémentine Nebut,et al.  Easing Model Transformation Learning with Automatically Aligned Examples , 2011, ECMFA.

[18]  Mario Vento,et al.  Thirty Years Of Graph Matching In Pattern Recognition , 2004, Int. J. Pattern Recognit. Artif. Intell..

[19]  Stephen McCamant,et al.  The Daikon system for dynamic detection of likely invariants , 2007, Sci. Comput. Program..

[20]  Paolo Tonella,et al.  Reverse engineering of the interaction diagrams from C++ code , 2003, International Conference on Software Maintenance, 2003. ICSM 2003. Proceedings..

[21]  Reiko Heckel,et al.  Towards Dynamic Reverse Engineering Visual Contracts from Java , 2014, Electron. Commun. Eur. Assoc. Softw. Sci. Technol..

[22]  Kai-Yuan Cai,et al.  Adaptive testing of software components , 2005, SAC '05.

[23]  Jun Kong,et al.  Program Behavior Discovery and Verification: A Graph Grammar Approach , 2010, IEEE Transactions on Software Engineering.

[25]  Reiko Heckel,et al.  Electronic Communications of the EASST Volume 58 ( 2013 ) Proceedings of the 12 th International Workshop on Graph Transformation and Visual Modeling Techniques ( GTVMT 2013 ) Learning Minimal and Maximal Rules from Observations of Graph Transformations , 2013 .

[26]  Klaus-Dieter Schewe,et al.  Conceptual Modelling and Its Theoretical Foundations , 2012, Lecture Notes in Computer Science.

[27]  Reiko Heckel,et al.  International Journal of Web Services Research , Vol . 2 , No . 2 , 2005 1 Model-based development of Web service descriptions enabling a precise matching concept , 2005 .

[28]  Houari A. Sahraoui,et al.  Generating model transformation rules from examples using an evolutionary algorithm , 2012, 2012 Proceedings of the 27th IEEE/ACM International Conference on Automated Software Engineering.

[29]  Tewfik Ziadi,et al.  A Fully Dynamic Approach to the Reverse Engineering of UML Sequence Diagrams , 2011, 2011 16th IEEE International Conference on Engineering of Complex Computer Systems.

[30]  Atanas Rountev,et al.  Static control-flow analysis for reverse engineering of UML sequence diagrams , 2005, PASTE '05.

[31]  Gerti Kappel,et al.  Model-to-Model Transformations By Demonstration , 2010, ICMT@TOOLS.

[32]  Dániel Varró,et al.  Model transformation by example , 2006, MoDELS'06.