全部 标题 作者
关键词 摘要

OALib Journal期刊
ISSN: 2333-9721
费用:99美元

查看量下载量

相关文章

更多...

一种面向ATL模型转换程序的自动化缺陷修复方法
An Approach for Automatically Repairing ATL Model Transformation Programs

DOI: 10.12677/SEA.2022.116133, PP. 1297-1309

Keywords: 缺陷修复,ATL模型转换,蜕变测试,变异操作,补丁生成
Defect Repair
, ATL Model Conversion, Metamorphic Testing, Mutation Operation, Patch Generation

Full-Text   Cite this paper   Add to My Lib

Abstract:

模型转换是模型驱动架构(Model Driven Architecture, MDA)的核心活动,它的质量直接影响到基于MDA的软件产品的质量。因此,基于模型转换开展的测试、错误定位以及缺陷修复对于基于MDA的软件开发来说至关重要。然而,由于模型转换程序自身的特点,应用于传统软件的一些方法不能直接应用。本文针对ATL (ATLAS Transformation Language)模型转换程序,提出一种基于随机搜索(random search)的缺陷修复方法,主要包括:1) 利用蜕变关系来描述模型转换程序相关源模型及其对应目标模型所应满足的属性,在此基础上应用蜕变测试技术来实现补丁的验证,以缓解ATL程序自动化缺陷修复中的Oracle问题;2) 针对ATL程序设计并实现9种变异操作(mutation operators);3) 基于随机搜索来驱动补丁生成和验证。进一步基于该方法实现一个原型工具AMTRepair,并基于AMTRepair开展了初步的实验。实验结果表明针对目标程序,AMTRepair的缺陷修复率约为51%,其正确补丁生成率为30%。
Model transformation program is the core activity of Model Driven Architecture (MDA), and its quality directly affects the quality of software products based on MDA. Therefore, testing, error location and defect repair based on model transformation are critical for MDA based software development. However, due to the characteristics of the model converter itself (such as Oracle problem), some methods applied to traditional software can not be directly applied. This paper proposes a random search based defect repair method for ATL (ATLAS Transformation Language) model transformation program, which mainly includes: 1) Use transformation testing and spectrum error location methods to obtain suspicious ATL rules to deal with the Oracle problem faced by ATL program testing; 2) Design and implement 9 mutation operators according to ATL program; 3) Based on a random search, patch generation and verification are driven. Furthermore, a prototype tool AMTRepair is implemented based on this method, and preliminary experiments are carried out based on AMTRepair. The experimental results show that the defect repair rate of AMTRepair is about 51% and the correct patch generation rate is 30% for the target program.

References

[1]  Brambilla, M., Cabot, J. and Wimmer, M. (2012) Model-Driven Software Engineering in Practice, Series Synthesis Lectures on Software Engineering. Morgan & Claypool Publishers, San Rafael.
https://doi.org/10.1007/978-3-031-02546-4
[2]  Mohagheghi, P. and Dehlen, V. (2008) Where Is the Proof?—A Review of Experiences from Applying MDE in Industry. Proceedings of the European Conference on Model Driven Architecture-Foundations and Applications, Berlin, 9-13 June 2008, 432-443.
https://doi.org/10.1007/978-3-540-69100-6_31
[3]  Asadi, M. and Ramsin, R. (2008) MDA-Based Methodologies: An Analytical Survey. Proceedings of the European Conference on Model Driven Architecture-Foundations and Applications, Berlin, 9-13 June 2008, 419-431.
https://doi.org/10.1007/978-3-540-69100-6_30
[4]  Lúcio, L., Amrani, M., Dingel, J., et al. (2016) Model Transformation Intents and Their Properties. Software and Systems Modeling, 15, 647-684.
https://doi.org/10.1007/s10270-014-0429-x
[5]  Baudry, B., Ghosh, S., Fleurey, F., et al. (2010) Barriers to Systematic Model Transformation Testing. Communication of ACM, 53, 139-143.
https://doi.org/10.1145/1743546.1743583
[6]  Sen, S., Baudry, B. and Mottu, J.-M. (2008) On Combining Multi-Formalism Knowledge to Select Models for Model Transformation Testing. Proceedings of the 1st International Conference on Software Testing, Verification, and Validation, Lillehammer, 9-11 April 2008, 328-337.
https://doi.org/10.1109/ICST.2008.62
[7]  Wieber, M., Anjorin, A. and Schürr, A. (2014) On the Usage of TGGs for Automated Model Transformation Testing. Proceedings of the International Conference on Theory and Practice of Model Transformations, York, 21-22 July 2014, 1-16.
https://doi.org/10.1007/978-3-319-08789-4_1
[8]  Lano, K. and Clark, D. (2008) Model Transformation Specification and Verification. Proceedings of the Eighth International Conference on Quality Software, Oxford, 12-13 August 2008, 45-54.
https://doi.org/10.1109/QSIC.2008.38
[9]  Jiang, M.Y., Chen, T.Y., Kuo, F.-C., et al. (2014) Testing Model Transformation Programs using Metamorphic Testing, The 26th IEEE International Conference on Software Engineering and Knowledge Engineering (SEKE’14), Vancouver, 1-3 July 2014, 94-99.
[10]  Hibberd, M., Lawley, M. and Raymond, K. (2007) Forensic Debugging of Model Transformations. Proceedings of the 10th International Conference on Model Driven Engineering Languages Systems, Nashville, 30 September-5 October 2007, 589-604.
https://doi.org/10.1007/978-3-540-75209-7_40
[11]  Wimmer, M., Kappel, G., Kusel, A., et al. (2009) A Petri Net Based Debugging Environment for QVT Relations. Proceedings of the 24th IEEE/ACM International Conference on Automated Software Engineering, Washington DC, 16-20 November 2009, 3-14.
https://doi.org/10.1109/ASE.2009.99
[12]  Aranega, V., Mottu, J.-M., Etien, A. and Dekeyser, J.-L. (2009) Traceability Mechanism for Error Localization in Model Transformation. Proceedings of the International Conference on Software and Data Technology, Sofia, 26-29 July 2009, 66-73.
[13]  Burgue?o, L., Troya, J., Wimmer, M. and Vallecillo, A. (2015) Static Fault Localization in Model Transformations. IEEE Transactions on Software Engineering, 41, 490-506.
https://doi.org/10.1109/TSE.2014.2375201
[14]  Troya, J., Segura, S., Parejo, J.A. and Ruiz-Cortés, A. (2018) Spectrum-Based Fault Localization in Model Transformations. ACM Transactions on Software Engineering and Methodology, 27, 1-50.
https://doi.org/10.1145/3241744
[15]  Cuadrado, J.S., Guerra, E. and de Lara, J. (2018) Quick Fixing ATL Transformations with Speculative Analysis. Software and Systems Modeling, 17, 779-813.
https://doi.org/10.1007/s10270-016-0541-1
[16]  Varaminy Bahnemiry, Z., Galasso, J. and Sahraoui, H. (2020) Fixing Multiple Type Errors in Model Transformations with Alternative Oracles to Test Cases. Journal of Object Technology, 20, 1-14.
https://doi.org/10.5381/jot.2021.20.3.a9
[17]  Varaminy Bahnemiry, Z., Galasso, J., Belharbi, K. and Sahraoui, H. (2021) Automated Patch Generation for Fixing Semantic Errors in ATL Transformation Rules. Proceedings of the ACM/IEEE 24th International Conference on Model Driven Engineering Languages and Systems (MODELS’21), Fukuoka, 10-15 October 2021, 13-23.
https://doi.org/10.1109/MODELS50736.2021.00011
[18]  Jouault, F., Allilaire, F., Bézivin, J., et al. (2008) ATL: A Model Transformation Tool. Science of Computer Programming, 72, 31-39.
https://doi.org/10.1016/j.scico.2007.08.002
[19]  Arendt, T., Biermann, E., Jurack, S., et al. (2010) Henshin: Advanced Concepts and Tools for In-Place EMF Model Transformations. In: International Conference on Model Driven Engineering Languages and Systems, Springer, Berlin, 121-135.
https://doi.org/10.1007/978-3-642-16145-2_9
[20]  Taentzer, G. (2003) AGG: A Graph Transformation Environment for Modeling and Validation of Software. In: International Workshop on Applications of Graph Transformations with Industrial Relevance, Springer, Berlin, 446-453.
https://doi.org/10.1007/978-3-540-25959-6_35
[21]  Clavel, M., Durán, F., Eker, S., et al. (2007) All about Maude—A High-Performance Logical Framework: How to Specify, Program, and Verify Systems in Rewriting Logic. Springer, Berlin.
[22]  De Lara, J. and Vangheluwe, H. (2002) AToM3: A Tool for Multi-Formalism and Meta-Modelling. In: International Conference on Fundamental Approaches to Software Engineering, Springer, Berlin, 174-188.
https://doi.org/10.1007/3-540-45923-5_12
[23]  Greenyer, J. and Kindler, E. (2010) Comparing Relational Model Transformation Technologies: Implementing Query/View/Transformation with Triple Graph Grammars. Software & Systems Modeling, 9, Article No. 21.
https://doi.org/10.1007/s10270-009-0121-8
[24]  Jouault, F., Allilaire, F., Bézivin, J., et al. (2006) ATL: A QVT-Like Transformation Language. Companion to the 21st ACM SIGPLAN Symposium on Object-Oriented Programming Systems, Languages, and Applications, Portland, 22-26 October 2006, 719-720.
[25]  Chen, T.Y., Cheung, S.C. and Yiu, S.M. (1998) Metamorphic Testing: A New Approach for Generating Next Test Cases. Department of Computer Science, Hong Kong University of Science and Technology, Hong Kong, Tech. Rep. HKUST-CS98-01.
[26]  Du, K., Jiang, M., Ding, Z., et al. (2019) Metamorphic Testing in Fault Localization of Model Transformations. In: International Workshop on Structured Object-Oriented Formal Language and Method, Springer, Cham, 299-314.
https://doi.org/10.1007/978-3-030-41418-4_20
[27]  Jiang, M.Y., Chen, T.Y., Kuo, F.C., et al. (2014) Testing Model Transformation Programs Using Metamorphic Testing. International Conference on Software Engineering & Knowledge Engineering, Vancouver, 1-3 July 2014, 94-99.
[28]  Xie, X., Wong, W.E., Chen, T.Y., et al. (2013) Metamorphic Slice: An Application in Spectrum-Based Fault Localization. Information and Software Technology, 55, 866-879.
https://doi.org/10.1016/j.infsof.2012.08.008
[29]  Janssen, T., Abreu, R. and Van Gemund, A.J.C. (2009) Zoltar: A Spectrum-Based Fault Localization Tool. Proceedings of the 2009 ESEC/FSE workshop on Software Integration and Evolution@ Runtime, New York, August 2009, 23-30.
[30]  Jouault, F. (2005) Loosely Coupled Traceability for ATL. Proceedings of the European Conference on Model Driven Architecture Workshop on Traceability, Nuremberg, May 2005, 29-37.
[31]  ATL Transformations in Eclipse (2005).
https://www.eclipse.org/atl/atlTransformations/Class2Relational/ExampleClass2Relational%5bv00.01%5d.pdf
[32]  王赞, 郜健, 陈翔, 等. 自动程序修复方法研究述评[J]. 计算机学报, 2018, 41(3): 588-610.
[33]  Cuadrado, J.S., Guerra, E. and de Lara, J. (2015) Quick Fixing ATL Model Transformations. Proceedings of the 2015 ACM/IEEE 18th International Conference on Model Driven Engineering Languages and Systems (MODELS’15), Ottawa, 27 September-2 October 2015. 146-155.
[34]  Rodriguez-Echeverria, R., Macías, F., Rutle, A. and Conejero, J.M. (2021) Suggesting Model Transformation Repairs for Rule-Based Languages Using a Contract-Based Testing Approach. Software and Systems Modeling, 21, 81-112.
https://doi.org/10.1007/s10270-021-00891-0

Full-Text

Contact Us

service@oalib.com

QQ:3279437679

WhatsApp +8615387084133