3
views
0
recommends
+1 Recommend
0 collections
    0
    shares
      • Record: found
      • Abstract: found
      • Article: found
      Is Open Access

      Dijkstra Monads for All

      Preprint

      Read this article at

      Bookmark
          There is no author summary for this article yet. Authors can add summaries to their articles on ScienceOpen to make them more accessible to a non-specialist audience.

          Abstract

          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.

          Related collections

          Most cited references3

          • Record: found
          • Abstract: not found
          • Conference Proceedings: not found

          Parametric higher-order abstract syntax for mechanized semantics

            Bookmark
            • Record: found
            • Abstract: not found
            • Conference Proceedings: not found

            Dijkstra monads for free

              Bookmark
              • Record: found
              • Abstract: not found
              • Conference Proceedings: not found

              Hoare-style reasoning with (algebraic) continuations

                Bookmark

                Author and article information

                Journal
                04 March 2019
                Article
                1903.01237
                5801fc02-f784-4ddf-a8d1-ce10ed729a41

                http://creativecommons.org/licenses/by/4.0/

                History
                Custom metadata
                ICFP'19 submission
                cs.PL

                Programming languages
                Programming languages

                Comments

                Comment on this article