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

Fuente: arXiv
Salvato in:
Dettagli Bibliografici
Autore principale: Powell, Thomas
Natura: Preprint
Pubblicazione: 2023
Soggetti:
Accesso online:
Tags: Aggiungi Tag
Nessun Tag, puoi essere il primo ad aggiungerne!!
_version_ 1866911977999171584
author Powell, Thomas
author_facet Powell, Thomas
contents 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.
format Preprint
id arxiv_https___arxiv_org_abs_2301_01690
institution arXiv
publishDate 2023
record_format arxiv
spellingShingle Proofs as stateful programs: A first-order logic with abstract Hoare triples, and an interpretation into an imperative language
Powell, Thomas
Logic in Computer Science
Logic
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.
title Proofs as stateful programs: A first-order logic with abstract Hoare triples, and an interpretation into an imperative language
topic Logic in Computer Science
Logic
url https://arxiv.org/abs/2301.01690