paperbot · PL 论文追踪

全部论文 待读 收藏

P2 InspectCoder: Dynamic Analysis-Driven Self Repair through Interactive LLM-Debugger Collaboration

InspectCoder:通过交互式 LLM-调试器协作实现动态分析驱动的自我修复
OOPSLA 10(OOPSLA1)2026匹配度 4/10 · 该论文属于“LLM/Agent 作为工具改进程序分析”这一大方向,但其核心是交互式动态分析(调试器驱动)与程序修复,而非用户画像重点关注的静态分析、形式化验证,也与浮点与贝叶斯程序分析无交集;作为 Agentic 程序也仅是构建修复 Agent,而非对其做静态分析,因此只是方向上的邻近。引用 1 inbox
Yunkun Wang, Yue Zhang, Guochang Li, Chen Zhi, Binhua Li, Fei Huang, Yongbin Li, Shuiguang Deng
crossref: 2026-09-10

AI 速览

一句话:首个让 LLM 智能体主动操控调试器、通过交互式动态分析定位并修复复杂逻辑错误的程序修复系统。

LLM 生成代码中的复杂逻辑错误难以诊断与修复。现有基于 LLM 的自修复方法要么进行密集的静态语义分析,要么只依赖表层的执行日志,缺失了最能暴露缺陷根因的深层运行时行为,也缺乏人类调试所依赖的交互式动态分析能力。本文提出 InspectCoder,这是首个赋予 LLM 通过交互式调试器控制主动开展动态分析的智能体程序修复系统。其双智能体框架支持策略性断点设置、有针对性的状态检查以及在有状态调试会话中的增量式运行时实验:不同于固定日志收集流程,InspectCoder 会在运行时自适应地检查并扰动相关中间状态,并利用调试器反馈带来的即时过程奖励引导多步推理,将 LLM 调试从盲目试错转变为系统性的根因诊断。作者在 BigCodeBench-R 与 LiveCodeBench-R 两个自修复基准上进行了实验,修复准确率相对最强基线提升 5.10%–60.37%,修复效率分别提升 1.67–2.24 倍。此外还开源了中间件 InspectWare,用于抽象调试器复杂性并在主流 Python 测试框架间维持有状态调试会话。

问题
LLM 生成的代码中复杂逻辑错误的根因隐藏在运行时行为中,而现有 LLM 自修复方法仅做静态语义分析或使用浅层执行日志,缺乏交互式动态分析能力,导致难以定位真正缺陷。
方法
提出双智能体框架 InspectCoder,让 LLM 通过控制有状态调试器会话进行策略性断点设置、定向状态检查与增量运行时扰动,并以调试器反馈的即时过程奖励引导多步推理;同时提供开源中间件 InspectWare 解耦调试器复杂性。
评估
在 BigCodeBench-R 与 LiveCodeBench-R 两个自修复基准上,与最强基线相比修复准确率相对提升 5.10%–60.37%,修复效率提升 1.67–2.24 倍。
原文摘要(Abstract)

Complex logic errors in LLM-generated code are challenging to diagnose and repair. While existing LLM-based self-repair approaches conduct intensive static semantic analysis or rely on superficial execution logs, they miss the in-depth runtime behaviors that often expose bug root causes—lacking the interactive dynamic analysis capabilities that make human debugging effective. We present InspectCoder, the first agentic program repair system that empowers LLMs to actively conduct dynamic analysis via interactive debugger control. Our dual-agent framework enables strategic breakpoint placement, targeted state inspection, and incremental runtime experimentation within stateful debugger sessions. Unlike existing methods that follow fixed log collection procedures, InspectCoder adaptively inspects and perturbs relevant intermediate states at runtime, and leverages immediate process rewards from debugger feedback to guide multi-step reasoning, transforming LLM debugging paradigm from blind trial-and-error into systematic root cause diagnosis. We conduct comprehensive experiments on two challenging self-repair benchmarks: BigCodeBench-R and LiveCodeBench-R. InspectCoder achieves 5.10%–60.37% relative improvements in repair accuracy over the strongest baseline, while delivering 1.67x-2.24x superior bug-fix efficiency respectively.We also contribute InspectWare, an open-source middleware that abstracts debugger complexities and maintains stateful debugging sessions across mainstream Python testing frameworks. Our work provides actionable insight into the interactive LLM-debugger systems, demonstrating the significant potential of LLM-driven dynamic analysis for automated software engineering.

链接与引用

DOI 原文 · PDF(开放获取) ·

BibTeX
@article{paperbot3849,
  title = {InspectCoder: Dynamic Analysis-Driven Self Repair through Interactive LLM-Debugger Collaboration},
  author = {Yunkun Wang and Yue Zhang and Guochang Li and Chen Zhi and Binhua Li and Fei Huang and Yongbin Li and Shuiguang Deng},
  journal = {Proceedings of the ACM on Programming Languages},
  volume = {10},
  number = {OOPSLA1},
  year = {2026},
  doi = {10.1145/3798238}
}