paperbot · PL 论文追踪

全部论文 待读 收藏

P2 InFix: Automatically Repairing Novice Program Inputs

InFix:自动修复初学者的程序输入
ASE 2019 34th IEEE/ACM International Conference on Automated Software Engineering (ASE)2019匹配度 2/10 · 该论文属于程序自动修复/调试方向,但与用户关注的静态分析、LLM/Agent 与程序分析交叉、浮点程序分析、贝叶斯程序分析均无直接关系;它修复的是新手程序的输入数据而非源代码或分析工具本身。引用 12 inbox
Madeline Endres, Georgios Sakkas, Benjamin Cosman, Ranjit Jhala, Westley Weimer
crossref: 2026-09-12

AI 速览

一句话:InFix 通过基于错误消息的模板与随机变异自动修复新手程序的输入错误,无需测试用例或注解,修复率达 94.5%。

新手编程中的许多错误源于输入数据不当而非源代码缺陷,但现有自动调试与维护技术通常修复源码、依赖测试用例或需要特殊注解。InFix 转而自动修复程序输入:它利用新手常见的编程模式,迭代地应用基于错误消息的模板和随机变异来生成修复。作者为 Python 实现了 InFix,并在 Python Tutor 四年数据中收集的 29,995 个含输入错误的唯一场景上评估,能修复 94.5% 的确定性输入错误。研究还包含 97 人的人类实验,结果表明这一简单方法生成的修复质量高,被判定与人工修复同样有帮助,质量差距在 4% 以内。

问题
新手程序的错误常来自输入数据而非源代码,而现有自动调试方法多针对源码修复,且需要测试用例或特殊注解,难以直接用于教学场景。
方法
InFix 修复输入数据而非源码,无需测试用例与注解;它依据新手常见编程模式,迭代应用基于错误消息的模板和随机变异来生成输入修复。
评估
在 Python Tutor 四年数据中收集的 29,995 个含输入错误的唯一场景上评估,修复 94.5% 的确定性输入错误;并通过 97 人的人类研究验证修复质量接近人工修复(差距 4% 以内)。
原文摘要(Abstract)

This paper presents InFix, a technique for automatically fixing erroneous program inputs for novice programmers. Unlike comparable existing approaches for automatic debugging and maintenance tasks, InFix repairs input data rather than source code, does not require test cases, and does not require special annotations. Instead, we take advantage of patterns commonly used by novice programmers to automatically create helpful, high quality input repairs. InFix iteratively applies error-message based templates and random mutations based on insights about the debugging behavior of novices. This paper presents an implementation of InFix for Python. We evaluate on 29,995 unique scenarios with input-related errors collected from four years of data from Python Tutor, a free online programming tutoring environment. Our results generalize and scale; compared to previous work, we consider an order of magnitude more unique programs. Overall, InFix is able to repair 94.5% of deterministic input errors. We also present the results of a human study with 97 participants. Surprisingly, this simple approach produces high quality repairs; humans judged the output of InFix to be equally helpful and within 4% of the quality of human-generated repairs.

链接与引用

DOI 原文 ·

BibTeX
@inproceedings{paperbot5213,
  title = {InFix: Automatically Repairing Novice Program Inputs},
  author = {Madeline Endres and Georgios Sakkas and Benjamin Cosman and Ranjit Jhala and Westley Weimer},
  booktitle = {ASE},
  year = {2019},
  doi = {10.1109/ase.2019.00045}
}