如何用Dafny验证图灵机
How to Verify a Turing Machine with Dafny
AI总结:
本文使用Dafny验证两个典型图灵机的正确性,展示形式验证在处理复杂技术细节中的有效性。
摘要:
本文描述了使用程序验证器Dafny对两个图灵机进行形式验证。这两个机器都是决定性机器,因此我们证明了完全正确性。它们是理论计算机科学课程中典型的第一个图灵机例子;事实上,第二个机器直接取自相关教科书。通常,此类机器的正确性通过一些非正式的解释和几个示例执行来说明,而不是通过严谨的数学或机械形式证明。难怪:此类证明所需的不变量(和变体)是巨大的艺术作品,充满了压倒性的技术细节。在没有机械支持的情况下寻找和检查这些艺术作品几乎是不可能的,而这种支持只有在最近才变得可用。但如今,正是由于这些技术细节,当这些主题被证明时,程序验证器确实可以展示其能力。
英文摘要:
This paper describes the formal verification of two Turing machines using the program verifier Dafny. Both machines are deciders, so we prove total correctness. They are typical first examples of Turing machines used in any course of Theoretical Computer Science; in fact, the second machine is literally taken from a relevant textbook. Usually, the correctness of such machines is made plausible by some informal explanations of their basic ideas, augmented with a few sample executions, but neither by rigorous mathematical nor mechanized formal proof. No wonder: The invariants (and variants) required for such proofs are big artifacts, peppered with overpowering technical details. Finding and checking these artifacts without mechanical support is practically impossible, and such support is only available since recent times. But nowadays, just because of these technicalities, with such subjects under proof a program verifier can really show off and demonstrate its capabilities.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。