Log In Sign Up

Dijkstra Monads for All

by   Kenji Maillard, et al.

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 simplifying the task of 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 Plotkin and Power's algebraic operations for Dijkstra monads, together with a corresponding notion of 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 partiality, exceptions, nondeterminism, state, and input-output.


page 1

page 2

page 3

page 4


On Formal Specification of Maple Programs

This paper is an example-based demonstration of our initial results on t...

Extending Equational Monadic Reasoning with Monad Transformers

There is a recent interest for the verification of monadic programs usin...

Specifying verified x86 software from scratch

We present a simple framework for specifying and proving facts about the...

Advances of Proof Scores in CafeOBJ

Critical flaws continue to exist at the level of domain, requirement, an...

Behavioural Equivalence via Modalities for Algebraic Effects

The paper investigates behavioural equivalence between programs in a cal...

Robustness Verification for Transformers

Robustness verification that aims to formally certify the prediction beh...

Polymorphic Iterable Sequential Effect Systems

Effect systems are lightweight extensions to type systems that can verif...