Skip to main content

Monad-Based Logics for Computational Effects

  • Conference paper
Algebraic Methodology and Software Technology (AMAST 2006)

Part of the book series: Lecture Notes in Computer Science ((LNPSE,volume 4019))

  • 418 Accesses

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].

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

References

  1. Moggi, E.: Notions of computation and monads. Inform. and Comput. 93, 55–92 (1991)

    Article  MATH  MathSciNet  Google Scholar 

  2. Moggi, E.: An abstract view of programming languages. Technical Report ECS-LFCS-90-113, Dept. of Computer Science, Edinburgh Univ. (90)

    Google Scholar 

  3. 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)

    Chapter  Google Scholar 

  4. Jacobs, B., Poll, E.: Coalgebras and Monads in the Semantics of Java. Theoret. Comput. Sci. 291, 329–349 (2003)

    Article  MATH  MathSciNet  Google Scholar 

  5. Shinwell, M.R., Pitts, A.M.: On a monadic semantics for freshness. Theoret. Comput. Sci. 342, 28–55 (2005)

    Article  MATH  MathSciNet  Google Scholar 

  6. Wadler, P.: How to declare an imperative. ACM Computing Surveys 29, 240–263 (1997)

    Article  Google Scholar 

  7. Pitts, A.: Evaluation logic. In: Higher Order Workshop. Workshops in Computing, pp. 162–189. Springer, Heidelberg (1991)

    Google Scholar 

  8. Moggi, E.: A semantics for evaluation logic. Fund. Inform. 22, 117–152 (1995)

    MATH  MathSciNet  Google Scholar 

  9. 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)

    Chapter  Google Scholar 

  10. Schröder, L., Mossakowski, T.: Monad-independent dynamic logic in HASCASL. J. Logic Comput. 14, 571–619 (2004)

    Article  MATH  MathSciNet  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 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints 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)

Publish with us

Policies and ethics