arXivDaily arXiv每日学术速递 周一至周五更新
北美退伍军人节(Veterans Day),12 日无更新
arXiv 2301.01690cs.LOmath.LO
收藏

作为有状态程序的证明:一种带抽象 Hoare 三元组的一阶逻辑及其到命令式语言的解释

Proofs as stateful programs: A first-order logic with abstract Hoare triples, and an interpretation into an imperative language

Thomas Powell

AI总结:

本文提出一种扩展一阶逻辑,以 Hoare 三元组风格对抽象状态进行推理,并通过可实现性解释将证明提取为混合函数式/命令式程序,同时给出基于状态单子的语义解释及 Heyting 算术单子扩展。

摘要:

我们引入一阶逻辑的一种扩展,它配备了用于对抽象状态进行推理的附加谓词。该逻辑中的矢列由一个主公式以及 Hoare 逻辑风格的预处理和后置条件组成,并且该逻辑的公理和规则确保关于状态的断言以正确的方式组合。本文的主要结果是我们逻辑的一个可实现性解释,它将程序提取到一种混合函数式/命令式语言中。所有可用这种语言表达的程序都以顺序方式作用于状态,我们通过在语义元理论中使用状态单子来解释它们,从而使这一直观认识变得精确。我们的基本框架非常通用,我们的意图是它可以以多种不同方式被实例化和扩展。我们详细概述了一个这样的扩展:带良基 while 规则的 Heyting 算术的单子版本,并在结尾概述了未来工作的其他几个方向。

英文摘要:

We introduce an extension of first-order logic that comes equipped with additional predicates for reasoning about an abstract state. Sequents in the logic comprise a main formula together with pre- and postconditions in the style of Hoare logic, and the axioms and rules of the logic ensure that the assertions about the state compose in the correct way. The main result of the paper is a realizability interpretation of our logic that extracts programs into a mixed functional/imperative language. All programs expressible in this language act on the state in a sequential manner, and we make this intuition precise by interpreting them in a semantic metatheory using the state monad. Our basic framework is very general, and our intention is that it can be instantiated and extended in a variety of different ways. We outline in detail one such extension: A monadic version of Heyting arithmetic with a wellfounded while rule, and conclude by outlining several other directions for future work.

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

↑