
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.
QA75, FOS: Computer and information sciences, [INFO.INFO-LO] Computer Science [cs]/Logic in Computer Science [cs.LO], Computer Science - Programming Languages, Type theory, FOUNDATIONS, [INFO.INFO-SE] Computer Science [cs]/Software Engineering [cs.SE], Pre- and post-conditions, PROGRAM VERIFICATION, DEPENDENT TYPES, 004, [INFO.INFO-PL] Computer Science [cs]/Programming Languages [cs.PL], SIDE-EFFECTS, Electronic computers. Computer science, MONADS, https://purl.org/becyt/ford/1.2, https://purl.org/becyt/ford/1, Program semantics, [INFO.INFO-CR] Computer Science [cs]/Cryptography and Security [cs.CR], Programming Languages (cs.PL)
QA75, FOS: Computer and information sciences, [INFO.INFO-LO] Computer Science [cs]/Logic in Computer Science [cs.LO], Computer Science - Programming Languages, Type theory, FOUNDATIONS, [INFO.INFO-SE] Computer Science [cs]/Software Engineering [cs.SE], Pre- and post-conditions, PROGRAM VERIFICATION, DEPENDENT TYPES, 004, [INFO.INFO-PL] Computer Science [cs]/Programming Languages [cs.PL], SIDE-EFFECTS, Electronic computers. Computer science, MONADS, https://purl.org/becyt/ford/1.2, https://purl.org/becyt/ford/1, Program semantics, [INFO.INFO-CR] Computer Science [cs]/Cryptography and Security [cs.CR], Programming Languages (cs.PL)
| selected citations These citations are derived from selected sources. This is an alternative to the "Influence" indicator, which also reflects the overall/total impact of an article in the research community at large, based on the underlying citation network (diachronically). | 42 | |
| popularity This indicator reflects the "current" impact/attention (the "hype") of an article in the research community at large, based on the underlying citation network. | Top 10% | |
| influence This indicator reflects the overall/total impact of an article in the research community at large, based on the underlying citation network (diachronically). | Top 10% | |
| impulse This indicator reflects the initial momentum of an article directly after its publication, based on the underlying citation network. | Top 10% |
