paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Re-Factoring Based Program Repair Applied to Programming Assignments

基于重构的程序修复在编程作业中的应用
ASE 2019 34th IEEE/ACM International Conference on Automated Software Engineering (ASE)2019匹配度 2/10 · 该论文属于程序修复与程序合成,面向学生编程作业自动反馈,与用户关注的 LLM/Agent 结合静态分析、浮点程序分析或贝叶斯程序分析没有直接关系。虽然涉及 PL 与程序合成,但研究目标和方法均不覆盖用户的核心方向。引用 86 inbox
Yang Hu, Umair Z. Ahmed, Sergey Mechtaev, Ben Leong, Abhik Roychoudhury
crossref: 2026-09-12

AI 速览

一句话:提出 Refactory,用重构正确解并匹配控制流、合成补丁,为错误学生程序实时生成修复。

本文面向编程作业反馈生成,解决现有自动修复方法依赖人工错误模型、需要大量正确提交、且扩展性与准确性不足的问题。方法名为 Refactory:先把所有正确解重构为语义等价的变体;对错误程序按控制流结构匹配最接近的重构程序;再从正确程序对齐基本块的执行中推断错误程序基本块的输入-输出规约;最后用基于搜索的合成修改错误块。作者在大型公立大学入门课程约1800份、来自361名学生的真实错误Python提交上评估,并与Clara等最新方法比较。结果显示,约30%的补丁比Clara更小,且常只需单个正确解、耗时更短。作者认为该方法也可作为仅需一个正确参考解的通用程序修复方法。

问题
如何全自动、实时地为错误的学生编程作业生成修复/反馈,避免人工错误模型、大量正确提交依赖以及扩展性和准确性不足。
方法
先重构正确解,按控制流匹配错误程序,从对齐基本块执行推断 I/O 规约,再用基于搜索的合成修改基本块。
评估
在约1800份真实错误Python提交(361名学生)上评估,与 Clara 等比较;约30%补丁更小,常只需单个正确解且耗时更短。
原文摘要(Abstract)

Automated program repair has been used to provide feedback for incorrect student programming assignments, since program repair captures the code modification needed to make a given buggy program pass a given test-suite. Existing student feedback generation techniques are limited because they either require manual effort in the form of providing an error model, or require a large number of correct student submissions to learn from, or suffer from lack of scalability and accuracy. In this work, we propose a fully automated approach for generating student program repairs in real-time. This is achieved by first re-factoring all available correct solutions to semantically equivalent solutions. Given an incorrect program, we match the program with the closest matching refactored program based on its control flow structure. Subsequently, we infer the input-output specifications of the incorrect program's basic blocks from the executions of the correct program's aligned basic blocks. Finally, these specifications are used to modify the blocks of the incorrect program via search-based synthesis. Our dataset consists of almost 1,800 real-life incorrect Python program submissions from 361 students for an introductory programming course at a large public university. Our experimental results suggest that our method is more effective and efficient than recently proposed feedback generation approaches. About 30% of the patches produced by our tool Refactory are smaller than those produced by the state-of-art tool Clara, and can be produced given fewer correct solutions (often a single correct solution) and in a shorter time. We opine that our method is applicable not only to programming assignments, and could be seen as a general-purpose program repair method that can achieve good results with just a single correct reference solution.

链接与引用

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

BibTeX
@inproceedings{paperbot5187,
  title = {Re-Factoring Based Program Repair Applied to Programming Assignments},
  author = {Yang Hu and Umair Z. Ahmed and Sergey Mechtaev and Ben Leong and Abhik Roychoudhury},
  booktitle = {ASE},
  year = {2019},
  doi = {10.1109/ase.2019.00044}
}