Monad-independent Dynamic Logic in HasCasl

  • Authors:
  • Lutz Schröder;Till Mossakowski

  • Affiliations:
  • BISS, Department of Computer Science, Universität Bremen, P.O. Box 330 440, 28334 Bremen, Germany. E-mail: {lschrode@informatik.uni-bremen.de, till@informatik.uni-bremen.de};BISS, Department of Computer Science, Universität Bremen, P.O. Box 330 440, 28334 Bremen, Germany. E-mail: {lschrode@informatik.uni-bremen.de, till@informatik.uni-bremen.de}

  • Venue:
  • Journal of Logic and Computation
  • Year:
  • 2004

Quantified Score

Hi-index 0.00

Visualization

Abstract

Monads have been recognized by Moggi as an elegant device for dealing with stateful computation in functional programming languages. In previous work, we have introduced a Hoare calculus for partial correctness of monadic programs. All this has been done in an entirely monad-independent way. Here, we extend this to a monad-independent dynamic logic (assuming amoderate amount of additional infrastructure for the monad). Dynamic logic is more expressive than the Hoare calculus; in particular, it allows reasoning about termination and total correctness. The background formalism for these concepts is the logic of HasCasl, a higher-order language for functional specification and programming. As an example application, we develop a monad-independent Hoare calculus for total correctness based on our dynamic logic, and illustrate this calculus by a termination proof for Dijkstra's nondeterministic implementation of Euclid's algorithm.