Abstract
Model transformations play an essential role in most model-driven software projects. As the size and complexity of model transformations increase, their reuse, evolution and maintenance become a challenge. This work further details the Model Transformation TEst Specification (MoTES) approach, which leverages contract-based model testing techniques to assist engineers in model transformation evolution and repairing. The main novelty of our approach is to use contract-based model transformation testing as a foundation to derive suggestions of concrete adaptation actions. MoTES uses contracts to specify the expected behaviour of the model transformation under test. These contracts are transformed into model transformations which act as oracles on input–output model pairs, previously generated by executing the transformation under test on provided input models. By further processing, the oracles’ output model, precision and recall metrics are calculated for every output pattern (testing results). These metrics are then categorised to increase the user’s ability to interpret and act on them. The MoTES approach defines 8 cases for precision and recall values classification (test result cases). As traceability information is retained from transformation rules to each output pattern, it is possible to classify each transformation rule involved according to its impact on the metrics, e.g. the number of true positives generated. The MoTES approach defines 37 cases for these classifications, with each one linked to a particular (abstract) action suggested on a rule, such as relaxation of the rules. A comprehensive evaluation of this approach is also presented, consisting of three case studies. Two previous case studies performed over two model transformations (UML2ER and E2M) are replicated to contrast MoTES with an existing model transformation fault localisation approach. An additional case study presents how MoTES helps with the evolution of an existing model transformation in the context of a reverse engineering project. Main evaluation results show that our approach can not only detect the errors introduced in the transformations but also localise the faulty rule and suggest the proper repair actions, which significantly reduce testers’ effort. From a quantitative perspective, in the third case study, MoTES was able to indicate one faulty rule from 19 possibilities for each result case and suggest one or two repair actions from 6 possibilities for each faulty rule.
Similar content being viewed by others
Notes
We chose ATL for convenience, but MoTES contracts could also be transformed to other transformation languages.
Any rule-based transformation engine with trace support might be used. Herein we use https://wiki.eclipse.org/ATL/EMFTVM#Advanced_tracing.
References
Mussbacher, G., Amyot, D., Breu, R., Bruel, J.-M., Cheng, B.H.C., Collet, P., Benoit, C., Robert B.F., Rogardt H., James H., Jörg, K., Matthias, S.: The relevance of model-driven engineering thirty years from now. In: Model-Driven Engineering Languages and Systems, pp. 183–200 (2014)
Baudry, B., Dinh-trong, T., Mottu, J.-M., Simmonds, D., France, R., Ghosh, S., Fleurey, F., Le Traon, Y.: Model transformation testing challenges. In: Proceedings of IMDT Work Conjunction with ECMDA’06 (2006)
Baudry, B., Ghosh, S., Fleurey, F., France, R., Le Traon, Y., Mottu, J.-M.: Barriers to Systematic Model Transformation Testing. Commun. ACM 53(6), 139–143 (2010)
Rahim, L.A., Whittle, J.: A survey of approaches for verifying model transformations. Softw. Syst. Model. 14(2), 1003–1028 (2013)
Vallecillo, A., Gogolla, M., Burgueño, L., Wimmer, M., Hamann, L.: Formal specification and testing of model transformations. In: Formal Methods for Model-Driven Engineering, pp. 399–437. Springer, Berlin (2012)
Guerra, E., Soeken, M.: Specification-driven model transformation testing. Softw. Syst. Model. 14(2), 623–644 (2015)
Burgueño, L., Troya, J., Wimmer, M., Vallecillo, A.: Static fault localization in model transformations. IEEE Trans. Softw. Eng. 41(5), 490–506 (2015)
Cheng, Z., Tisi, M.: Slicing ATL model transformations for scalable deductive verification and fault localization. Int. J. Softw. Tools Technol. Transfer 20(6), 645–663 (2018)
Cuadrado, J.S., Guerra, E., de Lara, J.: Quick fixing ATL transformations with speculative analysis. Softw. Syst. Model. 17(3), 779–813 (2018)
Guerra, E., Cuadrado, J.S., de Lara, J.: Towards effective mutation testing for ATL. In: 2019 ACM/IEEE 22nd International Conference on Model Driven Engineering Languages and Systems (MODELS), pp. 78–88. IEEE (2019)
Troya, J., Segura, S., Parejo, J.A., Ruiz-Cortés, A.: Spectrum-based fault localization in model transformations. ACM Trans. Softw. Eng. Methodol. 27(3), 1–50 (2018)
Li, P., Jiang, M., Ding, Z.: Fault localization with weighted test model in model transformations. IEEE Access 8, 14054–14064 (2020)
Kretschmer, R., Khelladi, D.E., Demuth, A., Lopez-Herrejon, R.E., Egyed, A.: From Abstract to concrete repairs of model inconsistencies: an automated approach. In: Proceedings—Asia-Pacific Software Engineering Conference, APSEC, 2017-December, pp. 456–465 (2018)
Rodriguez-Echeverria, R., Macías, F.: A statistical analysis approach to assist model transformation evolution. In: 18th International Conference on Model Driven Engineering Languages and Systems (MODELS), pp. 226–235, Ottawa, Canada (2015)
Rodriguez-Echeverria, R., Macías, F., Rutle, A.: On reducing model transformation testing overhead. In: 2nd Joint International Workshop on Patterns in Model Engineering and the 5th International Workshop on the Verification of Model Transformation, PAME-VOLT 2016, CEUR Workshop Proceedings. vol. 1693, pp. 58–67 (2016)
Gogolla, M., Vallecillo, A.: Tractable model transformation testing. In: France, Robert B., Kuester, Jochen M., Bordbar, Behzad, Paige, Richard F. (eds.) Modelling Foundations and Applications. number 6698 in Lecture Notes in Computer Science, pp. 221–235. Springer, Berlin (2011)
Guerra, E., de Lara, J., Wimmer, M., Kappel, G., Kusel, A., Retschitzegger, W., Schönböck, J., Schwinger, W.: Automated verification of model transformations based on visual contracts. Autom. Softw. Eng. 20(1), 5–46 (2013)
Bettini, L.: Implementing Domain-Specific Languages with Xtext and Xtend. Packt Publishing Ltd, London (2016)
Jouault, F., Allilaire, F., Bézivin, J., Kurtev, I.: ATL: a model transformation tool. Sci. Comput. Program. 72(1–2), 31–39 (2008)
Schürr, A., Klar, F.: 15 years of triple graph grammars. In: Hartmut, E., Reiko, H., Grzegorz, R., Gabriele T. (eds) Graph Transformations, 4th International Conference, ICGT 2008, Leicester, United Kingdom, September 7–13, 2008. Proceedings, volume 5214 of Lecture Notes in Computer Science, pp. 411–425. Springer (2008)
Anjorin, A.: An introduction to triple graph grammars as an implementation of the delta-lens framework. In: Jeremy, G., Perdita, S. (eds.) Bidirectional Transformations: International Summer School, Oxford, UK, July 25-29, 2016, Tutorial Lectures, pp. 29–72, Springer, Cham (2018)
Ehrig, H., Ehrig, K., Prange, U., Taentzer, G.: Fundamentals of algebraic graph transformation. In: Monographs in Theoretical Computer Science. An EATCS Series. Springer, Berlin (2006)
Cerioli, M., Margaria, T., Wermelinger, M., de Lara, J., Ehrig, H., Ehrig, K., Prange, U., Taentzer, G., Roswitha, B.: Fundamental aspects of software engineering attributed graph transformation with node type inheritance. Theor. Comput. Sci. 376(3), 139–163 (2007)
Troya, J., Bergmayr, A., Burgueño, L., Wimmer, M.: Towards systematic mutations for and with ATL model transformations. In: 2015 IEEE Eighth International Conference on Software Testing, Verification and Validation Workshops (ICSTW), pp. 1–10. IEEE (2015)
Guerra, E., Cuadrado, J.S., de Lara, J.: Towards effective mutation testing for ATL. In: 2019 ACM/IEEE 22nd International Conference on Model Driven Engineering Languages and Systems (MODELS), pp. 78–88 (2019)
Troya, J., Burgueño, L., Wimmer, M., Vallecillo, A.: Mutations in ATL Transformations and their Identification with Matching Tables. Technical Report 2, University of Malaga (2014)
Jia, Y., Harman, M.: An analysis and survey of the development of mutation testing. IEEE Trans. Softw. Eng. 37(5), 649–678 (2011)
Mottu, J.-M.., Baudry, B., Le Traon, Y.: Mutation analysis testing for model transformations. In: Rensink, A., Warmer, J. (eds.) Second European Conference, ECMDA-FA 2006, Bilbao, Spain, July 10–13, 2006. Proceedings, Lecture Notes in Computer Science, pp. 376–390. Springer, Berlin (2006)
Bergmayr, A., Troya, J., Wimmer, M.: From out-place transformation evolution to in-place model patching. In: Proceedings of the 29th ACM/IEEE International Conference on Automated Software Engineering—ASE ’14, ASE ’14, pp. 647–652, ACM Press, New York (2014)
Rodríguez-Echeverría, R., Conejero, J.M., Clemente, P.J., Preciado, J.C., Sánchez-Figueroa, F.: Modernization of legacy web applications into rich internet applications. In: Andreas, H., Nora, K. (eds.) Current Trends in Web Engineering, pp. 236–250, Springer, Berlin (2012)
Conejero, J.M., Rodríguez-Echeverría, R., Sánchez-Figueroa, F., Linaje, M., Preciado, J.C., Clemente, P.J.: Re-engineering legacy Web applications into RIAs by aligning modernization requirements, patterns and RIA features. J. Syst. Softw. 86(12), 2981–2994 (2013)
Rodriguez-Echeverria, R., Pavón, V.M., Macías, F., Conejero, J.M., Clemente, P.J., Sánchez-Figueroa, F.: IFML-based Model-Driven Front-End Modernization. In: Strahonja, V., Vrček, N., Plantak Vukovac, D., Barry, C., Lang, M., Linger, H., Schneider, C. (eds.) 24th Information Systems Development: Transforming Organisations and Society through Information Systems (ISD2014), pp. 226–233, Varaždin, Croatia (2014)
Brunelière, H., Cabot, J., Dupé, G., Madiot, F.: MoDisco: a model driven reverse engineering framework. Inf. Softw. Technol. 56(8), 1012–1032 (2014)
Wohlin, C., Runeson, P., Höst, M., Ohlsson, M.C., Regnell, B., Wesslén, A.: Experimentation in Software Engineering: An Introduction. Kluwer Academic Publishers, Norwell (2000)
Hibberd, M., Lawley, M., Raymond, K.: Forensic debugging of model transformations. Model Driven Eng. Lang. Syst. 4735(4735), 589–604 (2007)
Mottu, J.-M., Baudry, B., Le Traon, Y.: Model transformation testing: oracle issue. In: IEEE International Conference on Software Testing Verification and Validation Workshop, 2008. ICSTW ’08, pp. 105–112 (2008)
Büttner, F., Egea, M., Cabot, J.: On verifying ATL transformations using ‘off-the-shelf’ SMT solvers. In: Robert, B., France, J.K., Ruth, B., Colin, A. (eds.) Model Driven Engineering Languages and Systems, number 7590 in Lecture Notes in Computer Science, pp. 432–448. Springer, Berlin (2012)
Gehan, M.K., Selim, F.B., James, R.C., Juergen, D., Shige, W.: Automated verification of model transformations in the automotive industry. In: Moreira, A., Schätz, B., Gray, J., Vallecillo, A., Clarke, P. (eds.) Model-Driven Engineering Languages and Systems. number 8107 in Lecture Notes in Computer Science, pp. 690–706. Springer, Berlin (2013)
García-Domínguez, A., Kolovos, D.S., Rose, L.M., Paige, R.F., Medina-Bulo, I.: Eunit: a unit testing framework for model management tasks. In: Model Driven Engineering Languages and Systems, pp. 395–409. Springer, Berlin (2011)
Oakes, B.J., Troya, J., Lúcio, L., Wimmer, M.: Full contract verification for ATL using symbolic execution. Software and Systems Modeling, pp. 1–35 (2016)
Cheng, Z., Tisi, M.: A deductive approach for fault localization in ATL model transformations. In: International Conference on Fundamental Approaches to Software Engineering, pp. 300–317. Springer, Berlin (2017)
Cheng, Z., Tisi, M.: Incremental deductive verification for relational model transformations. In: 2017 IEEE International Conference on Software Testing, Verification and Validation (ICST), pp. 379–389. IEEE (2017)
Cuadrado, J.S., Guerra, E., de Lara, J.: Static analysis of model transformations. IEEE Trans. Softw. Eng. 43(9), 868–897 (2017)
Abreu, R., Zoeteweij, P., Golsteijn, R., van Gemund, A.J.C.: A practical evaluation of spectrum-based fault localization. J. Syst. Softw. 82(11), 1780–1792 (2009)
Aranega, V., Mottu, J.-M., Etien, A., Dekeyser, J.-L.: Traceability mechanism for error localization in model transformation. ICSOFT 1, 66–73 (2009)
Jiang, M., Chen, T.Y., Kuo, F.C., Zhou, Z.Q., Ding, Z.: Testing model transformation programs using metamorphic testing. In: Proceedings of the International Conference on Software Engineering and Knowledge Engineering, SEKE, 2014-January, pp. 94–99 (2014)
Troya, J., Segura, S., Ruiz-Cortés, A.: Automated inference of likely metamorphic relations for model transformations. J. Syst. Softw. 136, 1339–1351 (2018)
Cuadrado, J.S., Guerra, E., de Lara, J.: Quick fixing ATL model transformations. In: 2015 ACM/IEEE 18th International Conference on Model Driven Engineering Languages and Systems (MODELS), pp. 146–155. IEEE, (2015)
Muşlu, K., Brun, Y., Holmes, R., Ernst, M.D., Notkin, D.: Speculative analysis of integrated development environment recommendations. ACM SIGPLAN Notices 47(10), 669–682 (2012)
Khelladi, D.E., Kretschmer, R., Egyed, A.: Change propagation-based and composition-based co-evolution of transformations with evolving metamodels. In: Proceedings of the 21th ACM/IEEE International Conference on Model Driven Engineering Languages and Systems, pp. 404–414 (2018)
Khelladi, D.E., Kretschmer, R., Egyed, A.: Detecting and exploring side effects when repairing model inconsistencies. In: Proceedings of the 12th ACM SIGPLAN International Conference on Software Language Engineering, pp. 113–126 (2019)
Kolovos, D.S., Rose, L.M., Paige, R.F.: The Epsilon Book. Eclipse Foundation Inc., Ottawa (2011)
García, J., Diaz, O., Azanza, M.: Model transformation co-evolution: a semi-automatic approach. In International Conference on Software Language Engineering, pp. 144–163. Springer, Berlin (2012)
Kusel, A., Etzlstorfer, J., Kapsammer, E., Retschitzegger, W., Schwinger, W., Schönböck, J.: Consistent co-evolution of models and transformations. In: 2015 ACM/IEEE 18th International Conference on Model Driven Engineering Languages and Systems (MODELS), pp. 116–125. IEEE (2015)
Ruscio, D.D., Iovino, L., Pierantonio, A.: A methodological approach for the coupled evolution of metamodels and atl transformations. In: International Conference on Theory and Practice of Model Transformations, pp. 60–75. Springer, Berlin (2013)
Di Rocco, J., Di Ruscio, D., Iovino, L., Pierantonio, A.: Dealing with the coupled evolution of metamodels and model-to-text transformations. In: ME@ MoDELS, pp. 22–31 (2014)
Wimmer, M., Martínez, S., Jouault, F., Cabot, J.: A catalogue of refactorings for model-to-model transformations. J. Object Technol. 11(2), 2–1 (2012)
Alkhazi, B., Ruas, T., Kessentini, M., Wimmer, M., Grosky, W.I.: Automated refactoring of ATL model transformations. In: Proceedings of the ACM/IEEE 19th International Conference on Model Driven Engineering Languages and Systems—MODELS ’16, pp. 295–304 (2016)
Acknowledgements
The authors wish to acknowledge the collaborative funding support from (i) Spanish Contract RTI2018-098652-B-I00, and (ii) Consejería de Economía e Infraestructuras, Junta de Extremadura (Spain)—European Regional Development Fund (ERDF)- GR18112 Project, and IB18034 project. This work has also been partially supported by Comunidad de Madrid as part of the Project 49/520608.9/18 (MADRIDFLIGHTONCHIP) co-funded by ERDF Funds of the European Union.
Author information
Authors and Affiliations
Corresponding author
Additional information
Communicated by Esther Guerra.
Publisher's Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Rights and permissions
About this article
Cite this article
Rodriguez-Echeverria, R., Macías, F., Rutle, A. et al. Suggesting model transformation repairs for rule-based languages using a contract-based testing approach. Softw Syst Model 21, 81–112 (2022). https://doi.org/10.1007/s10270-021-00891-0
Received:
Revised:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s10270-021-00891-0