paperbot · PL 论文追踪

全部论文 待读 收藏

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

证明作为有状态程序:带抽象 Hoare 三元组的一阶逻辑及其到命令式语言的解释
LMCS vol.Volume 20, Issue 12024匹配度 4/10 · 该论文属于程序验证与形式语义的纯理论工作,涉及Hoare逻辑和可实现性解释,与用户核心关注的静态分析+LLM、浮点程序分析、贝叶斯程序分析无直接交集;仅在形式验证/程序逻辑这一宽泛方向上有弱关联。引用 0 inbox
Thomas Powell
crossref: 2026-09-10

AI 速览

一句话:提出带抽象 Hoare 三元组的一阶逻辑,并用可实现性解释将证明抽取为有状态程序。

论文扩展一阶逻辑,引入用于推理抽象状态的额外谓词,并将 sequent 表示为带有 Hoare 风格前置/后置条件的主公式;公理与规则保证状态断言正确组合。核心贡献是对该逻辑给出可实现性解释,将证明抽取为混合函数式/命令式语言中的程序。该语言中的程序以顺序方式作用于状态,作者用 state monad 在语义元理论中精确刻画这一直觉。框架具有一般性,可实例化与扩展;文中详细展示带良基 while 规则的 monadic Heyting 算术作为扩展,并讨论未来方向。

问题
如何让逻辑证明同时包含对抽象状态的 Hoare 式前后条件,并从中抽取真正有状态、顺序执行的程序?
方法
扩展一阶逻辑,加入抽象状态谓词与 Hoare 风格 sequent,并给出基于 realizability 的解释,将证明映射到混合函数式/命令式语言;用 state monad 建立语义元理论。
评估
以语义元理论中的 state monad 解释验证抽取程序的顺序状态行为,并给出 monadic Heyting 算术与良基 while 规则作为实例/扩展,而非经验评估。
原文摘要(Abstract)

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.

链接与引用

DOI 原文 · PDF(开放获取) ·

BibTeX
@article{paperbot2784,
  title = {Proofs as stateful programs: A first-order logic with abstract Hoare triples, and an interpretation into an imperative language},
  author = {Thomas Powell},
  journal = {Logical Methods in Computer Science},
  volume = {Volume 20, Issue 1},
  year = {2024},
  doi = {10.46298/lmcs-20(1:7)2024}
}