Reference. Dijkstra monads for all

This paper proposes a general semantic framework for verifying programs with arbitrary monadic side-effects using Dijkstra monads, which we define as monad-like structures indexed by a specification monad. We prove that any monad morphism between a computational monad and a specification monad gives rise to a Dijkstra monad, which provides great flexibility for obtaining Dijkstra monads tailored to the verification task at hand. We moreover show that a large variety of specification monads can be obtained by applying monad transformers to various base specification monads, including predicate transformers and Hoare-style pre- and postconditions. For defining correct monad transformers, we propose a language inspired by Moggi’s monadic metalanguage that is parameterized by a dependent type theory. We also develop a notion of algebraic operations for Dijkstra monads, and start to investigate two ways of also accommodating effect handlers. We implement our framework in both Coq and F*, and illustrate that it supports a wide variety of verification styles for effects such as exceptions, nondeterminism, state, input-output, and general recursion.

Cite

Cite as @maillard-2019-dijkstra (helia, typst) · \cite{maillard-2019-dijkstra} (LaTeX)
BibTeX
bibtex · 1 line
@article{maillard-2019-dijkstra, title={Dijkstra monads for all}, volume={3}, ISSN={2475-1421}, url={http://dx.doi.org/10.1145/3341708}, DOI={10.1145/3341708}, number={ICFP}, journal={Proceedings of the ACM on Programming Languages}, publisher={Association for Computing Machinery (ACM)}, author={Maillard, Kenji and Ahman, Danel and Atkey, Robert and Martínez, Guido and Hriţcu, Cătălin and Rivas, Exequiel and Tanter, Éric}, year={2019}, month=July, pages={1–29} }
hayagriva YAML (typst)
yaml · 21 lines
maillard-2019-dijkstra:
  type: article
  title: Dijkstra monads for all
  author:
  - Maillard, Kenji
  - Ahman, Danel
  - Atkey, Robert
  - Martínez, Guido
  - Hriţcu, Cătălin
  - Rivas, Exequiel
  - Tanter, Éric
  date: 2019-07
  page-range: 1-29
  serial-number:
    doi: 10.1145/3341708
  parent:
    type: periodical
    title: Proceedings of the ACM on Programming Languages
    publisher: Association for Computing Machinery (ACM)
    issue: ICFP
    volume: 3
Cited by (2)

Algebraic Effects Meet Hoare Logic in Cubical Agda kidney-2024-algebraic

This paper presents a novel formalisation of algebraic effects with equations in Cubical Agda. Unlike previous work in the literature that employed setoids to deal with equations, the library presented here uses quotient types to faithfully encode the type of terms quotiented by laws. Apart from tools for equational reasoning, the library also provides an effect-generic Hoare logic for algebraic effects, which enables reasoning about effectful programs in terms of their pre- and post-conditions. A particularly novel aspect is that equational reasoning and Hoare-style reasoning are related by an elimination principle of Hoare logic.
PDF · DOI · pldb

Formalized High Level Synthesis with Applications to Cryptographic Hardware harrison-2023-formalized

DOI
Cites 52 works (0 here)
External (52)
maillard-2019-dijkstra reference entries/refs/maillard-2019-dijkstra/maillard-2019-dijkstra.hel