[关键词]
[摘要]
错误定位就是寻找程序错误的位置.现有的错误定位方法大多利用测试用例的覆盖信息,以标识一组导致程序失效的可疑语句,却忽视了这些语句相互作用导致失效的上下文.因此,提出一种增强上下文的错误定位方法Context-FL,以构建上下文的方式来优化错误定位性能.Context-FL利用动态切片技术构建数据与控制相关性的错误传播上下文,显示了导致失效的语句之间传播依赖关系;然后,基于可疑值度量来区分上下文片段中不同语句的可疑度;最后,Context-FL以标记可疑值的上下文作为定位结果.实验结果表明,Context-FL优于8种典型错误定位方法.
[Key word]
[Abstract]
Fault localization is a process to determine the root causes of abnormal behavior of a faulty program. Most existing fault localization approaches usually utilize coverage information of test cases to identify a set of isolated statements responsible for a failure, but do not show how these statements act on each other to cause the failure. Thus, this study proposes Context-FL:An approach enhancing contexts for these existing localization approaches by constructing contexts for fault localization optimization. Specifically, Context-FL uses dynamic slicing technology to construct a context showing how data/control dependence propagates to cause the faulty output. Then, it adopts suspiciousness evaluation to distinguish the elements of the context in terms of the suspiciousness being faulty. Finally, Context-FL outputs the context with suspiciousness as the localization result. The empirical results show that the proposed approach significantly outperforms 8 state-of-the-art fault localization techniques.
[中图分类号]
[基金项目]
国家自然科学基金(61602504,61672529,61379054,61502296)