摘要
传统的基于测试的分支路径差异分析的软件缺陷定位方法不能有效利用程序源代码中变量状态等可用信息。针对此问题,本文提出了一种基于分支路径与变量状态差异分析的缺陷定位方法。首先对需要输出的分支和变量信息进行插桩,再使用GCC编译器对插桩后的程序进行编译输出,得到分支覆盖矩阵和变量值信息。使用余弦相似度公式获取相似分支路径对,并对相似分支路径对中的变量进行差异分析,通过变量差异分析来提高缺陷语句的可疑度。通过在Siemens套件上进行实验分析并与DStar等经典实验进行对比,基于分支路径与变量状态差异分析的方法能够有效提高软件缺陷语句怀疑度。
The traditional software defect localization method based on branch paths difference analysis can not effectively explore the available information such as variable states when the program executed.To solve the problem,this paper proposes a defect localization method based on the analysis of the differences between branch paths and variable states.First,an instrumentation method is given for branch and variable information,and then the GCC compiler is used to compile the instrumented program and output the branch and variable information to obtain the branch coverage matrix.Then the cosine similarity formula to obtain similar branch path pairs is employed,and the differences in the variables in the similar branch path pairs to improve the suspiciousness of the defect statements are analyzed.Through the experimental analysis on the Siemens suite and comparison with classic method such as DStar,it is verified that the method based on the analysis of the differences between branch paths and variable states can effectively improve the suspicion of software defect statements.
作者
张大全
赵逢禹
刘亚
ZHANG Daquan;ZHAO Fengyu;LIU Ya(School of Optical-Electrical and Computer Engineering,University of Shanghai for Science and technology,Shanghai 200093,China)
出处
《智能计算机与应用》
2020年第7期75-81,共7页
Intelligent Computer and Applications
基金
国家自然科学基金(61803264)
关键词
分支路径差异
变量状态差异
分支覆盖矩阵
相似分支路径对
软件缺陷定位
Branch Path Difference
Variable State Difference
Statement Coverage Matrix
Similar Branch Path Pairs
Software Defect Localization