• 中国计算机学会会刊
  • 中国科技核心期刊
  • 中文核心期刊

计算机工程与科学

• 论文 • 上一篇    下一篇

基于改良程序谱的软件故障定位方法

余晓菲,张仕,蔡蕊,陈慧峰,蒋建民   

  1. (福建师范大学数学与信息学院,福建 福州 350007)
  • 收稿日期:2017-08-06 修回日期:2017-10-11 出版日期:2018-02-25 发布日期:2018-02-25
  • 基金资助:

    国家自然科学基金(61772004);福建省自然基金(2014J01221)

A fault localization method based on
improved program spectrum

YU Xiao-fei,ZHANG Shi,CAI Rui,CHEN Hui-feng,JIANG Jian-min   

  1. (College of Mathematics and Informatics,Fujian Normal University,Fuzhou 350007,China)
  • Received:2017-08-06 Revised:2017-10-11 Online:2018-02-25 Published:2018-02-25

摘要:

故障定位是软件调试过程中一项耗时耗力的工作,自动化查错的应用对于提高软件调试效率具有重要的现实意义。近年来,基于程序谱的故障定位方法得到了研究人员的大量关注。针对单错误现象,提出了基于改良程序谱的软件故障定位新方法,该方法基于“在单错误情况下,若测试用例运行错误,则该测试用例运行必定覆盖了故障语句”这一论断,将所有的故障测试用例对程序语句的覆盖情况做交运算,从而得到故障基,再利用故障基定位故障。最后,以西门子测试程序集为测试数据,对比了不同方法对故障定位的效果和效率的影响,其结果表明所提出的方法可以有效地提高故障定位的效果和效率。

关键词: 故障定位, 程序谱, 测试用例, 故障基

Abstract:

Fault localization is a time-consuming and labor-intensive job in the process of software debugging. Debugging automation has important significance for replacing the manual check and improving the efficiency of software debugging. Specifically, many researchers have focused on fault automation location based on program spectrum in recent years. Aiming at the single error phenomenon, this paper presents a new fault localization method based on improved program spectrum. The method is based on the fact that the test case operation must cover the fault statement if the test case runs erroneously under the single error condition. It checks the coverage statements for all fault test cases, and then obtains the fault base. The fault base is used to improve the fault localization method of software debugging. Finally, the Siemens test suite is used as the test data to compare the effect of different methods on fault location and efficiency. The results show that the proposed method can greatly improve the effectiveness and efficiency of fault localization.
 

Key words: fault localization, program spectrum, test case, fault base