计算机工程与应用 ›› 2018, Vol. 54 ›› Issue (13): 246-251.DOI: 10.3778/j.issn.1002-8331.1702-0052

• 工程与应用 • 上一篇    下一篇

利用分支路径差异分析的故障定位研究

黄小红,赵逢禹   

  1. 上海理工大学 光电信息与计算机工程学院,上海 200093
  • 出版日期:2018-07-01 发布日期:2018-07-17

Study of defect localization used by variance analysis of branch path

HUANG Xiaohong, ZHAO Fengyu   

  1. Optical-Electrical and Computer Engineering School, University of Shanghai for Science and Technology, Shanghai 200093, China
  • Online:2018-07-01 Published:2018-07-17

摘要: 为了更加有效地定位软件故障可疑位置,考虑程序分支判断语句的行为状态及其之间的相互干扰,提出一种利用分支路径差异分析的故障定位方法。结合GCC编译器产生的中间文件做分析、转换得到程序抽象语法树,获取分支节点的执行信息,构造分支特征矩阵;提出聚类优化算法FCM-BP筛选合适路径,得到高度抗干扰的执行成功的路径代表和执行失败的路径代表;最后基于代表路径做差异分析生成故障可疑度排名报告。在Xerces等大型项目上进行实验分析并与Tarantula等经典实验对比后发现,利用分支路径差异的方法可以有效定位软件故障。

关键词: 差异分析, 故障定位, 抽象语法树, 分支特征, 聚类分析

Abstract: In order to find a more effective method for the suspicious location of defect, the behavior status of branch statement and mutual interference is considered and a new defect localization used by variance analysis of branch path is proposed. Combined with abstract syntax tree that got from GCC compiler when program file is compiled and the execution of test cases, the branch node information is obtained and a branch characteristic matrix is constructed. Then a fuzzy clustering algorithm FCM-BP to screen suitable path is put forward. Through the first two steps, it can get representatives of failing execution path and representatives of successful execution path which are highly anti-interference. Finally, based on the optimal representatives, it does variance analysis and generates a report of suspicious ranking for defect codes. According to the test of certain projects like Xerces, it is found that tracking the difference of path perform information can be an efficient way to locate software defect.

Key words: variance analysis, defect localization, abstract?syntax?tree, branch characteristics, cluster analysis