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

重新定义代码理解:将函数命名作为评估代码理解的机制

ReDefining Code Comprehension: Function Naming as a Mechanism for Evaluating Code Comprehension

David H. Smith, Max Fowler, Paul Denny, Craig Zilles

AI总结:

针对 EiPE 代码理解题自动评分难以区分目的层与实现层回答的问题,提出函数命名评估法,并通过课程实验与 IRT 分析验证其有效性,同时发布开源自动评分 Python 包。

摘要:

“用浅显英语解释”(Explain in Plain English,EiPE)问题被广泛用于评估代码理解技能,但自动评分具有挑战性。最近的方法,如基于代码生成的评分(Code Generation Based Grading,CGBG),利用大型语言模型(LLM)根据学生的解释生成代码,并通过单元测试验证其与原始代码的等价性。然而,该方法无法区分高层次、关注目的的回答与低层次、关注实现的回答,从而限制了其在评估理解水平方面的有效性。我们提出一种改进方法,让学生生成函数名,强调函数的目的而非实现细节。我们在一门编程入门课程中评估该方法,并使用项目反应理论(Item Response Theory,IRT)进行分析,以理解其作为考试试题的有效性及其与传统 EiPE 评分标准的一致性。我们还将这项工作发布为用于 EiPE 问题自动评分的开源 Python 包,为推广采用提供可扩展的解决方案。

英文摘要:

"Explain in Plain English" (EiPE) questions are widely used to assess code comprehension skills but are challenging to grade automatically. Recent approaches like Code Generation Based Grading (CGBG) leverage large language models (LLMs) to generate code from student explanations and validate its equivalence to the original code using unit tests. However, this approach does not differentiate between high-level, purpose-focused responses and low-level, implementation-focused ones, limiting its effectiveness in assessing comprehension level. We propose a modified approach where students generate function names, emphasizing the function's purpose over implementation details. We evaluate this method in an introductory programming course and analyze it using Item Response Theory (IRT) to understand its effectiveness as exam items and its alignment with traditional EiPE grading standards. We also publish this work as an open source Python package for autograding EiPE questions, providing a scalable solution for adoption.

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

↑