16 February 2000
Computer automation is present in almost every aspect of modern life. The heating system in your house is most likely microprocessor controlled. A computer controls the engine operations of your vehicle. Even the appliances in your kitchen contain some degree of embedded circuitry that control portions of their operation. All of these systems contain embedded software. At some time, one or more of these systems will encounter a software error, and may cease to work correctly. A failure of this kind is inconvenient, but not life threatening. Now consider the software that runs air traffic control towers, military weapon systems, or nuclear power plants. An error that causes one of these systems to shut down can cause immense human casualties. Software designers, and society in general, cannot afford to have critical automated systems entrusted to programs that cannot reasonably and safely handle an unexpected error.
Exception mechanisms allow the programmer to manage run-time errors in an orderly fashion. Through exception handling, a function can automatically invoke an error-handling routine to systematically deal with errors that might otherwise crash the entire program. The principle enhancement afforded by exception handling mechanisms is that they eliminate and automate most of the error-handling code that has traditionally been hard coded in-line throughout programs. Some languages handle exceptions by returning a specific value from the function in which the error occurred. This method promotes hard to read, inefficient code. Other languages incorporate methods that pass errors to exception handling routines. This method can become inefficient, and some errors are not caught by the exception routines.
Java has recently become a hot item in the programming language community. Many people are heralding Java as "the language" of the Internet-based world,
and predicting it to be the future of programming. To solve the exception handling problem Java incorporates a system of "try" and "catch" blocks similar
to the scheme implemented by C++. This method of exception handling is inefficient and error-prone. Through the study of exception handling mechanisms
implemented by other languages, we will make improvements to the Java language that will provide robust, disciplined exception handling worthy of the future
of programming.
The importance of exception handling is well-recognized by system designers and software engineers. Exception handing is very often the most important part of the system because it deals with abnormal situations. The incomplete or incorrect handling
of these abnormal situations is often responsible for catastrophic failures. An example is the failure of the maiden flight of the Ariane5 launcher which exploded 40 seconds into its flight sequence. The cause of this failure was traced to faulty exception handling mechanisms [1]. Published analyses of the cause of software defects frequently single out exception handling as a significant problem. For example, an analysis of software defects in Hewlett Packard’s Scientific Instruments division identified "error checking"
as the third most frequent cause of defects [2]. Despite this few software analysis and design methods explicitly address error-handling. One of the goals of this project is to identify the strengths and weaknesses of some typical exception handling mechanisms.
The first papers entirely devoted to exception handling began to appear only in the 70s [3, 4]. Goodenough introduced the idea of exceptions and exception handling in [3]. His landmark paper points out that exceptions are not necessarily errors; this implies that support for user-defined
exception abstractions can expand the generality of an exception handling mechanism. This project shall explore the evolution of exception handling by studying the mechanisms available in C++, Java, CLU, Ada and PL/I .
Related Work
Schedule Plan
Milestones
| Wednesday, 16 February | Proposal |
| Monday, 28 February | Report on Preliminary Investigation |
| Wednesday, 8 March | Individual Reports |
| Thursday, 23 March | Preliminary Report |
| Friday ,28 April | Final Report |
| Monday, 1 May | Project Presentations in the Rotunda, West Oval Room |
| Anirban DE | JAVA |
| Jeffrey HARRY | PL/I |
| Peixian LI | ADA |
| Pinchao LU | CLU |
| Yves LEPOUCHARD | C++ |
References
|
University of Virginia CS 655: Programming Languages |
cs655-staff@cs.virginia.edu |