arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2407.08958cs.SE
收藏

面向实用且有用的自动化程序修复调试研究

Towards Practical and Useful Automated Program Repair for Debugging

Qi Xin, Haojun Wu, Steven P. Reiss, Jifeng Xuan

AI总结:

针对现有自动化程序修复(APR)依赖测试用例、需重跑程序、修复复杂缺陷能力弱等实用性不足问题,提出交互式IDE修复系统PracAPR,通过无测试缺陷定位、结合大模型与策略的补丁生成、模拟轨迹验证实现无需测试和程序重跑的修复,推动APR实用化。

摘要:

当前的自动化程序修复(APR)技术远未达到足够实用、有用的程度,无法应用于实际调试场景。它们依赖诸多不切实际的假设,包括需要一套全面的测试用例作为正确性标准,以及频繁重新执行程序来验证补丁;这类技术运行速度不快,且通过修复程序多个位置来解决常见复杂缺陷的能力十分有限。我们希望大幅提升APR的实用性、有效性与有用性,以辅助人们开展调试工作。\n为实现这一目标,我们构想了PracAPR——一款运行在集成开发环境(IDE)中的交互式修复系统,可为调试提供有效的修复建议。PracAPR无需测试套件,也无需重新执行程序。它假设开发者使用IDE调试器,且程序已在观测到问题的位置暂停。该系统与开发者交互以获取问题规约,基于规约执行无需测试、基于流分析的缺陷定位,结合基于大语言模型的局部修复与定制化策略驱动的全局修复生成补丁,并通过基于模拟轨迹对比、无需重新执行程序的补丁验证来给出修复建议。我们希望通过PracAPR,在让APR变得实用、成为日常调试常规组成部分的道路上迈出重要一步。

英文摘要:

Current automated program repair (APR) techniques are far from being practical and useful enough to be considered for realistic debugging. They rely on unrealistic assumptions including the requirement of a comprehensive suite of test cases as the correctness criterion and frequent program re-execution for patch validation; they are not fast; and their ability of repairing the commonly arising complex bugs by fixing multiple locations of the program is very limited. We hope to substantially improve APR's practicality, effectiveness, and usefulness to help people debug. Towards this goal, we envision PracAPR, an interactive repair system that works in an Integrated Development Environment (IDE) to provide effective repair suggestions for debugging. PracAPR does not require a test suite or program re-execution. It assumes that the developer uses an IDE debugger and the program has suspended at a location where a problem is observed. It interacts with the developer to obtain a problem specification. Based on the specification, it performs test-free, flow-analysis-based fault localization, patch generation that combines large language model-based local repair and tailored strategy-driven global repair, and program re-execution-free patch validation based on simulated trace comparison to suggest repairs. By having PracAPR, we hope to take a significant step towards making APR useful and an everyday part of debugging.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑