Abstract
Model transformations play an essential role in the model-driven engineering paradigm. However, writing a correct transformation requires the user to understand both what the transformation should do and how to enact that change in the transformation. This easily leads to syntactic and semantic errors in transformations which are time-consuming to locate and fix. In this article, we extend our evolutionary algorithm (EA) approach to automatically repair transformations containing multiple semantic errors. To prevent the fitness plateaus and the single fitness peak limitations from our previous work, we include the notion of social diversity as an objective for our EA to promote repair patches tackling errors that are less covered by the other patches of the population. We evaluate our approach on four ATL transformations, which have been mutated to contain up to five semantic errors simultaneously. Our evaluation shows that integrating social diversity when searching for repair patches improves the quality of those patches and speeds up the convergence even when up to five semantic errors are involved.
Similar content being viewed by others
Notes
Note that there is a risk that a patch introduces new errors not seen in the original test suite. This situation is not covered in this objective, but instead by objective 2 (Sect. 3.2.2) which penalizes patches that create many errors.
Available online at https://github.com/jgalasso/RepairingATLSemanticErrors.
Experimental data is available at https://github.com/jgalasso/faulty-ATL-transformations.
References
Ali, S., Arcaini, P., Yue, T.: Do quality indicators prefer particular multi-objective search algorithms in search-based software engineering? In: the 12th International Symposium on Search Based Software Engineering (SSBSE), pp. 25–41. Springer (2020). https://doi.org/10.1007/978-3-030-59762-7_3
Alkhazi, B., Abid, C., Kessentini, M., et al.: On the value of quality attributes for refactoring ATL model transformations: a multi-objective approach. Inf. Softw. Technol. 120, 106243 (2020)
Barriga, A., Mandow, L., Pérez-de-la-Cruz, J., et al.: A comparative study of reinforcement learning techniques to repair models. In: The 23rd International Conference on Model Driven Engineering Languages and Systems (MODELS), Companion Proceedings, pp. 47:1–47:9. ACM (2020). https://doi.org/10.1145/3417990.3421395
Barroca, B., Lúcio, L., Amaral, V., et al.: DSLTrans: a turing incomplete transformation language. In: The 3rd International Conference on Software Language Engineering (SLE), pp. 296–305. Springer (2010). https://doi.org/10.1007/978-3-642-19440-5_19
Batot, E., Sahraoui, H.: Injecting social diversity in multi-objective genetic programming: the case of model well-formedness rule learning. In: The 10th International Symposium on Search Based Software Engineering (SSBSE), pp. 166–181. Springer (2018). https://doi.org/10.1007/978-3-319-99241-9_8
Brun, C., Pierantonio, A.: Model differences in the Eclipse modeling framework. UPGRADE Eur. J. Inf. Prof. 9(2), 29–34 (2008)
Burdusel, A., Zschaler, S., John, S.: Automatic generation of atomic multiplicity-preserving search operators for search-based model engineering. Softw. Syst. Model. 20(6), 1857–1887 (2021)
Burgueño, L., Troya, J., Wimmer, M., et al.: Static fault localization in model transformations. IEEE Trans. Softw. Eng. (2015). https://doi.org/10.1109/TSE.2014.2375201
Cheng, Z., Tisi, M.: Slicing ATL model transformations for scalable deductive verification and fault localization. Int. J. Softw. Tools Technol. Transf. 20, 645–663 (2018)
Cuadrado, J.S., Guerra, E., d. Lara, J.: Uncovering errors in ATL model transformations using static analysis and constraint solving. In: the 25th International Symposium on Software Reliability Engineering (ISSRE), pp. 34–44 (2014). https://doi.org/10.1109/ISSRE.2014.10
Cuadrado, J.S., Guerra, E., de Lara, J.: AnATLyzer: An Advanced IDE for ATL Model Transformations. In: The 40th International Conference on Software Engineering (ICSE), Companion Proceedings, pp. 85–88 (2018). https://doi.org/10.1145/3183440.3183479
Cuadrado, J.S., Guerra, E., de Lara, J.: Quick fixing ATL transformations with speculative analysis. Softw. Syst. Model. 17(3), 779–813 (2018). https://doi.org/10.1007/s10270-016-0541-1
Deb, K., Agrawal, S., Pratap, A., et al.: A fast elitist non-dominated sorting genetic algorithm for multi-objective optimisation: NSGA-II. In: International Conference on Parallel Problem Solving from Nature (2000)
Ding, Z.Y., Lyu, Y., Timperley, C., et al.: Leveraging program invariants to promote population diversity in search-based automatic program repair. In: 2019 IEEE/ACM International Workshop on Genetic Improvement (GI), pp. 2–9. IEEE (2019)
Fadhel, A.B, Kessentini, M., Langer, P., et al.: Search-based detection of high-level model changes. In: The 28th IEEE International Conference on Software Maintenance (ICSM), pp. 212–221 (2012). https://doi.org/10.1109/ICSM.2012.6405274
Forrest, S., Nguyen, T., Weimer, W., et al.: A genetic programming approach to automated software repair. In: Proceedings of the 11th Annual Conference on Genetic and Evolutionary Computation, pp. 947–954 (2009)
Galvan, E., Trujillo, L., McDermott, J., et al.: Locality in continuous fitness-valued cases and genetic programming difficulty. In: EVOLVE-A Bridge between Probability, Set Oriented Numerics, and Evolutionary Computation II, pp. 41–56. Springer (2013)
Galván-López, E., McDermott, J., O’Neill, M., et al.: Defining locality as a problem difficulty measure in genetic programming. Genet. Program Evolv. Mach. 12(4), 365–401 (2011)
Guerra, E., de Lara, J., Wimmer, M., et al.: Automated verification of model transformations based on visual contracts. Autom. Softw. Eng. 20(1), 5–46 (2013)
Guerra, E., Sánchez Cuadrado, J., 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). https://doi.org/10.1109/MODELS.2019.00-13
Jouault, F., Allilaire, F., Bézivin, J., et al.: ATL: a model transformation tool. Sci. Comput. Program. 72(1–2), 31–39 (2008)
Kessentini, W., Sahraoui, H., Wimmer, M.: Automated co-evolution of metamodels and transformation rules: A search-based approach. In: Search-Based Software Engineering, pp. 229–245. Springer (2018)
Koza, J.: On the programming of computers by means of natural selection. Genet. Program. (1992)
Krawiec, K., Lichocki, P.: Approximating geometric crossover in semantic space. In: Proceedings of the 11th Annual conference on Genetic and Evolutionary Computation, pp. 987–994 (2009)
Kretschmer, R., Khelladi, D.E., Egyed, A.: An automated and instant discovery of concrete repairs for model inconsistencies. In: Proceedings of the 40th International Conference on Software Engineering: Companion Proceeedings. Association for Computing Machinery, New York, ICSE ’18, pp. 298–299 (2018). https://doi.org/10.1145/3183440.3194979
Lúcio, L., Amrani, M., Dingel, J., et al.: Model transformation intents and their properties. Softw. Syst. Model. 15, 647–684 (2016)
McPhee, N.F., Hopper, N.J., et al.: Analysis of genetic diversity through population history. In: Proceedings of the Genetic and Evolutionary Computation Conference, Citeseer, pp. 1112–1120 (1999)
Mohagheghi, P., Gilani, W., Stefanescu, A., et al.: An empirical study of the state of the practice and acceptance of model-driven engineering in four industrial cases. Empir. Softw. Eng. 18, 89–116 (2013)
Monperrus, M.: Automatic software repair: a bibliography. ACM Comput. Surv. 51(1), 1–24 (2018)
Moraglio, A., Poli, R.: Topological interpretation of crossover. In: Genetic and Evolutionary Computation Conference, pp. 1377–1388. Springer (2004)
Muñoz, P., Troya, J., Wimmer, M., et al.: Revisiting fault localization techniques for model transformations: towards a hybrid approach. J. Object Technol. 21(4) (2022)
Nassar, N., Radke, H., Arendt, T.: Rule-based repair of EMF models: an automated interactive approach. In: Guerra, E., van den Brand, M. (eds.) Theory and Practice of Model Transformation, pp. 171–181. Springer, Cham (2017)
Oakes, B.J., Troya, J., Lúcio, L., et al.: Full contract verification for ATL using symbolic execution. Softw. Syst. Model. 17(3), 815–849 (2018)
Oakes, B.J., Troya, J., Galasso, J., et al.: Fault localization in DSLTrans model transformations by combining symbolic execution and spectrum-based analysis. Softw. Syst. Model. (2023). https://doi.org/10.1007/s10270-023-01123-3
O’Reilly, U.M., Goldberg, D.E.: How fitness structure affects subsolution acquisition in genetic programming. In: Genetic Programming 1998: Proceedings of the Third Annual Conference, Citeseer, pp. 269–277 (1998)
Puissant, J.P., Van Der Straeten, R., Mens, T.: Resolving model inconsistencies using automated regression planning. Softw. Syst. Model. 14(1), 461–481 (2015)
Ramirez, A., Romero, J.R., Ventura, S.: A survey of many-objective optimisation in search-based software engineering. J. Syst. Softw. 149, 382–395 (2019)
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. 1–32 (2021)
Schmidt, D.C.: Model-driven engineering. Comput. IEEE Comput. Soc. 39(2), 25 (2006)
Soto, M.: Improving patch quality by enhancing key components of automatic program repair. In: 2019 34th IEEE/ACM International Conference on Automated Software Engineering (ASE), pp. 1230–1233 (2019). https://doi.org/10.1109/ASE.2019.00147
Souza, D.E.F., Goues, C.L., Camilo-Junior, C.G.: A novel fitness function for automated program repair based on source code checkpoints. In: Genetic and Evolutionary Computation Conference (GECCO), pp. 1443–1450 (2018)
Taentzer, G., Ohrndorf, M., Lamo, Y., et al.: Change-preserving model repair. In: Huisman, M., Rubin, J. (eds.) Fundamental Approaches to Software Engineering, pp. 283–299. Springer, Berlin, Heidelberg (2017)
Troya, J., Segura, S., Parejo, J.A., et al.: Spectrum-based fault localization in model transformations. ACM Trans. Softw. Eng. Methodol. 27 (2018)
Troya, J., Segura, S., Burgueño, L., et al.: Model transformation testing and debugging: a survey. ACM Comput. Surv. 55(4), 1–39 (2022)
Vallecillo, A., Gogolla, M., Burgueno, L., et al.: Formal specification and testing of model transformations. In: International School on Formal Methods for the Design of Computer, Communication and Software Systems, pp. 399–437. Springer (2012)
Vanneschi, L., Castelli, M., Silva, S.: A survey of semantic methods in genetic programming. Genet. Prog. Evolv. Mach. 15(2), 195–214 (2014)
VaraminyBahnemiry, Z., Galasso, J., Belharbi, K., et al.: Automated patch generation for fixing semantic errors in ATL transformation rules. In: 24th International Conference on Model Driven Engineering Languages and Systems (MODELS), pp. 13–23. IEEE (2021). https://doi.org/10.1109/MODELS50736.2021.00011
Varaminybahnemiry, Z., Galasso, J., Sahraoui, H.: Fixing multiple type errors in model transformations with alternative oracles to test cases. J. Obj. Technol. 20(3), 9:1–14 (2021). https://doi.org/10.5381/jot.2021.20.3.a9, http://www.jot.fm/contents/issue_2021_03/article9.html, the 17th European Conference on Modelling Foundations and Applications (ECMFA 2021)
Weimer, W., Nguyen, T., Le Goues, C., et al.: Automatically finding patches using genetic programming. In: 2009 IEEE 31st International Conference on Software Engineering, pp. 364–374. IEEE (2009)
Wimmer, M., Perez, S.M., Jouault, F., et al.: A catalogue of refactorings for model-to-model transformations. J. Obj. Technol. 11(2), 1–2 (2012)
Acknowledgements
This work was partially performed while the second and third authors were employed at the Université de Montréal.
Author information
Authors and Affiliations
Corresponding author
Ethics declarations
Conflict of interest
The authors have no conflict of interest to declare that are relevant to the content of this article.
Additional information
Communicated by Antonio Vallecillo.
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
VaraminyBahnemiry, Z., Galasso, J., Oakes, B. et al. Improving repair of semantic ATL errors using a social diversity metric. Softw Syst Model (2024). https://doi.org/10.1007/s10270-024-01170-4
Received:
Revised:
Accepted:
Published:
DOI: https://doi.org/10.1007/s10270-024-01170-4