计算机应用 ›› 2016, Vol. 36 ›› Issue (11): 3170-3177.DOI: 10.11772/j.issn.1001-9081.2016.11.3170

• 计算机软件技术 • 上一篇    下一篇

基于并发程序数据竞争故障的变异策略

吴俞伯, 郭俊霞, 李征, 赵瑞莲   

  1. 北京化工大学 计算机系, 北京 100029
  • 收稿日期:2016-04-21 修回日期:2016-06-02 出版日期:2016-11-10 发布日期:2016-11-12
  • 通讯作者: 赵瑞莲
  • 作者简介:吴俞伯(1989-),男,海南儋州人,硕士研究生,主要研究方向:软件测试;郭俊霞(1977-),女,山西朔州人,讲师,博士,主要研究方向:网络信息定向抽取;李征(1974-),男,河北清苑人,教授,博士,CCF会员,主要研究方向:软件测试、模型切片;赵瑞莲(1964-),女,山西忻州人,教授,博士,CCF会员,主要研究方向:软件测试、软件可靠性分析。
  • 基金资助:
    国家自然科学基金资助项目(61472025,61170082);教育部新世纪优秀人才支持计划项目(NCET-12-0757)。

Mutation strategy based on concurrent program data racing fault

WU Yubo, GUO Junxia, LI Zheng, ZHAO Ruilian   

  1. Department of Computer Science and Technology, Beijing University of Chemical Technology, Beijing 100029, China
  • Received:2016-04-21 Revised:2016-06-02 Online:2016-11-10 Published:2016-11-12
  • Supported by:
    This work is partially supported by the National Natural Science Foundation of China (61472025, 61170082), the Program for New Century Excellent Tallents in University (NCET-12-0757).

摘要: 针对并发程序变异测试中并发变异算子触发数据竞争故障能力较低的问题,提出了基于数据竞争故障的变异策略。从并发变异算子设计的角度给出了面向锁对象的变异策略(LMS)和面向共享变量的变异策略(SMS),设计了重置同步锁(SLRO)和移出共享变量操作(MSVO)两个并发变异算子。从变异点选取的角度给出了一种同步关系对变异点选取策略(SMPSS)。在12个Java类库并发程序上,应用SLRO和MSVO算子针对SMPSS选取出的变异点植入故障,生成变异体,并使用JPF检测工具,检测生成的变异体引发数据竞争故障的能力。实验结果表明,新设计的SLRO和MSVO变异算子对12个被测程序分别生成了121和122个有效变异体,变异算子的有效性分别为95.28%和99.19%。由此可知,新设计的并发变异算子能有效触发数据竞争故障。

关键词: 并发程序变异测试, 数据竞争故障, 锁对象, 共享变量, 同步关系对

Abstract: As the low ability of triggering the data racing fault of the existing mutation operators for concurrent program in mutation testing, some new mutation strategies based on data racing fault were proposed. From the viewpoint of mutation operator designing, Lock-oriented Mutation Strategy (LMS) and Shared-variable-oriented Mutation Strategy (SMS) were introduced, and two new mutation operators that named Synchronized Lock Resting Operator (SLRO) and Move Shared Variable Operator (MSVO) were designed. From the viewpoint of mutation point selection, also a new mutation point selection strategy named Synchronized relationship pair Mutation Point Selection Strategy (SMPSS) was proposed. SLRO and MSVO mutation operators were used to inject the faults which generated by SMPSS strategy on 12 Java current libraries, and then the ability of mutants to trigger the data racing fault was checked by using Java Path Finder (JPF). The results show that the SLRO and MSVO for 12 Java libs can generate 121 and 122 effective mutants respectively, and effectiveness rates are 95.28% and 99.19% respectively. In summary, the new current mutation operators and mutation strategies can effectively trigger the data racing fault.

Key words: concurrent program mutation testing, data racing fault, lock object, shared variable, synchronized relationship pair

中图分类号: