首页> 中文期刊> 《计算机应用研究》 >一种基于谓词分层覆盖矩阵的缺陷定位方法

一种基于谓词分层覆盖矩阵的缺陷定位方法

     

摘要

基于程序频谱的动态缺陷定位(spectrum based dynamic fault localization,SFL)可分为基于可执行语句覆盖的方法和基于谓词覆盖的方法。通过分析以上两类方法可以发现:a)基于可执行语句覆盖的方法未考虑谓词错误和执行结果之间的关联;b)基于谓词覆盖的方法只针对谓词进行插桩,最后只计算谓词的可疑度并对谓词进行排序,如果缺陷是非谓词,此类方法无法准确定位缺陷位置;c)忽略了基本块之间的关联和层次特性,将各个基本块看成相互独立的个体。为解决上述问题,首先,将谓词错误与执行结果之间的关联性这一有用信息加入到算法的设计中;其次,加入谓词分层覆盖与分析的思想,对覆盖矩阵中的基本块进行细分和分层;最后,将两者结合,提出一种基于谓词分层覆盖矩阵的缺陷定位方法,即谓词分层覆盖算法 Phcm。将西门子程序集作为目标程序,通过与其他三种缺陷定位方法进行对比实验,验证了该方法在提高缺陷定位的精准度和减小代码检查率上的有效性。%Executable statement coverage and predicate coverage are two basic methods for spectrum based dynamic fault lo-calization.By analyzing the above two methods,it is found that:a)the method based on executable statements does not con-sider the association between the predicate error and the execution resub)the method based on predicate coverage only does instrumentation on predicate,calculates the suspicious score of predicate and does sorting on predicate according to suspicious scores.If the fault is not from a predicate,the method will not locate the fault code statements accurately.c)Both methods ig-nore the correlation and hierarchical characteristics of the basic statements blocks and each block is treated as an independent entity.To solve the above problems,firstly,this paper added the relationship between predicate error and execution result to the algorithm.Secondly,by adding the idea of predicate hierarchical coverage and analysis,it subdivided and layered the basic blocks in the coverage matrix.Finally,by combining these two methods,this paper proposed a fault localization method based on predicate hierarchical coverage matrix,and provided a fault localization algorithm Phcm.It used the Siemens suite as the target program.By comparing with three other fault localization methods,the effectiveness of the proposed method is verified in improving the accuracy of the fault localization and the code checking rate is also decreased.

著录项

相似文献

  • 中文文献
  • 外文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号