The dramatic increase in the use of software in safety critical applications such as flying airplanes, driving cars, and operating nuclear power plants, has increased the need for creating high-integrity software. This paper discusses the use of the C++ language in creating such software. It first considers C++ language features from the perspective of guidelines for use in constructing safety-critical systems. Adhering to these guidelines can lead to safer, more maintainable, C++ programs. This is true even for non-safety critical software.
The paper also considers a collection of techniques that can be incorporated into the development of C++ programs. These classes are meant as examples to illustrate some of the pitfalls of using C++ for high-integrity software. They are also intended to illustrate how some of the features of C++ can be used to produce high-integrity software. Even if a class such as SafeInt is not used in the production version of software (e.g., for performance reasons), its use during development restricts the use of integers. This has the effect of making the resulting code more predictable and safer.