Skip to main content

Parametrized Exceptions

  • Conference paper
Algebra and Coalgebra in Computer Science (CALCO 2005)

Part of the book series: Lecture Notes in Computer Science ((LNTCS,volume 3629))

Included in the following conference series:

Abstract

Following the paradigm of encapsulation of side effects via monads, the Java execution mechanism has been described by the so-called Java monad, encorporating essentially stateful computation and exceptions, which are heavily used in Java control flow. A technical problem that appears in this model is the fact that the return exception in Java is parametrized by the return value, so that method calls actually move between slightly different monads, depending on the type of the return value. We provide a treatment of this problem in the general framework of exception monads as introduced in earlier work by some of the authors; this framework includes generic partial and total Hoare calculi for abrupt termination. Moreover, we illustrate this framework by means of a verification of a pattern match algorithm.

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

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Claessen, K.: A poor man’s concurrency monad. J. Funct. Programming 9, 313–323 (1999)

    Article  MATH  Google Scholar 

  2. Führmann, C.: Varieties of effects. In: Nielsen, M., Engberg, U. (eds.) FOSSACS 2002. LNCS, vol. 2303, pp. 144–158. Springer, Heidelberg (2002)

    Chapter  Google Scholar 

  3. The Haskell mailing list (2002), http://www.haskell.org/mailinglist.html

  4. Huisman, M., Jacobs, B.: Java program verification via a Hoare logic with abrupt termination. In: Maibaum, T. (ed.) FASE 2000. LNCS, vol. 1783, pp. 284–303. Springer, Heidelberg (2000)

    Chapter  Google Scholar 

  5. Jacobs, B., Poll, E.: A logic for the Java Modeling Language JML. In: Hussmann, H. (ed.) FASE 2001. LNCS, vol. 2029, pp. 284–299. Springer, Heidelberg (2001)

    Chapter  Google Scholar 

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

    Article  MATH  MathSciNet  Google Scholar 

  7. Joy, B., Steele, G., Gosling, J., Bracha, G.: The Java language specification. Addison-Wesley, Reading (2000)

    Google Scholar 

  8. Moggi, E.: An abstract view of programming languages, Tech. Report ECS-LFCS-90-113, Univ. of Edinburgh (1990)

    Google Scholar 

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

    Article  MATH  MathSciNet  Google Scholar 

  10. Mossakowski, T.: Heterogeneous specification and the heterogeneous tool set, Habilitation thesis, University of Bremen (2005)

    Google Scholar 

  11. Peyton-Jones, S. (ed.): Haskell 1998 language and libraries — the revised report, Cambridge (2003) also J. Funct. Programming 13 (2003)

    Google Scholar 

  12. Regensburger, F.: HOLCF: Higher order logic of computable functions. In: Schubert, E.T., Alves-Foss, J., Windley, P. (eds.) HUG 1995. LNCS, vol. 971, pp. 293–307. Springer, Heidelberg (1995)

    Google Scholar 

  13. Schröder, L., Mossakowski, T.: HASCASL: Towards integrated specification and development of functional programs. In: Kirchner, H., Ringeissen, C. (eds.) AMAST 2002. LNCS, vol. 2422, pp. 99–116. Springer, Heidelberg (2002)

    Chapter  Google Scholar 

  14. Schröder, L., Mossakowski, T.: Monad-independent hoare logic in HASCASL. In: Pezzé, M. (ed.) FASE 2003. LNCS, vol. 2621, pp. 261–277. Springer, Heidelberg (2003)

    Chapter  Google Scholar 

  15. Schröder, L., Mossakowski, T.: Generic exception handling and the Java monad. In: Rattray, C., Maharaj, S., Shankland, C. (eds.) AMAST 2004. LNCS, vol. 3116, pp. 443–459. Springer, Heidelberg (2004)

    Chapter  Google Scholar 

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

    Article  MATH  MathSciNet  Google Scholar 

  17. Schröder, L., Mossakowski, T., Maeder, C.: HasCASL – Integrated functional specification and programming. Language summary, available at http://www.informatik.uni-bremen.de/agbkb/forschung/formal_methods/CoFI/HasCASL

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

    Article  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2005 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Walter, D., Schröder, L., Mossakowski, T. (2005). Parametrized Exceptions. In: Fiadeiro, J.L., Harman, N., Roggenbach, M., Rutten, J. (eds) Algebra and Coalgebra in Computer Science. CALCO 2005. Lecture Notes in Computer Science, vol 3629. Springer, Berlin, Heidelberg. https://doi.org/10.1007/11548133_27

Download citation

  • DOI: https://doi.org/10.1007/11548133_27

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-28620-2

  • Online ISBN: 978-3-540-31876-7

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics