基于图可解释网络的软件错误定位
Software Fault Localization Based on Graph Interpretable Networks
邬凯胜 1周世健 2樊鑫1
作者信息
- 1. 南昌航空大学软件学院,南昌 330038;南昌航空大学软件测评中心,南昌 330038
- 2. 南昌航空大学软件学院,南昌 330038
- 折叠
摘要
软件错误定位技术旨在通过挖掘程序与测试用例执行数据,提升定位准确性;针对SBFL技术过于依赖二进制覆盖信息的问题,提出一种基于图可解释网络的软件错误定位方法,将测试执行转化为图结构,利用图注意网络建模深度挖掘代码片段隐含的信息及其相互关系,并采用强化学习思想对图注意力网络学习后的决策过程进行解释,从而确定关键节点,缩小错误定位范围;实验的场景设立在Defects4j数据集的5个项目进行,并与SBFL及未经过解释的深度学习方法进行了对比;结果显示,基于图可解释网络的定位方法在Top-1、Top-3和Top-5指标上分别提升了 7.26%、7.56%和9.96%,EXAM指数也提升了8.98%,显著优于其他方法.
Abstract
Software fault localization aims to improve the accuracy of localization by mining program and execution data of test ca-ses.To address the issue that spectrum-based fault localization(SBFL)technology relies too much on binary coverage information,a software fault localization method based on graph-interpretable networks is proposed.This method transforms test execution into a graph structure,utilizes the graph attention network modeling to deeply mine the implicit information and interrelationships among code segments.The reinforcement learning principles are used to explain the decision-making process after the graph attention net-work learning,thereby determine the key nodes and reduce the fault localization range.The experiments are conducted on five pro-jects from the Defects4j dataset and compared with the SBFL and uninterpreted deep learning methods.The results show that based on graph-interpretable networks,the localization method improves the Top-1,Top-3,and Top-5 indicators by 7.26%,7.56%,and 9.96%,respectively,and the EXAM index also increases by 8.98%,significantly outperforming other methods.
关键词
软件测试/错误定位程序谱/图注意力网络/可解释模型Key words
software testing/fault localization/program spectrum/graph attention network/interpretable model引用本文复制引用
基金项目
国家自然科学基金地区基金项目(42261070)
出版年
2024