计算机科学与探索 ›› 2011, Vol. 5 ›› Issue (6): 522-533.

• 学术研究 • 上一篇    下一篇

结合语句执行补集的程序错误定位

胡从兴1,2, 陈 林1,3, 丁 晖1, 曾 奕2   

  1. 1. 南京大学 计算机科学与技术系, 南京 210093
    2. 上海市计算机软件评测重点实验室, 上海 201114
    3. 南京大学 计算机软件新技术国家重点实验室, 南京 210093
  • 收稿日期:1900-01-01 修回日期:1900-01-01 出版日期:2011-06-01 发布日期:2011-06-01

Fault Localization Method of Combining Statement Execution Complement

HU Congxing, CHEN Lin, DING Hui, ZENG Yi   

  1. 1. Department of Computer Science and Technology, Nanjing University, Nanjing 210093, China
    2. Shanghai Key Laboratory of Computer Software Testing and Evaluation, Shanghai 201114, China
    3. State Key Laboratory for Novel Software Technology, Nanjing University, Nanjing 210093, China
  • Received:1900-01-01 Revised:1900-01-01 Online:2011-06-01 Published:2011-06-01

摘要: 基于频谱的错误定位方法一般利用覆盖信息为每条语句度量出错的可能, 即可疑度, 通过逐条检查按可疑度值降序排列的语句序列来确定错误语句。针对已有的方法大多只考虑覆盖信息中语句执行信息的问题, 分析了语句执行补集对错误定位的积极影响, 进一步提出了在语句执行信息基础上结合语句执行补集的错误定位方法。实验结果表明, 与其他方法相比, 所提方法能够减少找到错误时需要检查的语句数目, 从而达到提高错误定位效果的目的。

关键词: 软件测试, 覆盖信息, 错误定位, 调试

Abstract:

Spectrum-based fault localization approaches usually calculate the suspiciousness of statements by coverage information, and then examine the statement sequence ranked by the suspiciousness in descending order until find fault. But most of existing approaches only consider the execution information of statements after running testcases. This paper gives a study revealing that the execution complement of statements should be also taken into consideration, and further presents a method that combines the execution complement of statements to locate fault.Compared with other methods, the experimental results show that the approach can reduce the number of statements that need to be examined to find the faulty statement, and thus improve the effect of fault localization.

Key words: software testing, coverage information, fault localization, debugging