Abstract

We propose a new algebraic framework for exception handling which is powerful enough to cope with many exception handling features such as recovery, implicit propagation of exceptions, etc. This formalism treats all the exceptional cases; on the contrary, we show that within all the already existing frameworks, the case of bounded data structures with certain recoveries of exceptional values remained unsolved. We justify the usefulness of “labelling” some terms in order to easily specify exceptions without inconsistency. Surprisingly, there are several cases where even if two terms have the same value, one of them is a suitable instance of a variable in a formula while the other one is not. The main idea underlying our new framework of label algebras is that the semantics of algebraic specifications can be deeply improved when the satisfaction relation is defined via assignments with range in terms instead of values. We give initiality results, which are useful for structured specifications, and a calculus for positive conditional label specifications, which is complete on ground formulas. Exception algebras and exception specifications are then defined as a direct application of label algebras. The usual inconsistency problems raised by exception handling are avoided by the possibility of labelling terms. We also sketch out how far the application domain of label algebras is more general than exception handling.

Full Text
Published version (Free)

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call