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

证明助手中的自动测试用例缩减:以 Coq 为例的案例研究

Automatic Test-Case Reduction in Proof Assistants: A Case Study in Coq

Jason Gross, Théo Zimmermann, Rajashree Agrawal, Adam Chlipala

AI总结:

本文提出 Coq Bug Minimizer 工具,自动将 Coq 反向 CI 失败缩减为最小独立测试用例,在约 75% 的失败案例中成功缩减,平均缩减至原大小的三分之一,从而提升证明助手兼容性问题的调试效率。

摘要:

随着证明助手采用率的提高,人们需要高效地识别、记录和修复由证明助手演进引起的兼容性问题。我们提出了 Coq Bug Minimizer,一种用于以最小且独立的文件复现错误行为的工具,该工具与 coqbot 集成,可在 Coq 反向 CI 失败时自动触发。我们的工具消除了下载、配置、编译以及随后探索和理解大型开发项目的开销:使 Coq 开发人员能够轻松获得模块化测试用例文件,以便进行快速实验。在本文中,我们描述了关于 Coq 中测试用例缩减与传统编译器中测试用例缩减有何不同的见解。我们期望这些见解能够推广到其他证明助手。我们在超过 150 个 CI 失败案例上评估了 Coq Bug Minimizer。我们的工具在大约 75% 的情况下成功地将失败缩减为更小的测试用例。该最小化器在 89% 的情况下生成完全独立的测试用例,并且其大小平均约为原始测试的三分之一。缩减后的测试用例平均编译时间为 1.25 秒,其中 75% 的用例编译时间不到半秒。

英文摘要:

As the adoption of proof assistants increases, there is a need for efficiency in identifying, documenting, and fixing compatibility issues that arise from proof assistant evolution. We present the Coq Bug Minimizer, a tool for reproducing buggy behavior with minimal and standalone files, integrated with coqbot to trigger automatically on Coq reverse CI failures. Our tool eliminates the overhead of having to download, set up, compile, and then explore and understand large developments: enabling Coq developers to easily obtain modular test-case files for fast experimentation. In this paper, we describe insights about how test-case reduction is different in Coq than in traditional compilers. We expect that our insights will generalize to other proof assistants. We evaluate the Coq Bug Minimizer on over 150 CI failures. Our tool succeeds in reducing failures to smaller test cases in roughly 75% of the time. The minimizer produces a fully standalone test case 89% of the time, and it is on average about one-third the size of the original test. The average reduced test case compiles in 1.25 seconds, with 75% taking under half a second.

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

↑