Mutation analysis for evaluating code translation

被引:1
作者
Guizzo, Giovani [1 ]
Zhang, Jie M. [2 ]
Sarro, Federica [1 ]
Treude, Christoph [3 ]
Harman, Mark [1 ,4 ]
机构
[1] UCL, London, England
[2] Kings Coll London, London, England
[3] Univ Melbourne, Melbourne, Australia
[4] Meta Platforms Inc, Menlo Pk, CA USA
基金
欧洲研究理事会;
关键词
Mutation testing; Source to source translation; Code translation;
D O I
10.1007/s10664-023-10385-w
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
Source-to-source code translation automatically translates a program from one programming language to another. The existing research on code translation evaluates the effectiveness of their approaches by using either syntactic similarities (e.g., BLEU score), or test execution results. The former does not consider semantics, the latter considers semantics but falls short on the problem of insufficient data and tests. In this paper, we propose MBTA (Mutation-based Code Translation Analysis), a novel application of mutation analysis for code translation assessment. We also introduce MTS (Mutation-based Translation Score), a measure to compute the level of trustworthiness of a translator. If a mutant of an input program shows different test execution results from its translated version, the mutant is killed and a translation bug is revealed. Fewer killed mutants indicate better code translation. MBTA is novel in the sense that mutants are compared to their translated counterparts, and not to their original program's translation. We conduct a proof-of-concept case study with 612 Java-Python program pairs and 75,082 mutants on the code translators TransCoder and j2py to evaluate the feasibility of MBTA. The results reveal that TransCoder and j2py fail to translate 70.44% and 70.64% of the mutants, respectively, i.e., more than two-thirds of all mutants are incorrectly translated by these translators. By analysing the MTS results more closely, we were able to reveal translation bugs not captured by the conventional comparison between the original and translated programs.
引用
收藏
页数:23
相关论文
共 50 条
  • [41] Towards Mutation Analysis of Android Apps
    Deng, Lin
    Mirzaei, Nariman
    Ammann, Paul
    Offutt, Jeff
    2015 IEEE EIGHTH INTERNATIONAL CONFERENCE ON SOFTWARE TESTING, VERIFICATION AND VALIDATION WORKSHOPS (ICSTW), 2015,
  • [42] On the Reuse of TLM Mutation Analysis at RTL
    Valerio Guarnieri
    Giuseppe Di Guglielmo
    Nicola Bombieri
    Graziano Pravadelli
    Franco Fummi
    Hanno Hantson
    Jaan Raik
    Maksim Jenihhin
    Raimund Ubar
    Journal of Electronic Testing, 2012, 28 : 435 - 448
  • [43] Bridging OpenCL and CUDA: A Comparative Analysis and Translation
    Kim, Junghyun
    Dao, Thanh Tuan
    Jung, Jaehoon
    Joo, Jinyoung
    Lee, Jaejin
    PROCEEDINGS OF SC15: THE INTERNATIONAL CONFERENCE FOR HIGH PERFORMANCE COMPUTING, NETWORKING, STORAGE AND ANALYSIS, 2015,
  • [44] How effective are mutation testing tools? An empirical analysis of Java mutation testing tools with manual analysis and real faults
    Marinos Kintis
    Mike Papadakis
    Andreas Papadopoulos
    Evangelos Valvis
    Nicos Malevris
    Yves Le Traon
    Empirical Software Engineering, 2018, 23 : 2426 - 2463
  • [45] Mutation Testing for Evaluating the Completeness of Test Cases in High-speed Train Control System
    Li, Teng
    Li, Kaicheng
    Lv, Jidong
    Yuan, Lei
    Fu, Qiang
    Wen, Tao
    2015 IEEE 18TH INTERNATIONAL CONFERENCE ON INTELLIGENT TRANSPORTATION SYSTEMS, 2015, : 777 - 782
  • [46] Is Mutation Analysis Effective at Testing Android Apps?
    Deng, Lin
    Offutt, Jeff
    Samudio, David
    2017 IEEE INTERNATIONAL CONFERENCE ON SOFTWARE QUALITY, RELIABILITY AND SECURITY (QRS), 2017, : 86 - 93
  • [47] Analysis of Mutation Operators for the Python']Python Language
    Derezinska, Anna
    Halas, Konrad
    PROCEEDINGS OF THE NINTH INTERNATIONAL CONFERENCE ON DEPENDABILITY AND COMPLEX SYSTEMS DEPCOS-RELCOMEX, 2014, 286 : 155 - 164
  • [48] A Comparison of Mutation Analysis Tools for Java']Java
    Delahaye, Mickael
    du Bousquet, Lydie
    2013 13TH INTERNATIONAL CONFERENCE ON QUALITY SOFTWARE (QSIC), 2013, : 187 - 195
  • [49] How effective are mutation testing tools? An empirical analysis of Java']Java mutation testing tools with manual analysis and real faults
    Kintis, Marinos
    Papadakis, Mike
    Papadopoulos, Andreas
    Valvis, Evangelos
    Malevris, Nicos
    Le Traon, Yves
    EMPIRICAL SOFTWARE ENGINEERING, 2018, 23 (04) : 2426 - 2463
  • [50] Applicability and Benefits of Mutation Analysis as an Aid for Unit Testing
    Ramler, Rudolf
    Kaspar, Thomas
    2012 7TH INTERNATIONAL CONFERENCE ON COMPUTING AND CONVERGENCE TECHNOLOGY (ICCCT2012), 2012, : 920 - 925