Abstract

We propose a new algebraic framework for exception handling which is powerful enough to cope with many exception handling features such that recovery, implicit propagation of exceptions, etc. This formalism is capable of treating all the exceptional cases, including the following ones: “intrinsic” exceptions which are related to the underlying data structure (for instance, popping an emptstack or applying predecessor on zero for natural numbers), exceptions which are relied on “dynamic” properties (as an acces to a non-initialized array cell) or else exceptions which are due to certain limitations (mainly bounded data structures). We show that within the already existing frameworks, the case of bounded data structures with certain recoveries of exceptional values remains unsolved.First, we justify the usefulness of “labelling” some terms in order to easily specify exceptions without inconsistency, and we then define a general framework of label algebras which allows us to “type” terms instead of values. Exception algebras and exception specifications are defined as a direct application of label algebras. Indeed, the usual inconsistency problems raised by exception handling are avoided by the possibility of labelling terms.As a conclusion, we also sketch out how far the application domain of label algebras seems to be much more general than exception handling.Key-wordsAlgebraic specifications of abstract data typesError and exception handlingException recoveryBounded data structuresStructured specifications

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