paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Semantic program repair using a reference implementation

使用参考实现的语义程序修复
ICSE Proceedings of the 40th International Conference on Software Engineering2018匹配度 3/10 · 该论文属于传统程序修复与程序合成,使用符号分析从参考实现推断规约并生成补丁,虽涉及形式化/静态分析与工程落地,但不涉及用户核心关注的 LLM/Agent 与静态分析/形式化验证交叉,也与浮点程序分析、贝叶斯程序分析无关。引用 86 inbox
Sergey Mechtaev, Manh-Dung Nguyen, Yannic Noller, Lars Grunske, Abhik Roychoudhury
crossref: 2026-09-12

AI 速览

一句话:以参考实现为隐式规约,通过符号分析推断预期行为并合成条件等价补丁,缓解测试过拟合。

自动程序修复常以测试作为正确性判据,导致测试过拟合,生成补丁难以泛化到测试之外。本文提出使用参考实现进行语义程序修复:对参考实现进行符号分析,自动推断其预期行为规约;再利用该规约合成补丁,使修复后的程序与参考程序满足条件等价。由于参考实现充当隐式正确性标准,该方法可缓解基于测试修复中的过拟合问题。与 Relifix 等回归修复技术不同,参考程序与待修复程序在实现上可以存在显著差异。作者在嵌入式 Linux Busybox 上以 GNU Coreutils 为参考进行修复,并反向进行实验,结果表明该方法可扩展到真实程序,并能生成更多正确补丁。

问题
自动程序修复多依赖测试作为正确性标准,容易产生测试过拟合,无法保证生成的补丁在测试之外仍然正确。
方法
对参考实现进行符号分析以推断预期行为规约,并基于该规约合成补丁,强制修复后程序与参考程序条件等价。
评估
在嵌入式 Linux Busybox 与 GNU Coreutils 之间互为参考实现进行程序修复实验,验证方法在真实程序上的可扩展性与生成正确补丁的能力。
原文摘要(Abstract)

Automated program repair has been studied via the use of techniques involving search, semantic analysis and artificial intelligence. Most of these techniques rely on tests as the correctness criteria, which causes the test overfitting problem. Although various approaches such as learning from code corpus have been proposed to address this problem, they are unable to guarantee that the generated patches generalize beyond the given tests. This work studies automated repair of errors using a reference implementation. The reference implementation is symbolically analyzed to automatically infer a specification of the intended behavior. This specification is then used to synthesize a patch that enforces conditional equivalence of the patched and the reference programs. The use of the reference implementation as an implicit correctness criterion alleviates overfitting in test-based repair. Besides, since we generate patches by semantic analysis, the reference program may have a substantially different implementation from the patched program, which distinguishes our approach from existing techniques for regression repair like Relifix. Our experiments in repairing the embedded Linux Busybox with GNU Coreutils as reference (and vice-versa) revealed that the proposed approach scales to real-world programs and enables the generation of more correct patches.

链接与引用

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

BibTeX
@inproceedings{paperbot4436,
  title = {Semantic program repair using a reference implementation},
  author = {Sergey Mechtaev and Manh-Dung Nguyen and Yannic Noller and Lars Grunske and Abhik Roychoudhury},
  booktitle = {ICSE},
  year = {2018},
  doi = {10.1145/3180155.3180247}
}