paperbot · PL 论文追踪

全部论文 待读 收藏

P2 PyDex: Repairing Bugs in Introductory Python Assignments using LLMs

PyDex:使用LLM修复入门Python作业中的缺陷
OOPSLA 8(OOPSLA1)2024匹配度 3/10 · 该论文使用 LLM(Codex)进行入门 Python 作业的自动程序修复,属于 AI→SE 的 APR 方向,与用户关注的静态分析/形式化验证、Agentic 程序分析及浮点/贝叶斯分析等核心问题关联较弱。此外其基于较旧的 Codex 模型,且目标场景(教学作业修复)偏窄,未体现理论形式化或工业落地深度。引用 37 inbox
Jialu Zhang, José Pablo Cambronero, Sumit Gulwani, Vu Le, Ruzica Piskac, Gustavo Soares, Gust Verbruggen
crossref: 2026-09-10

AI 速览

一句话:提出基于代码大模型Codex的自动程序修复系统PyDex,修复入门Python作业的语法与语义错误。

学生入门编程作业常出错,教师定制修复耗时。自动程序修复可合成修复,但已有符号与神经方法需大量工程或数据训练。本文提出PyDex,利用在代码上训练的大语言模型(Codex)构建面向入门Python作业的APR系统。它通过多模态提示、迭代查询、基于测试用例的few-shot选择以及程序分块,同时修复语法和语义错误。在286个真实学生程序上评估,并与三个基线(包括BIFI与Refactory的组合)比较,PyDex能修复更多程序且平均补丁更小。

问题
入门Python作业中学生的语法与语义错误需要教师花费大量时间定制修复,而现有符号或神经APR方法依赖大量工程投入或训练数据。
方法
使用代码大语言模型Codex,结合多模态提示、迭代查询、基于测试用例的few-shot选择与程序分块,构建自动修复系统PyDex。
评估
在286个真实学生程序上与三个基线(含BIFI+Refactory组合)对比,PyDex修复更多程序且平均补丁更小。
原文摘要(Abstract)

Students often make mistakes in their introductory programming assignments as part of their learning process. Unfortunately, providing custom repairs for these mistakes can require a substantial amount of time and effort from class instructors. Automated program repair (APR) techniques can be used to synthesize such fixes. Prior work has explored the use of symbolic and neural techniques for APR in the education domain. Both types of approaches require either substantial engineering efforts or large amounts of data and training. We propose to use a large language model trained on code, such as Codex (a version of GPT), to build an APR system -- PyDex -- for introductory Python programming assignments. Our system can fix both syntactic and semantic mistakes by combining multi-modal prompts, iterative querying, test-case-based selection of few-shots, and program chunking. We evaluate PyDex on 286 real student programs and compare to three baselines, including one that combines a state-of-the-art Python syntax repair engine, BIFI, and a state-of-the-art Python semantic repair engine for student assignments, Refactory. We find that PyDex can fix more programs and produce smaller patches on average.

链接与引用

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

BibTeX
@article{paperbot2544,
  title = {PyDex: Repairing Bugs in Introductory Python Assignments using LLMs},
  author = {Jialu Zhang and José Pablo Cambronero and Sumit Gulwani and Vu Le and Ruzica Piskac and Gustavo Soares and Gust Verbruggen},
  journal = {Proceedings of the ACM on Programming Languages},
  volume = {8},
  number = {OOPSLA1},
  year = {2024},
  doi = {10.1145/3649850}
}