G.M. Megson
University of Newcastle upon Tyne. 1993
The C++ language has recently been extended to provide support for exception handling and parameterised types. Using these language features it is possible to implement reusable components that support the use of forward and backward error recovery techniques in fault-tolerant applications written in C++. This paper describes the implementation and use of such components and discusses ways in which inheritance can be used to provide a framework for software fault tolerance. We first demonstrate how inheritance can be combined with exception handling to implement a series of alternates linked together by forward error recovery and then show how this approach can be generalised to build a hierarchy of idealised fault-tolerant components. Finally, we show how a generic recovery block function may be used to implement backward error recovery and discuss ways of dealing with the problem of state restoration.