## Parametrized exceptions (2005)

### Cached

### Download Links

- [www.cs.chalmers.se]
- [www.informatik.uni-bremen.de]
- DBLP

### Other Repositories/Bibliography

Venue: | IN CALCO 05, LNCS 3629 |

Citations: | 4 - 3 self |

### BibTeX

@INPROCEEDINGS{Walter05parametrizedexceptions,

author = {Dennis Walter and Lutz Schröder and Till Mossakowski},

title = {Parametrized exceptions},

booktitle = {IN CALCO 05, LNCS 3629},

year = {2005},

pages = {424--438},

publisher = {Springer}

}

### OpenURL

### Abstract

Following the paradigm of encapsulation of side effects via monads, the Java execution mechanism has been described by the socalled 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.

### Citations

1616 |
The Java Language Specification
- Gosling, Joy, et al.
- 1996
(Show Context)
Citation Context ...shape of a monadic wrapper routine for method bodies that shifts the value of the return exception (which is now treated as a part of the exception, in accordance with the Java language specification =-=[7]-=-) into the value of the monadic computation. We also provide suitable Hoare rules for this wrapper. The generic frameworks2 is illustrated by means of a benchmark problem appearing also in [4, 6], the... |

165 |
An abstract view of programming languages
- Moggi
- 1990
(Show Context)
Citation Context ...ulating side effects as monads, a principle introduced by Moggi [9]. The Java exception mechanism has been modelled by the so-called Java monad [6], an instance of Moggi’s exception monad transformer =-=[8]-=-. In previous work [16, 14, 15], we have developed monadic computational logics for generic side effects, and we have extended these logics with a generic treatment of exceptional termination that sub... |

97 | How to declare an imperative
- Wadler
- 1997
(Show Context)
Citation Context ...the least fixed point of λγ. A + (U →? γ), where U is a set of input values; – non-deterministic stateful computations: T A = S → Pfin(A × S), where, again, S is a fixed set of states.sAs laid out in =-=[18]-=- and incorporated in the Haskell syntax, monads can be used to support an imperative style of notation: terms of the form do x ← p; q (where x may appear in q) are taken to abbreviate p >>= λx. q, and... |

56 | Java program verification via a Hoare logic with abrupt termination
- Huisman, Jacobs
- 2000
(Show Context)
Citation Context ...monadic computational logics for generic side effects, and we have extended these logics with a generic treatment of exceptional termination that subsumes existing Hoare logics for abrupt termination =-=[4, 5]-=-. A technical problem that appears in the monadic modeling of the Java exception mechanism is the fact that the return exception in Java is parametrized by the value to be returned, so that method cal... |

30 |
A poor man’s concurrency monad
- Claessen
- 1999
(Show Context)
Citation Context ...lude the modelling of the Java class mechanism in HasCasl and logical support for concurrency. There are indications that the latter may be integrated in a monadic framework by means of continuations =-=[1]-=-. This motivates the search for a program logic for the continuation monad, to which by the results of [16] the existing generic computational logics are not usefully applicable. Acknowledgements This... |

30 |
Heterogeneous specification and the heterogeneous tool set. Habilitation thesis
- Mossakowski
- 2005
(Show Context)
Citation Context ... in Fig. 1 is an actual recursive definition rather than just a semantic equation. Program blocks in HasCasl can be automatically translated into Haskell by means of the Bremen heterogeneous tool set =-=[10]-=-. As indicated above, HasCasl incorporates a higher order logic of partial functions. Below, we will freely combine the monadic do-notation and higher 3s4 order formulae, using e.g. monadic computatio... |

24 | HOLCF: higher order logic of computable functions
- Regensburger
- 1995
(Show Context)
Citation Context ...al functions, type class polymorphism in the style of Haskell, and general recursion over domains, specified in a bootstrap fashion as complete partial orders (cpo’s) in much the same way as in HOLCF =-=[12]-=-. In the following, we briefly explain some of the less obvious syntactical features of HasCasl appearing in Fig. 1 and elsewhere; for further details, the reader is referred to [13, 17]. As indicated... |

24 | HasCasl: Towards integrated specification and development of Haskell programs
- Schroder, Mossakowski
- 2002
(Show Context)
Citation Context ...e way as in HOLCF [12]. In the following, we briefly explain some of the less obvious syntactical features of HasCasl appearing in Fig. 1 and elsewhere; for further details, the reader is referred to =-=[13, 17]-=-. As indicated above, the treatment of recursion in HasCasl is via a type class Cpo of complete partial orders; type classes are just subsets of the syntactical universe of types. The types of total a... |

12 | Varieties of effects
- Führmann
- 2002
(Show Context)
Citation Context ... a monad admits dynamic logic. A basic concept underlying all these logics is the notion of deterministically side-effect free (dsef) program engendered by the underlying monad. In the terminology of =-=[2]-=-, p is dsef if p is central in the variety of discardable and copyable programs. Intuitively, discardability means that the state may be read, but not changed (this is in contrast to stateless program... |

8 | HasCasl – Integrated functional specification and programming. Language summary, available at http://www. informatik.uni-bremen.de/agbkb/forschung/formal_methods/CoFI/HasCASL
- Schröder, Mossakowski, et al.
(Show Context)
Citation Context ...e way as in HOLCF [12]. In the following, we briefly explain some of the less obvious syntactical features of HasCasl appearing in Fig. 1 and elsewhere; for further details, the reader is referred to =-=[13, 17]-=-. As indicated above, the treatment of recursion in HasCasl is via a type class Cpo of complete partial orders; type classes are just subsets of the syntactical universe of types. The types of total a... |

7 |
of computation and monads
- “Notions
- 1991
(Show Context)
Citation Context ...Java. Generally, imperative languages may be represented in standard higher order logic or in functional programming languages by encapsulating side effects as monads, a principle introduced by Moggi =-=[9]-=-. The Java exception mechanism has been modelled by the so-called Java monad [6], an instance of Moggi’s exception monad transformer [8]. In previous work [16, 14, 15], we have developed monadic compu... |

5 |
A logic for the Java Modeling Language
- Jacobs, Poll
- 2001
(Show Context)
Citation Context ...ms exploiting abnormal termination mechanisms, we will now prove the correctness of a pattern match algorithm. This algorithm has already been used as an example for the application of the calculi of =-=[4, 5]-=-; the main point to be made here is that a concrete algorithm of this kind can indeed be verified in our generic framework. The algorithm is implemented in an exception monad with dynamic references (... |

3 |
and Monads in the Semantics of Java, Theoret
- Coalgebras
(Show Context)
Citation Context ...r logic or in functional programming languages by encapsulating side effects as monads, a principle introduced by Moggi [9]. The Java exception mechanism has been modelled by the so-called Java monad =-=[6]-=-, an instance of Moggi’s exception monad transformer [8]. In previous work [16, 14, 15], we have developed monadic computational logics for generic side effects, and we have extended these logics with... |

1 |
Hoare logic in HasCasl, Fundamental
- Monad-independent
(Show Context)
Citation Context ...s monads, a principle introduced by Moggi [9]. The Java exception mechanism has been modelled by the so-called Java monad [6], an instance of Moggi’s exception monad transformer [8]. In previous work =-=[16, 14, 15]-=-, we have developed monadic computational logics for generic side effects, and we have extended these logics with a generic treatment of exceptional termination that subsumes existing Hoare logics for... |

1 |
Figure 6. the cathedrale scene
- unknown authors
- 2004
(Show Context)
Citation Context ...s monads, a principle introduced by Moggi [9]. The Java exception mechanism has been modelled by the so-called Java monad [6], an instance of Moggi’s exception monad transformer [8]. In previous work =-=[16, 14, 15]-=-, we have developed monadic computational logics for generic side effects, and we have extended these logics with a generic treatment of exceptional termination that subsumes existing Hoare logics for... |

1 |
dynamic logic in HasCasl
- Monad-independent
(Show Context)
Citation Context ...ately captured by the so-called Java monad. Generic program logics including partial and total Hoare logics can be formulated largely independently of the nature of specific side-effects, i.e. monads =-=[14, 16]-=-; specific Hoare logics for abnormal termination introduced as part of verification support frameworks for Java are also subsumed by generic logics [15]. Here, we have illustrated this principle by me... |