摘要
针对软件开发过程中的错误定位问题,提出一种以函数调用路径和遗传算法为基础的软件错误定位方法FGAFL。将软件测试中的错误定位问题转化为组合优化问题,结合函数调用路径对错误定位的影响构建适应度函数。通过遗传算法在候选种群中迭代搜索具有较高可疑度的候选错误分布,得到最优解。根据最优解对程序中的函数按可疑度进行排序,依次检查函数并定位错误的具体位置。实验表明,FGAFL方法可以有效降低运算量并缩减代码审查的范围,提高错误定位的精度和效率。
For fault location in software development based on function call path and genetic algorithm,this paper proposes a software fault location method called FGAFL.Firstly,the proposed method transforms fault location into combinatorial optimization in software testing,and constructs fitness function based on the influence of function call path.Then,to obtain the optimal solution,the method searches the candidate fault distribution with high suspicious degree in the candidate population iteratively by genetic algorithm.Finally,according to the optimal solution,the functions in the program are sorted according to the suspicious degree,while the proposed method checks the functions in that order and locate the faults.Experimental results show that FGAFL can reduce the amount of computation and the scope of code review effectively,so as to improve the accuracy and efficiency of fault location.
作者
黄晴雁
牟永敏
崔展齐
张志华
HUANG Qingyan;MU Yongmin;CUI Zhanqi;ZHANG Zhihua(Computer College,Beijing Information Science and Technology University,Beijing 100101,China;Beijing Key Laboratory of Internet Culture and Digital Dissemination Research,Beijing Information Science and Technology University,Beijing 100101,China)
出处
《计算机工程与应用》
CSCD
北大核心
2020年第22期66-73,共8页
Computer Engineering and Applications
基金
北京市自然科学基金(No.Z160002)
网络文化与数字传播北京市重点实验室开放课题(No.5221935409)。
关键词
错误定位
函数调用路径
遗传算法
适应度函数
fault location
function call path
genetic algorithm
fitness function