作者投稿和查稿 主编审稿 专家审稿 编委审稿 远程编辑

计算机工程 ›› 2018, Vol. 44 ›› Issue (7): 74-79,85. doi: 10.19678/j.issn.1000-3428.0046844

• 体系结构与软件技术 • 上一篇    下一篇

基于变量切片与关联规则的错误定位方法

王曙燕,罗丹,孙家泽   

  1. 西安邮电大学 计算机学院,西安 710061
  • 收稿日期:2017-04-18 出版日期:2018-07-15 发布日期:2018-07-15
  • 作者简介:王曙燕(1964—),女,教授、博士,主研方向为软件测试、数据挖掘、智能信息处理;罗丹,硕士;孙家泽,副教授、博士。
  • 基金资助:

    陕西省工业攻关项目(2017GY-092);陕西省教育厅自然科学基金(15JK1678)。

Fault Location Method Based on Variable Slicing and Association Rule

WANG Shuyan,LUO Dan,SUN Jiaze   

  1. School of Computer Science and Technology,Xi’an University of Posts and Telecommunications,Xi’an 710061,China
  • Received:2017-04-18 Online:2018-07-15 Published:2018-07-15

摘要:

针对软件测试中传统错误定位方法忽略程序内部依赖关系以及效率较低的问题,结合变量切片和关联规则提出一种新的定位方法。对Java程序进行变量切片,利用切片位置信息构造事务数据库。在此基础上,通过关联分析算法得到关联规则集合,生成检查语句的优先级次序, 据此定位错误出现的位置。在5个基准程序上的实验结果表明,与基于怀疑度公式的7种常见方法相比,该方法的错误定位代价平均降低10%以上,可有效提高错误定位效率,降低软件测试成本。

关键词: 错误定位, 变量切片, 关联规则, Java程序, 优先级次序

Abstract:

Aiming at the problems in traditional fault localization methods in software testing,such as ignoring the inherent dependence of the program and the lower efficiency of fault localization,this paper proposes a new location method combing with variable slicing and association rule.The variable slices are executed for the statements with variables in the Java program before the location information of slicing is used for consructing the transaction database.The association rule sets between the related statements are carried out according to the association analysis algorithm,and the priority sequence of checking statements is generated in order to position the location of fault.Experimental results based on the skeptical formula on five benchmark programs show that,compared with the seven common methods,the proposed method can reduce the cost of fault localization by at least 10% on average,which can improve the efficiency in positioning fault to a certain extent as well as reduce the cost of software testing.

Key words: fault localization, variable slicing, association rule, Java program, priority sequence

中图分类号: