Stayin' alert:: moulding failure and exceptions to your needs

Dealing with failure and exceptional situations is an important but tricky part of programming, especially when reusing existing components. Traditionally, it has been up to the designer of a library to decide whether to use a language's exception mechanism, return values, or other ways to indicate exceptional circumstances. The library user has been bound by this choice, even though it may be inconvenient for a particular use. Furthermore, normal program code is often cluttered with code dealing with exceptional circumstances.This paper introduces an alert concept which gives a uniform interface to all failure mechanisms. It separates the handling of an exceptional situation from reporting it, and allows for retro-fitting this for existing libraries. For instance, we may easily declare the error codes of the POSIX C library for file handling, and then use the library functions as if C had been extended with an exception mechanism for these functions -- a moulding of failure handling to the user's needs, independently of the library designer's choices.

[1]  I. D. Hill Faults in Functions, in ALGOL and FORTRAN , 1971, Comput. J..

[2]  John Barnes,et al.  High Integrity Ada: The Spark Approach , 1997 .

[3]  Eelco Visser,et al.  Stratego/XT 0.16: components for transformation systems , 2006, PEPM '06.

[4]  Fred L. Drake,et al.  The Python Language Reference Manual , 1999 .

[5]  Robin Milner,et al.  Definition of standard ML , 1990 .

[6]  Anh-Hoang Truong,et al.  Guaranteeing Resource Bounds for Component Software , 2005, FMOODS.

[7]  Eelco Visser,et al.  Syntax definition for language prototyping , 1997 .

[8]  David C. Luckham,et al.  Ada exception handling: an axiomatic approach , 1980, TOPL.

[9]  Hanspeter Mössenböck,et al.  Zero-Overhead Exeption Handling Using Metaprogramming , 1997, SOFSEM.

[10]  Eelco Visser,et al.  Components for Transformation Systems , 2005 .

[11]  簡聰富,et al.  物件導向軟體之架構(Object-Oriented Software Construction)探討 , 1989 .

[12]  Kent M. Pitman Condition Handling in the Lisp Language Family , 2000, Advances in Exception Handling Techniques.

[13]  Brian Randell,et al.  System structure for software fault tolerance , 1975, IEEE Transactions on Software Engineering.

[14]  Bjarne Stroustrup,et al.  C++ Programming Language , 1986, IEEE Softw..

[15]  John B. Goodenough,et al.  Exception handling: issues and a proposed notation , 1975, CACM.

[16]  M. Donald MacLaren,et al.  Exception handling in PL/I , 1977, Language Design for Reliable Software.

[17]  Barbara Liskov,et al.  A history of CLU , 1993, HOPL-II.

[18]  Guy L. Steele,et al.  The Java Language Specification , 1996 .

[19]  William G. Griswold,et al.  An Overview of AspectJ , 2001, ECOOP.

[20]  Akim Demaille,et al.  C-Transformers: a framework to write C program transformations , 2006, CROS.

[21]  Alan Burns,et al.  Worst-case timing analysis of exception handling in Ada , 1993 .

[22]  Bertrand Meyer,et al.  Object-oriented software construction (2nd ed.) , 1997 .

[23]  Christophe Dony,et al.  Exception handling and object-oriented programming: towards a synthesis , 1990, OOPSLA/ECOOP '90.

[24]  Qian Cui,et al.  Data-Oriented Exception Handling , 1992, IEEE Trans. Software Eng..

[25]  Alexander Romanovsky,et al.  Except for exception handling … , 2001, ALET.

[26]  Craig Schaffert,et al.  Abstraction mechanisms in CLU , 1977, Commun. ACM.

[27]  Philip Wadler,et al.  Monads for functional programming , 1995, NATO ASI PDC.

[28]  Alexander Borgida,et al.  Language features for flexible handling of exceptions in information systems , 1985, TODS.

[29]  John A. N. Lee,et al.  The second ACM SIGPLAN conference on History of programming languages , 1993 .

[30]  S. Tucker Taft,et al.  Consolidated Ada Reference Manual Language and Standard Libraries , 2002, Lecture Notes in Computer Science.

[31]  Wolfgang Schröder-Preikschat,et al.  AspectC++: an aspect-oriented extension to the C++ programming language , 2002 .

[32]  Cristina V. Lopes,et al.  A study on exception detection and handling using aspect-oriented programming , 2000, Proceedings of the 2000 International Conference on Software Engineering. ICSE 2000 the New Millennium.

[33]  B. A. Wichmann High Integrity Ada , 1997, SAFECOMP.

[34]  Bertrand Meyer,et al.  Eiffel: The Language , 1991 .