
软件学报 ISSN 1000-9825, CODEN RUXUEW E-mail: jos@iscas.ac.cn
Journal of Software,2018,29(6):1756−1769 [doi: 10.13328/j.cnki.jos.005287] http://www.jos.org.cn
©中国科学院软件研究所版权所有. Tel: +86-10-62562563
基于条件概率模型的缺陷定位方法
∗
舒
挺
,
黄明献
,
丁佐华
,
王
磊
,
夏劲松
(浙江理工大学 信息学院,浙江 杭州 310018)
通讯作者: 舒挺, E-mail: shuting@zstu.edu.cn
摘 要: 缺陷定位是软件调试的重要阶段,依赖程序频谱信息实现软件缺陷定位,是当前比较行之有效的方法.基
于频谱缺陷定位方法应用的前提是,程序频谱和执行结果之间存在的潜在关联.通过经验性分析两者之间的内在关
联,借助于统计学的条件概率思想,构建了用以量化分析两者关系强弱的 P 模型,并基于此提出了基于条件概率的缺
陷定位方法.以 Siemens 套件中的 7 个程序、Space 程序和 3 个 Unix 工具程序为基准评测对象,与已有的 15 种经典
缺陷定位方法进行了对比实验.实证研究结果表明,该方法总体上具有更好的缺陷定位效果.
关键词: 缺陷定位;程序频谱;条件概率;软件调试;测试例
中图法分类号: TP311
中文引用格式: 舒挺,黄明献,丁佐华,王磊,夏劲松.基于条件概率模型的缺陷定位方法.软件学报,2018,29(6):1756−1769. http:
//www.jos.org .cn/1000-9825 /5287.ht m
英文引用格式: Shu T, Huang MX, Ding ZH, Wang L, Xia JS. Fault localization method based on conditional probability model.
Ruan Jian Xue Bao/Journal of Software, 2018,29(6):1756−1769 (in Chinese). http://www.jos.org.cn/1000-9825/5287.htm
Fault Localization Me thod Based on Conditiona l Probability Model
SHU Ting, HUANG Ming-Xian, DING Zuo-Hua, WANG Lei, XIA Jin-Song
(School of Information Science and Technology, Zh ejiang Sci-Tech Univ ersity, Hangzhou 310018, Chin a)
Abstra ct : Fault localization is an essential step of software debugging, and spectrum-based fault localization (SFL) is currently amongst
the most effective methods. The fundamental premise u nderlying SFL is that there exists a potenti al relationship between program spectra
and the corresponding execution r esults. To formally describe and accurately quantify this relation, this p aper introduces the conception of
conditional probability to construct a P model by using the statisti cal analysis of experimental d ata. In addition, based on the presented P
model, a fault localization method is proposed to effectively locate the faulty statement of the program under test. Finally, taking seven
programs contained in the Si emens suite, Sp ace program and three real-life Unix utili ty programs as the ben chmark, a detailed experiment
is conducted to evaluate the effectiveness and efficiency of the proposed method. Compared with fift een classic fault localization methods,
the experimental results show that the presented approach is mor e promising.
Key words: fault localization; program sp ectrum; conditional prob abilit y; software d ebugging; test case
软件规模和复杂程度的与日俱增,给软件开发和调试技术带来了极大的挑战.面对软件开发过程中如影相
随的程序缺陷问题,软件测试成为了提升其质量和可靠性的重要技术手段.因此,人们在软件测试方面的投入逐
年增加.在软件测试过程中,当发生被测软件的行为与预期不一致(即失效)时,开发人员就需要随即开展软件调
试
[1]
.软件调试的首要任务是缺陷定位,它为后续错误代码修复工作提供了基础.
∗ 基金项目: 国家自然科学基金(61101111, 61572441); 浙江省自然科学基金(LY17F020033)
Foundation item: National Natural Science Foundation of China (61101111, 61572441); Natural Science Foundation of Zhejiang
Province (LY17F020033)
收稿时间:
2016-12-13; 修改时间: 2017-01-07, 2017-02-18; 采用时间: 2017-03-20; jos 在线出版时间: 2017-07-12
CNKI 网络优先出版: 2017-07-12 15:33:41, http://kns.cnki.net/kcms/d etail/11.2560.TP.20170712.1533.007.html
评论