Exception Handling Using Class Diversity
MetadataShow full item record
Software reliability has been received more and more attention not only in mission critical system but also in commercial software system. Developing robust software must consider faults caused by abnormal situations or exceptions. Although modern programming languages like Java and C++ provide sophisticated exception handling mechanisms for detecting and handling exceptions, many potential runtime exceptions are not caught and handled because runtime exceptions could occur anywhere and could be numerous in a typical program. If an uncaught runtime exception occurs during program execution, then the execution will terminate abnormally, resulting in a system crash. The thesis proposes a framework that uses multiversion design and implementation of critical classes to provide automatic recovery from uncaught runtime exceptions. The framework can be generated almost automatically for any given class. Using this framework, only one of the multiversion implementations is running at any given time. If an uncaught runtime exception occurs, the running version is replaced by another version and the system will continue to operate. We introduce the concept of an abstract state and the mapping functions implemented and used by the multiversion implementations to map their concrete states to and from the abstract state to synchronize their states during recovery. Three case studies are carried out to demonstrate the efficiency of using the framework. Empirical results show that system crash rate is greatly reduced with acceptable performance overhead by using the framework.