失败的证明可以产生有用的测试
A Failed Proof Can Yield a Useful Test
AI总结:
本文提出 Proof2Test 工具,将自动程序证明失败时 SMT 求解器生成的反例转化为失败测试,帮助程序员定位并修正缺陷。
摘要:
在软件验证中,成功的自动化程序证明是终极胜利。然而在实践中,通往这种成功的道路上布满了许多失败的证明尝试。与失败的测试不同——后者能提供程序中实际缺陷的具体证据——失败的证明会让程序员摸不着头脑。我们能否转而从中学到一些有用的东西呢?本文所报告的工作利用了某些自动证明器在尝试证明时收集的关于程序的丰富内部信息。如果证明失败,本文提出的 Proof2Test 工具会使用证明器生成的反例(具体来说,是 Boogie 证明环境底层的 SMT 求解器所生成的反例;Boogie 在 AutoProof 系统中用于对配备契约的 Eiffel 程序执行正确性证明)来产生一个失败的测试,从而为程序员提供可立即利用的信息以修正程序。讨论部分介绍了 Proof2Test 工具,并在一组具有代表性的示例上演示了这些思想和工具的应用。
英文摘要:
A successful automated program proof is, in software verification, the ultimate triumph. In practice, however, the road to such success is paved with many failed proof attempts. Unlike a failed test, which provides concrete evidence of an actual bug in the program, a failed proof leaves the programmer in the dark. Can we instead learn something useful from it? The work reported here takes advantage of the rich internal information that some automatic provers collect about the program when attempting a proof. If the proof fails, the Proof2Test tool presented in this article uses the counterexample generated by the prover (specifically, the SMT solver underlying the proof environment Boogie, used in the AutoProof system to perform correctness proofs of contract-equipped Eiffel programs) to produce a failed test, which provides the programmer with immediately exploitable information to correct the program. The discussion presents the Proof2Test tool and demonstrates the application of the ideas and tool to a collection of representative examples.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。