
软件学报 ISSN 1000-9825, CODEN RUXUEW E-mail: jos@iscas.ac.cn
Journal of Software, 2022,33(2):397409 [doi: 10.13328/j.cnki.jos.006137] http://www.jos.org.cn
©中国科学院软件研究所版权所有. Tel: +86-10-62562563
CMuJava: 一个面向 Java 程序并发变异体生成系统
孙昌爱
1,2
,
耿
宁
1
,
代贺鹏
1
,
顾友达
1
1
(北京科技大学 计算机与通信工程学院, 北京 100083)
2
(计算机科学国家重点实验室(中国科学院 软件研究所), 北京 100190)
通信作者: 孙昌爱, E-mail: casun@ustb.edu.cn
摘 要: 并发程序由多个共享存储空间并发执行的流程组成. 由于流程之间执行次序的不确定性, 使得并发软件
系统的测试比较困难. 变异测试是一种基于故障的软件测试技术, 广泛用于评估测试用例集的充分性和测试技术
的有效性. 将变异测试应用于并发程序的一个关键问题是, 如何高效地生成大量的模拟并发故障的变异体集合.
给出了一种并发程序的变异测试框架, 研制了一个并发变异体自动生成工具 CMuJava. 采用经验研究的方式评估
了 CMuJava 生成的变异体集合的正确性与充分性, 并且评估了变异体生成的效率. 实验结果表明: CMuJava 能够
准确、充分地生成并发变异体集合, 极大地提高了手工变异体生成的效率.
关键词: 并发程序; 变异测试; 并发变异算子; 并发变异体; 测试工具
中图法分类号: TP311
中文引用格式: 孙昌爱, 耿宁, 代贺鹏, 顾友达. CMuJ ava: 一个面向 Java 程序并发变异体生成系统. 软件学报, 2022, 33(2):
397–409. http://www.jos.org.cn/1000-9825/6137.ht m
英文引用格式: Sun CA, Geng N, Dai HP, Gu YD. CMuJava: Concurrent Mutant Generation System for Java. Ruan Jian Xue Bao/
Journal of Software, 2022, 33(2): 397409 (in Chinese). http://www.jos.org.cn/1000-9825/6137.htm
CMuJava: Concurrent Mutant Generation System for Java
SUN Chang-Ai
1,2
, GENG Ning
1
, DAI He-Peng
1
, GU You-Da
1
1
(School of Computer and Communication Engineering, University of Science and Technolog y Beijing, Beijing 100083, China)
2
(State Key Laboratory of Co mputer S cience (Institut e of Software, Chinese Academy of S ciences), Beijing 100190, Chin a)
Abstra ct : Con current programs are composed of multiple concurrent execution flo ws, which usually share storage space in an explicit or
implicit manner. Uncertainty in the execution order of flows poses challenges for concurrent program testing. Mutation testing is a
fault-based testing technique that is widely adopted to evaluate the adequacy of test suites and th e effectiveness of test techniques. A key
issue to applying mutation testing to concurrent programs is how to efficiently derive a large number of mutants that simulate possible
concurrency-specific faults. This study proposes a mutation testing framework for concurrent programs and presents an automated
concurrent mutant generation system called CMuJava. An empirical study is conducted to evaluate the correctness and adequacy of mut ant
sets generated by CMuJava and the mutant generation efficiency of CMuJava. The experimental results show that CMuJava can not only
generate correct and adequate mutants, but also significantly improve the efficiency of manual mutant generation.
Key words: concurrent programs; mutation testing; concurrent mutation operators; concurrent mutants; testing tools
随着多核计算的日益普及, 并发程序引起了人们的广泛关注. 并发程序包含多个执行次序不确定的并发
执行的流程, 这些流程之间显式或隐式地共享存储空间
[1]
. 这些并发流程的执行次序不确定情形称为执行交
错. 执行交错使得完全相同的输入的输出结果可能不相同, 从而导致并发程序的故障难以重现. 如何有效地
基金项目: 国家自然科学基金(61872039); 中国科学院软件研究所计算机科学国家重点实验室开放课题(SYSKF1803); 中央
高校基本科研业务费专项资金(FRF-GF-19-019B)
收稿时间: 2019-10-12; 修改时间: 2019-12-22; 采用时间: 2020-01-19
评论