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

在线编程作业中时间超限错误的系统性研究

A Systematic Study of Time Limit Exceeded Errors in Online Programming Assignments

University of Waterloo(滑铁卢大学);George Mason University(乔治梅森大学);Chinese University of Hong Kong, Shenzhen(香港中文大学(深圳));Google(谷歌);Yale University(耶鲁大学)

Jialu Zhang, Jialiang Gu, Wangmeiyu Zhang, José Pablo Cambronero, John Kolesar, Ruzica Piskac, Daming Li, Hanyuan Shi

AI总结:

本研究首次大规模实证分析在线编程中的时间超限错误,发现其根因多样,并提出自动修复工具Nettle及评估框架Nettle-Eval,实现98.5%修复率,远超基线。

摘要:

在线编程平台如Codeforces和LeetCode吸引了数百万用户,他们希望学习编程或提升技能以应对行业面试。这些用户面临的一个主要挑战是时间超限(TLE)错误,当程序超过执行时间限制时触发。尽管设计为性能保障,TLE错误难以解决:错误消息不提供诊断信息,平台支持极少,现有调试工具帮助有限。因此,许多用户在反复遭遇TLE失败后放弃提交。本文首次对在线编程中的TLE错误进行了大规模实证研究。我们手动分析了1000个带有TLE错误的Codeforces提交,分类其根本原因,并追踪用户尝试修复的方式。我们的分析表明,TLE错误不仅源于低效算法,还源于无限循环、数据结构使用不当和低效的I/O,这挑战了TLE纯粹是性能问题的传统观点。在这些发现的指导下,我们引入了Nettle,第一个专门针对TLE错误的自动修复工具,以及Nettle-Eval,第一个用于评估TLE修复的框架。Nettle将LLM与编译器和测试用例生成的针对性自动反馈相结合,产生小而正确的代码编辑,消除TLE同时保持功能。在相同的1000个真实案例上评估,Nettle实现了98.5%的修复率,远超最强的LLM基线,其所有修复均通过Nettle-Eval和平台官方检查器,确认了我们框架的可靠性。

英文摘要:

Online programming platforms such as Codeforces and LeetCode attract millions of users seeking to learn to program or refine their skills for industry interviews. A major challenge for these users is the Time Limit Exceeded (TLE) error, triggered when a program exceeds the execution time bound. Although designed as a performance safeguard, TLE errors are difficult to resolve: error messages provide no diagnostic insight, platform support is minimal, and existing debugging tools offer little help. As a result, many users abandon their submissions after repeated TLE failures. This paper presents the first large-scale empirical study of TLE errors in online programming. We manually analyzed 1000 Codeforces submissions with TLE errors, classified their root causes, and traced how users attempted to fix them. Our analysis shows that TLE errors often arise not only from inefficient algorithms but also from infinite loops, improper data structure use, and inefficient I/O, challenging the conventional view that TLEs are purely performance issues. Guided by these findings, we introduce Nettle, the first automated repair tool specifically designed for TLE errors, and Nettle-Eval, the first framework for evaluating TLE repairs. Integrating LLMs with targeted automated feedback generated by the compiler and test cases, Nettle produces small, correct code edits that eliminate TLEs while preserving functionality. Evaluated on the same 1000 real-world cases, Nettle achieves a 98.5% fix rate, far exceeding the strongest LLM baseline, and all of its repairs pass both Nettle-Eval and the platform's official checker, confirming the reliability of our framework.

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

↑