错误定位是软件调试中非常耗时费力的活动之一,自动错误定位技术可以提高调试效率,降低调试成本.该文提出一种把动态切片、关联分析及排序策略相结合的错误定位方法.首先,收集程序执行的动态切片及相应的执行结果构建混合谱矩阵;然后,基于混合谱矩阵进行关联分析,随后依据提出的排序策略对语句进行排序,得出较合理的语句优先级次序,从而进行错误定位.为验证该方法有效性,作者设计并实现了一个错误定位原型工具DSFL,针对一组Java基准程序开展错误定位实验,并与12种错误定位技术进行对比.实验结果表明该方法可以在一定程度上提高错误定位精度和效率.
Fault localization is one of the most difficult and time-consuming activities of debugging.Automatic fault localization technique can improve the effectiveness of debugging and decrease the cost of debugging.This paper proposes an approach,combining dynamic slicing with association analysis and rank strategy to locate faults within programs.First,dynamic slices are computed and the corresponding test result is obtained,in which hybrid spectrum matrix is constructed.Second,association analysis is carried out based on hybrid spectrum matrix and rank strategy we proposed is used to rank statements to give a more reasonable priority sequence of statements.Moreover,aprototype tool,DSFL,has been implemented to evaluate our approach.In addition,our approach is compared with 12 fault localization techniques across a set of Java programs.The experimental results show that our approach is more precise and effective than the compared techniques.