Abstract
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 [1] 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 [6].
Several logics for reasoning about monadic programs have been introduced, such as evaluation logic [7,8], Hoare logic [9] 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 [12].
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
References
Moggi, E.: Notions of computation and monads. Inform. and Comput. 93, 55–92 (1991)
Moggi, E.: An abstract view of programming languages. Technical Report ECS-LFCS-90-113, Dept. of Computer Science, Edinburgh Univ. (90)
Wadler, P.: Comprehending monads. In: LFP 1990: Proceedings of the 1990 ACM conference on LISP and functional programming, pp. 61–78. ACM Press, New York (1990)
Jacobs, B., Poll, E.: Coalgebras and Monads in the Semantics of Java. Theoret. Comput. Sci. 291, 329–349 (2003)
Shinwell, M.R., Pitts, A.M.: On a monadic semantics for freshness. Theoret. Comput. Sci. 342, 28–55 (2005)
Wadler, P.: How to declare an imperative. ACM Computing Surveys 29, 240–263 (1997)
Pitts, A.: Evaluation logic. In: Higher Order Workshop. Workshops in Computing, pp. 162–189. Springer, Heidelberg (1991)
Moggi, E.: A semantics for evaluation logic. Fund. Inform. 22, 117–152 (1995)
Schröder, L., Mossakowski, T.: Monad-independent Hoare logic in HASCASL. In: Pezzé, M. (ed.) ETAPS 2003 and FASE 2003. LNCS, vol. 2621, pp. 261–277. Springer, Heidelberg (2003)
Schröder, L., Mossakowski, T.: Monad-independent dynamic logic in HASCASL. J. Logic Comput. 14, 571–619 (2004)
Mossakowski, T., Schröder, L., Goncharov, S.: Completeness of monad-based dynamic logic. Technical report, University of Bremen (2006)
Walter, D.: Monadic dynamic logic: Application and implementation. Master’s thesis, University of Bremen (2005)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2006 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Mossakowski, T. (2006). Monad-Based Logics for Computational Effects. In: Johnson, M., Vene, V. (eds) Algebraic Methodology and Software Technology. AMAST 2006. Lecture Notes in Computer Science, vol 4019. Springer, Berlin, Heidelberg. https://doi.org/10.1007/11784180_3
Download citation
DOI: https://doi.org/10.1007/11784180_3
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-35633-2
Online ISBN: 978-3-540-35636-3
eBook Packages: Computer ScienceComputer Science (R0)