一句话:提出并实现 MeMu,通过记忆化最昂贵方法来减少变异体执行时间,从而加速变异分析。
变异分析需要反复在大量程序变异体上运行测试套件,常导致可扩展性差。已有加速方法多从减少变异体、测试用例或单个变异体执行时间入手。本文实现了一种新技术 MeMu,通过记忆化系统中开销最高的方法,在检测到重复输入时跳过这些方法的执行并复用预先计算结果,从而降低变异体执行时间。MeMu 可独立使用,也可与现有变异分析加速技术结合。在基于 JVM 的变异测试工具 PITest 上的当前实现平均取得 18.15% 的加速。
Mutation analysis is a program analysis method with applications in assessing the quality of test cases, fault localization, test input generation, security analysis, etc. The method involves repeated running of test suites against a large number of program mutants, often leading to poor scalability. A large body of research is aimed at accelerating mutation analysis via a variety of approaches such as, reducing the number of mutants, reducing the number of test cases to run, or reducing the execution time of individual mutants. This paper presents the implementation of a novel technique, named MeMu, for reducing mutant execution time, through memoizing the most expensive methods in the system. Memoization is a program optimization technique that allows bypassing the execution of expensive methods and reusing pre-calculated results, when repeated inputs are detected. MeMu can be used on its own or alongside existing mutation analysis acceleration techniques. The current implementation of MeMu achieves, on average, an 18.15% speed-up for PITest JVM-based mutation testing tool.