arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2401.01416cs.SE
收藏

面向编程初学者提供数据驱动反馈的灵活控制流图对齐方法

Flexible Control Flow Graph Alignment for Delivering Data-Driven Feedback to Novice Programming Learners

Md Towhidul Absar Chowdhury, Maheen Riaz Contractor, Carlos R. Rivero

AI总结:

本文提出一种基于控制流图的灵活对齐算法,扩展开源方法CLARA以处理真实入门程序,在Codeforces的20个热门问题上将修复成功率从5%提升至46%。

摘要:

大规模支持编程入门作业的学习者已成为必然需求。这种支持包括针对学习者错误操作提供自动反馈。现有方法将该问题转化为自动修复学习者的错误程序,通过从其他学习者的现有正确程序中推断数据来实现。然而,这些方法存在局限性,因为它们仅比较具有相似控制流和语句顺序的程序,从而遗漏了通过灵活比较可能获得的一组有价值的修复反馈。本文对开源的数据驱动自动修复方法CLARA进行了多项修改,以处理真实世界的入门程序。我们扩展了CLARA的抽象语法树处理器,以处理常见的入门编程构造。此外,我们提出了一种基于控制流图的灵活对齐算法,通过使用操作和调用从程序中提取语义注释来丰富节点。利用这种对齐,我们修改错误程序的控制流图以匹配正确程序,从而应用CLARA的原始修复过程。我们在Codeforces上最受欢迎的20个编程问题中评估了我们的方法与基线的对比。结果表明,灵活对齐的成功修复百分比显著更高,达到46%,而基线CLARA仅为5%。我们的实现可在https://github.com/towhidabsar/clara获取。

英文摘要:

Supporting learners in introductory programming assignments at scale is a necessity. This support includes automated feedback on what learners did incorrectly. Existing approaches cast the problem as automatically repairing learners' incorrect programs extrapolating the data from an existing correct program from other learners. However, such approaches are limited because they only compare programs with similar control flow and order of statements. A potentially valuable set of repair feedback from flexible comparisons is thus missing. In this paper, we present several modifications to CLARA, a data-driven automated repair approach that is open source, to deal with real-world introductory programs. We extend CLARA's abstract syntax tree processor to handle common introductory programming constructs. Additionally, we propose a flexible alignment algorithm over control flow graphs where we enrich nodes with semantic annotations extracted from programs using operations and calls. Using this alignment, we modify an incorrect program's control flow graph to match the correct programs to apply CLARA's original repair process. We evaluate our approach against a baseline on the twenty most popular programming problems in Codeforces. Our results indicate that flexible alignment has a significantly higher percentage of successful repairs at 46% compared to 5% for baseline CLARA. Our implementation is available at https://github.com/towhidabsar/clara.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑