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

竞赛级代码的自动反馈生成

Automated Feedback Generation for Competition-Level Code

Jialu Zhang, De Li, John C. Kolesar, Hanyuan Shi, Ruzica Piskac

摘要:

竞争性编程已经成为程序员测试自己技能的一种流行方式。大型在线编程竞赛吸引了数百万经验丰富的程序员相互竞争。竞赛级编程问题本质上是具有挑战性的,参与者往往在第一次尝试时无法解决问题。一些竞争性编程的在线平台也允许程序员练习竞争级别的问题,并且对于不正确的练习提交的标准反馈是提交失败的第一个测试案例。通常,失败的测试用例不能为程序员提供足够的信息来解决他们代码中的错误,他们在几次不成功的尝试后放弃了这个问题。我们提出Clef,第一个数据驱动的工具,可以通过修复程序员的错误提交自动生成对竞争级别代码的反馈。关键的发展是Clef可以学习如何通过检查其他程序员随着时间的推移对自己提交的修复来生成错误提交的修复。由于一个不正确的程序和一个正确的程序之间的差异可能是显着的,我们引入了一个新的数据结构,合并树,捕捉提交之间的变化。合并树是通用的:它们可以编码大的算法级重新设计和小的语句级更改。Clef应用它从提交数据库中学习的模式,为数据库外的新提交生成修复。我们在Codeforces(世界上最大的竞争性编程平台)的六个现实问题上对Clef进行了评估。Clef在修复程序员的错误提交时达到了42.1%的准确率。即使程序员提交了错误的文件,而他们自己从来没有找到问题的解决方案,Clef也有34.1%的时间修复用户的程序。

英文摘要:

Competitive programming has become a popular way for programmers to test their skills. Large-scale online programming contests attract millions of experienced programmers to compete against each other. Competition-level programming problems are challenging in nature, and participants often fail to solve the problem on their first attempt. Some online platforms for competitive programming allow programmers to practice on competition-level problems as well, and the standard feedback for an incorrect practice submission is the first test case that the submission fails. Often, the failed test case does not provide programmers with enough information to resolve the errors in their code, and they abandon the problem after several more unsuccessful attempts. We present Clef, the first data-driven tool that can generate feedback on competition-level code automatically by repairing programmers' incorrect submissions. The key development is that Clef can learn how to generate repairs for incorrect submissions by examining the repairs that other programmers made to their own submissions over time. Since the differences between an incorrect program and a correct program for the same task may be significant, we introduce a new data structure, merge trees, to capture the changes between submissions. Merge trees are versatile: they can encode both large algorithm-level redesigns and small statement-level alterations. Clef applies the patterns it learns from a database of submissions to generate repairs for new submissions outside the database. We evaluated Clef on six real-world problems from Codeforces, the world's largest platform for competitive programming. Clef achieves 42.1% accuracy in repairing programmers' incorrect submissions. Even when given incorrect submissions from programmers who never found the solution to a problem on their own, Clef repairs the users' programs 34.1% of the time.

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

↑