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