基于覆盖率的错误定位(Coverage Based Fault Localization,CBFI。)方法旨在通过分析程序执行的结果预测错误信息,是一种行之有效的错误定位方法.然而,CBFI。方法中代码覆盖率的独立统计忽略了程序内存在的复杂控制依赖和数据依赖,从而忽视了语句间的语义关系,影响错误定位的准确性.该文借助实例重点分析了基于代码覆盖率所得到的错误可疑度与错误代码的表现关系,指出现有CBFI.方法的不足是片面地将基于覆盖率的错误可疑度直接作为错误代码判定的依据;提出程序失效规则及基于覆盖向量的覆盖信息分析模型,并在此模型基础之上,指出高可疑代码与错误代码在执行路径上的覆盖一致性,进而提出用以挖掘与高可疑代码相关联的错误代码的频繁集求解方法.以SIR基准程序为实验对象建立的受控实验结果表明,相比之前的研究,文中方法在…一定程度上能够改进错误定位结果.
Coverage-based fault localization (CBFL) techniques find the fault-related positions in programs by comparing the execution statistics of passed executions and failed executions have been proven to be efficient by several empirical studies. However, these techniques assess the suspiciousness of program entities individually, whereas the individual coverage information can- not reflect the complicated control- and data-dependency relationships, and thus oversimplify the execution spectra. In this paper, we first use motivating examples to show the impact of the cause-effect relationship on the effectiveness of CBFL. Second, we propose the rules of program failures and design the execution analysis model based on the coverage of different program execu tion spectrum. By computing the frequency items for statements with high suspiciousness, we al- so bring out the coverage vector to mine fault-prone statements. The controlled experiments based on the SIR benchmarks indicate that our technique is promising.