用大模型修复学生无法编译的代码,保留原逻辑结构以更好分析学习过程。
Automated Program Repair of Uncompilable Student Code
- 用大语言模型在高/低上下文提示下自动修复无法编译的代码。
- 所有模型都能生成可编译代码,但对控制流和结构的保留程度不同。
- 适合教育数据挖掘、学习分析与编程教学研究者使用。
在计算机科学入门课程中,大量学生编程提交的代码无法编译,限制了其在学习建模和知识追踪中的应用。传统分析流程常直接排除此类样本,导致学习行为数据丢失。本文研究将自动化程序修复作为恢复不可编译代码的策略,在此框架下评估大语言模型(LLMs)作为修复代理的表现,对比高、低上下文提示条件下的效果。修复结果通过可编译性、编辑距离以及对学生原始控制流和代码结构的保留度进行评估。尽管所有模型均生成可编译代码,但在保持学生原有逻辑结构方面表现不一,影响其教学价值。该方法使不可编译提交得以恢复,从而支持对学习者编码过程与长期发展的更丰富、全面分析。
原文摘要 · Abstract (English)
A significant portion of student programming submissions in CS1 learning environments are uncompilable, limiting their use in student modeling and downstream knowledge tracing. Traditional modeling pipelines often exclude these cases, discarding observations of student learning. This study investigates automated program repair as a strategy to recover uncompilable code while preserving students' structural intent for use in student modeling. Within this framework, we assess large language models (LLMs) as repair agents under high- and low-context prompting conditions. Repairs were evaluated for compilability, edit distance, and preservation of students' original structure and logic. While all models produced compilable repairs, they differed in how well they preserve students' control flow and code structure, affecting their pedagogical utility. By recovering uncompilable submissions, this work enables richer and more comprehensive analyses of learners' coding processes and development over time.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。