基于异常检查点植入的软件缺陷定位方法
作者:
作者单位:

作者简介:

通讯作者:

中图分类号:

TP311

基金项目:

国家重点研发计划(2024YFF0908003); 国家自然科学基金(62472326); CCF-智谱大模型创新基金(CCF-Zhipu202408)


Software Fault Localization Method Based on Exception Checkpoint Injection
Author:
Affiliation:

Fund Project:

  • 摘要
  • |
  • 图/表
  • |
  • 访问统计
  • |
  • 参考文献
  • |
  • 相似文献
  • |
  • 引证文献
  • |
  • 资源附件
  • |
  • 文章评论
    摘要:

    软件缺陷定位任务以程序表层的执行错误为入口, 通过分析程序运行过程中异常的内部状态, 定位到底层代码级的缺陷根因. 目前主流的基于频谱和基于突变的缺陷定位以及当前最先进的SmartFL技术分别采用覆盖信息、突变信息和以程序语义为代表的信息作为观测程序内部状态的窗口, 所用信息过于宽泛、针对性不足, 且3类 (项)技术分别受限于语句风险值捆绑、突变成本过高、信息规模庞大等瓶颈. 为此, 近期一项基于异常触发信息的缺陷定位技术EXPECT提出通过程序自带的异常处理语句 (Try-catch块)对程序错误的执行状态进行监控, 以更低的成本实现了超越上述主流技术的缺陷定位效果, 该方法的运行前提是错误程序中必须含有足量的异常处理语句. 然而, 在真实的开源环境中, 许多软件程序并没有设置良好的异常处理机制, 导致其代码仅包含十分稀疏甚至不包含异常处理语句, 这直接影响EXPECT技术赖以运行的基础. 为此, 提出基于异常检查点植入的软件缺陷定位方法INSPECT (inserted checkpoint-based fault localization). 通过为错误程序自动植入临时的异常处理语句作为对运行时内部状态的检查点、设计更加先进的程序语句风险值计算方法, 将EXPECT方法的适用范围拓展到不包含异常处理语句的更普遍程序, 有效地将异常触发信息这一缺陷定位高效源数据的应用场景进行拓展, 实现了泛化性的提升. 实验结果表明, INSPECT实现了比现有最先进技术更好的缺陷定位效果: 在最好、平均、最差EXAM指标上的提升幅度分别为95.25%、55.92%和16.65% (模拟缺陷), 以及93.39%、57.54%和13.92% (真实缺陷); 在MRR指标上的提升为311.47% (模拟缺陷)和283.31% (真实缺陷).

    Abstract:

    Software fault localization tasks begin with the program execution failure, and locate the root cause of the fault at the code level by analyzing the abnormal internal state during program execution. The current mainstream spectrum-based and mutation-based fault localization techniques, and state-of-the-art technique SmartFL utilize coverage information, mutation information, and information represented by program semantics respectively as windows to observe the internal state of the program. The employed information is too broad and not targeted enough, and the three types of technology are limited by bottlenecks such as the tie of statement risk values, excessive mutation cost, and large information scale. To this end, EXPECT, a fault localization technique based on exception trigger information, has been proposed recently to monitor the execution state of program failure via the program’s built-in exception handling statements (Try-catch blocks), achieving fault localization effectiveness that surpasses the aforementioned mainstream techniques at a lower cost. The premise of EXPECT is that the faulty program must contain enough exception handling statements. However, in the real open-source environments, many software programs do not have a good exception handling mechanism, which causes their codes to contain only very sparse or even no exception handling statements, thus directly affecting the basis on which EXPECT runs. To this end, a software fault localization method based on exception checkpoint injection, INSPECT (inserted checkpoint-based fault localization), is proposed. By automatically injecting temporary exception handling statements into the faulty program as checkpoints for the internal state during running, and designing a more sophisticated method for program statements’ risk value calculation, the application scope of EXPECT is extended to more general programs that do not contain exception handling statements. The application scenario of exception trigger information as an efficient source of data for fault localization is extended to achieve generalization improvement. Experimental results show that INSPECT obtains better fault localization effectiveness than the current state-of-the-art technique with improvements of 95.25%, 55.92%, and 16.65% (simulated faults) as well as 93.39%, 57.54%, and 13.92% (real-world faults) in the best, average, and worst EXAM metrics respectively, and 311.47% (simulated faults) and 283.31% (real-world faults) in the MRR metric.

    参考文献
    相似文献
    引证文献
引用本文

宋壹,谢晓园,张熙灏,辛奇,邢宸亮.基于异常检查点植入的软件缺陷定位方法.软件学报,2026,37(7):2849-2870

复制
相关视频

分享
文章指标
  • 点击次数:
  • 下载次数:
  • HTML阅读次数:
  • 引用次数:
历史
  • 收稿日期:2025-09-05
  • 最后修改日期:2025-10-20
  • 录用日期:
  • 在线发布日期: 2025-12-26
  • 出版日期: 2026-07-06
文章二维码
您是第位访问者
版权所有:中国科学院软件研究所 京ICP备05046678号-3
地址:北京市海淀区中关村南四街4号,邮政编码:100190
电话:010-62562563 传真:010-62562533 Email:jos@iscas.ac.cn
技术支持:北京勤云科技发展有限公司

京公网安备 11040202500063号