Monad-Based Logics for Computational Effects
The presence of computational effects, such as state, store, exceptions, input, output, non-determinism, backtracking etc., complicates the reasoning about programs. In particular, usually for each effect (or each combination of these), an own logic needs to be designed.
Monads are a well-known tool from category theory that originally has been invented for studying algebraic structures. Monads have been used very successfully by Moggi  to model computational effects (in particular, all of those mentioned above) in an elegent way. This has been applied both to the semantics of programming languages (e.g. [2,3,4,5] ) and to the encapsulation of effects in pure functional languages such as Haskell .
Several logics for reasoning about monadic programs have been introduced, such as evaluation logic [7,8], Hoare logic  and dynamic logic [10,11]. Some of these logics have a semantics and proof calculus given in a completely monad independent (and hence, effect independent) way. We give an overview of these logics, discuss completeness of their calculi, as well as some application of these logics to the reasoning about Haskell and Java programs, and a coding in the theorem prover Isabelle .
KeywordsProgramming Language Software Engineer Algebraic Structure Formal Language Category Theory
- 2.Moggi, E.: An abstract view of programming languages. Technical Report ECS-LFCS-90-113, Dept. of Computer Science, Edinburgh Univ. (90)Google Scholar
- 7.Pitts, A.: Evaluation logic. In: Higher Order Workshop. Workshops in Computing, pp. 162–189. Springer, Heidelberg (1991)Google Scholar
- 11.Mossakowski, T., Schröder, L., Goncharov, S.: Completeness of monad-based dynamic logic. Technical report, University of Bremen (2006)Google Scholar
- 12.Walter, D.: Monadic dynamic logic: Application and implementation. Master’s thesis, University of Bremen (2005)Google Scholar