故障定位是软件调试过程中耗力和耗时的活动之一,尤其是对规模大和复杂性高的软件.目前的一些定位技术可分为两类:基于组件和基于语句.前者太粗,不能准确地定位到地方;后者太细,运算复杂度过大.提出一种新技术,称为二次定位策略(double-times-locating),简称DTL),来定位故障:第1次定位,从程序中抽象出函数调用图,再从函数调用轨迹中建立程序谱,最后用基于模型的诊断(model-based diagnosis,简称MBD)对可能含有故障的函数进行排序;第2次定位,利用DStar定位函数中故障的代码行.实验结果表明,该技术比目前基于统计的方法更有效.
Fault localization is a physical and time-consuming activity in the debugging process, especially for the software with large size and high complexity. Existing techniques to locate faults can be classified into two categories: component based and statement based. The former is too coarse to locate the accurate place, while the latter is too fine to contain the computation complexity. This paper proposes a new technique, called double-times-locating (DTL) strategy, to locate software faults. For the first time locating, it abstracts function call graph from the code, builds program spectrum to abstract function traces, and then uses model-based diagnosis (MBD) to sort with probability possible functions candidates that have faults. For the second time locating, it uses DStar to locate faults in the functions. Experimental results show that the proposed technique is more effective than the existing statistics based methods.