摘要
针对程序切片方法不提供语句的可疑程度描述,而覆盖分析方法不能充分分析程序元素间的相互影响等问题,提出上下文统计分析的软件故障定位方法。首先,将源程序转换为抽象语法树和程序依赖图;接下来,插桩程序,收集运行时信息;然后,根据失效点,执行按需的反向动态切片,确定失效产生的上下文;最后,对于反向动态切片中的节点,统计计算可疑度,输出带可疑度排序的动态程序切片。该方法不但描述了失效产生的上下文,还计算上下文中各个语句的可疑度。实验结果表明,所提方法与单一的覆盖分析方法相比,平均Expense降低了1.3%,与单一的切片方法相比,平均Expense降低了5.6%,所提方法可以有效辅助开发人员定位与修正软件缺陷。
The program slicing approach does not describe the suspiciousness of statements, while the coverage analysis based fault localization approach does not analyze the relationship between statements. To solve these problems, a software fault localization approach by statistical analysis of failure context was proposed. Firstly, source code was transformed to an abstract syntax tree and program dependence graphs. Then, instrumentation was performed based on the abstract syntax tree to collect execution information. Next, starting from the failure point, dynamic program slicing based on requirement was conducted in order to get the context of failure. Finally, suspiciousness of nodes in the reverse dynamic program slice was computed, and a dynamic program slice with suspiciousness ranking was output. The proposed approach could not only describe the failure context, but also gave the suspiciousness of the statements. The experimental results show that it has an average 1.3% and 5.6% expense decrease compared with the coverage based analysis approach and the slicing approach respectively, so that it can facilitate the localization and fixing of bugs.
出处
《计算机应用》
CSCD
北大核心
2015年第3期882-885,890,共5页
journal of Computer Applications
基金
哈尔滨学院青年基金资助项目(HUYF2014-007)
黑龙江省高教学会"十二五"重点规划课题(HGJXHA1110950)
黑龙江省教育科学规划青年专项课题(GJD1214038)
国家自然科学基金资助项目(61202092)
高等学校博士学科点专项科研基金资助项目(20112302120052)
哈尔滨科技创新人才研究专项资金资助项目(RC2013QN010001
2014RFQXJ062)
黑龙江省普通高校青年学术骨干项目
黑龙江省自然科学基金资助项目(F201127)
关键词
软件调试
故障定位
动态切片
覆盖分析
失效上下文
software debugging
fault localization
dynamic slicing
coverage analysis
failure context