Uncovering Errors in ATL Model Transformations Using Static Analysis and Constraint Solving

Model transformations play a prominent role in Model-Driven Engineering (MDE), where they are used to transform models between languages, to refactor and simulate models, or to generate code from models. However, while the reliability of any MDE process depends on the correctness of its transformations, methods helping in detecting errors in transformations and automate their verification are still needed. To improve this situation, we propose a method for the static analysis of one of the most widely used model transformation languages: ATL. The method proceeds in three steps. Firstly, it infers typing information from the transformation and detects potential errors statically. Then, it generates OCL path conditions for the candidate errors, stating the requirements for a model to hit the problematic statements in the transformation. Last, it relies on constraint solving to generate a test model fragment or witness that exercises the transformation, making it execute the problematic statement. Our method is supported by a prototype tool that integrates a static analyzer, a testing tool and a constraint solver. We have used the tool to analyse medium and large-size third-party ATL transformations, discovering a wide number of errors.

[1]  Esther Guerra,et al.  Specification-driven model transformation testing , 2015, Software & Systems Modeling.

[2]  Yves Le Traon,et al.  Barriers to systematic model transformation testing , 2010, Commun. ACM.

[3]  Jordi Cabot,et al.  On the verification of UML/OCL class diagrams using constraint programming , 2014, J. Syst. Softw..

[4]  Shane Sendall,et al.  Model Transformation: The Heart and Soul of Model-Driven Software Development , 2003, IEEE Softw..

[5]  Olivier Barais,et al.  Model Driven Language Engineering with Kermeta , 2009, GTTSE.

[6]  Benoit Baudry,et al.  Automatic Model Generation Strategies for Model Transformation Testing , 2009, ICMT@TOOLS.

[7]  David W. Binkley,et al.  Program slicing , 2008, 2008 Frontiers of Software Maintenance.

[8]  Mark van den Brand,et al.  Model Transformation Analysis: Staying Ahead of the Maintenance Nightmare , 2011, ICMT@TOOLS.

[9]  Andreas Rentschler,et al.  Interactive Dependency Graphs for Model Transformation Analysis , 2013, Demos/Posters/StudentResearch@MoDELS.

[10]  Joe D. Warren,et al.  The program dependence graph and its use in optimization , 1984, TOPL.

[11]  Jean Bézivin,et al.  ATL: A model transformation tool , 2008, Sci. Comput. Program..

[12]  Yves Le Traon,et al.  Qualifying input test data for model transformations , 2009, Software & Systems Modeling.

[13]  Jochen Malte Küster,et al.  Validation of model transformations: first experiences using a white box approach , 2006, MoDELS'06.

[14]  Martin Gogolla,et al.  Verification of ATL Transformations Using Transformation Models and Model Finders , 2012, ICFEM.

[15]  Zoltán Ujhelyi Static Type Checking of Model Transformation Programs , 2010, ICGT.

[16]  Alexandr Andoni,et al.  Evaluating the “ Small Scope Hypothesis ” , 2002 .

[17]  Chuan Yi Tang,et al.  A 2.|E|-Bit Distributed Algorithm for the Directed Euler Trail Problem , 1993, Inf. Process. Lett..

[18]  Martin Gogolla,et al.  Model transformations? transformation models! , 2006, MoDELS'06.

[19]  Ákos Horváth,et al.  Dynamic Backward Slicing of Model Transformations , 2012, 2012 IEEE Fifth International Conference on Software Testing, Verification and Validation.

[20]  Jon Whittle,et al.  A survey of approaches for verifying model transformations , 2013, Software & Systems Modeling.

[21]  Juan de Lara,et al.  Reverse Engineering of Model Transformations for Reusability , 2014, ICMT.

[22]  Jordi Cabot,et al.  On verifying ATL transformations using 'off-the-shelf' SMT solvers , 2012, MODELS'12.

[23]  Jordi Cabot,et al.  Static Analysis of Model Transformations for Effective Test Generation , 2012, 2012 IEEE 23rd International Symposium on Software Reliability Engineering.

[24]  Frank Tip,et al.  A survey of program slicing techniques , 1994, J. Program. Lang..

[25]  Jean-Marc Jézéquel,et al.  Meta-model Pruning , 2009, MoDELS.

[26]  Juan de Lara,et al.  Verification and validation of declarative model-to-model transformations through invariants , 2010, J. Syst. Softw..

[27]  Daniel Jackson,et al.  Elements of style: analyzing a software design feature with a counterexample detector , 1996, ISSTA '96.

[28]  Jordi Cabot,et al.  Using Models of Partial Knowledge to Test Model Transformations , 2012, ICMT@TOOLS.

[29]  Mary Jean Harrold,et al.  Slicing object-oriented software , 1996, Proceedings of IEEE 18th International Conference on Software Engineering.

[30]  Franklin Ramalho,et al.  A Static Analyzer for Model Transformations , 2011, MtATL@TOOLS.

[31]  Gregor Snelting,et al.  Efficient path conditions in dependence graphs for software safety analysis , 2006, TSEM.

[32]  Jordi Cabot,et al.  ATLTest: a white-box test generation approach for ATL transformations , 2012, MODELS'12.

[33]  Martin Gogolla,et al.  Extensive Validation of OCL Models by Integrating SAT Solving into USE , 2011, TOOLS.

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