University of Virginia, Department of Computer Science
CS655: Programming Languages
Spring 2000

16 February 2000

Proposal



Description of the problem
Related Work
Schedule Plan
Responsibilities
Evaluation


Description of the problem

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.



Related Work

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 .



Schedule Plan


Milestones


Wednesday, 16 FebruaryProposal
Monday, 28 FebruaryReport on Preliminary Investigation
Wednesday, 8 MarchIndividual Reports
Thursday, 23 March Preliminary Report
Friday ,28 AprilFinal Report
Monday, 1 MayProject Presentations in the Rotunda, West Oval Room


Phases (after Proposal)


Phase A: Studies of exception mechanisms in C++, Java, CLU, Ada and PL/I
Description: Each member of the project studies the exception mechanisms of one particular language and write a report about it
Delivery: Individual Reports about the exception mechanisms of C++; Java, CLU, Ada & PL/I
Time limit: 3 weeks
starts Thursday, 17 February
ends Wednesday, 8 March

Phase B: Comparison of the exception mechanisms of the five programming languages
Description: All the members of the project meet to product a report synthesizing the five individual reports
Delivery: One report about the exception mechanisms of C++, Java, CLU, Ada and PL/I and with a comparative section. This report could constitute the Preliminary Report
Time limit: 1 week
starts Thursday, 9 March
Spring recess from 11 March to 19 March
ends Thursday, 23 March

Phase C: Improvement of Java exception mechanisms
Description: Brain stormings about the exception mechanisms of Java, their flaws and suggestions for improvement. Then the possibility of an implementation will be discussed. Finally possible implementation.
Delivery: One report about solutions to improve the exception mechanisms of Java and, possibly, code and demo of the implementation of one or several of these solutions
Time limit: 3 weeks
starts Friday, 24 March
ends Thursday, 13 April

Phase D: Preparation of the final report and the project presentation
Description: Writing of a Final Report consolidating all the previous reports and preparation of a presentation with a slide show
Delivery: Final Report, presentation and slide show
Time limit: 2 weeks
starts Friday, 14 April
ends Monday, 1 May


Responsibilities


During phase A of the project, each member is going to study a particular programming language and make a report about its exception mechanisms. Here are the programming languages assigned to project members:

Anirban DEJAVA
Jeffrey HARRYPL/I
Peixian LIADA
Pinchao LUCLU
Yves LEPOUCHARDC++


Evaluation

If we can successfully implement our exception mechanism (or mechanisms), the implementation itself will be a big success. Then we will write some example Java programs using our new exception mechanism (or mechanisms). Subsequenly we will write the same programs using the standard Java exception mechanism. We will compare the two in terms of performance, readability and, the most important, reliability. After the comparison, we will be able to draw some conclusion whether our implementation is better than the standard Java exception handling mechanism. If we are lucky enough to be able to improve the Java exception mechanism, it will be a great success. If not, it will also be a good effort.

 

References

  1. "Ariane 5- Flight 501 Failure", Report by the Inquiry Board, 19 July 1996.
  2. "Error Handling: When Bad Things Happen to Good Infrastructures", Charles Howell, Position Paper for Information Survivability Workshop, 1998.
  3. "Exception Handling: Issues and a Proposed Notation", John Goodenough, Second ACM Symposium on Principles of Programming Languages, 1975.
  4. " A Program structure for Error Detection and Recovery", J. Horner, H. Lauer Et. Al, Lecture Notes in Computer Science, Springer-Verlag, 1974.

 


CS 655 University of Virginia
CS 655: Programming Languages
cs655-staff@cs.virginia.edu