Exposing Uninitialized Variables: Strengthening and Extending Run-Time Checks in Ada

Since its inception, a main objective of the Ada language has been to assist in the development of large and robust applications. In addition to that, the language also provides support for building safety-critical applications, e.g. by facilitating validation and verification of such programs. The latest revision of the language has brought some additional improvements in the safety area, such as the Normalize_Scalars pragma, which ensures an automatic initialization of the nonexplicitly initialized scalars. This paper presents Initialize Scalars, an enrichment of the Normalize_Scalars concept, and an extended mode to verify at run-time the validity of scalars, both designed for easy use in existing large applications. Their implementation in GNAT Pro (the GNU Ada 95 compiler) is discussed. The practical results obtained on a large Air Traffic Flow Management application are presented.