一句话:提出 AutoGrader,基于最弱前置条件与符号执行比较学生程序与参考实现的语义路径差异,实现自动评分并给出反例。
手工批改编程作业耗时且易错,现有工具通常依赖失败测试用例生成反馈,效率低且结果不完整。本文提出 AutoGrader,仅需问题的一份参考实现即可自动判断提交程序是否正确,并在错误时提供反例。该方法不统计通过测试数,而是利用最弱前置条件和符号执行刻画执行路径语义,搜索学生提交与参考实现之间语义不同的执行路径;若存在差异则判为错误,否则视为正确。作者实现了工具,并在真实编程题目和在线平台收集的学生提交上评估。实验表明该方法未出现漏判(false negatives),还发现了在线平台评测器的 11 处错误。
Programming assignment grading can be time-consuming and error-prone if done manually. Existing tools generate feedback with failing test cases. However, this method is inefficient and the results are incomplete. In this paper, we present AutoGrader, a tool that automatically determines the correctness of programming assignments and provides counterexamples given a single reference implementation of the problem. Instead of counting the passed tests, our tool searches for semantically different execution paths between a student's submission and the reference implementation. If such a difference is found, the submission is deemed incorrect; otherwise, it is judged to be a correct solution. We use weakest preconditions and symbolic execution to capture the semantics of execution paths and detect potential path differences. AutoGrader is the first automated grading tool that relies on program semantics and generates feedback with counterexamples based on path deviations. It also reduces human efforts in writing test cases and makes the grading more complete. We implement AutoGrader and test its effectiveness and performance with real-world programming problems and student submissions collected from an online programming site. Our experiment reveals that there are no false negatives using our proposed method and we detected 11 errors of online platform judges.