Premium
Extensions to the C programming language for enhanced fault detection
Author(s) -
Plater David W.,
Yesha Yelena,
Park E. K.
Publication year - 1993
Publication title -
software: practice and experience
Language(s) - English
Resource type - Journals
SCImago Journal Rank - 0.437
H-Index - 70
eISSN - 1097-024X
pISSN - 0038-0644
DOI - 10.1002/spe.4380230604
Subject(s) - computer science , programming language , programmer , correctness , macro , debugging , compiler
The acceptance of the C programming language by academia and industry is partially responsible for the ‘software crisis’. The simple, trusting semantics of C mask many common faults, such as range violations, which would be detected and reported at run‐time by programs coded in a robust language such as Ada. Ada is a registered trademark of the U.S. Government (Ada Joint Program Office) This needlessly complicates the debugging of C programs. Although the assert macro lets programmers add run‐time consistency checks to their programs, the number of instantiations of this macro needed to make a C program robust makes it highly unlikely that any programmer could correctly perform the task. We make some unobtrusive extensions to the C language which support the efficient detection of faults at run‐time without reducing the readability of the source code. Examples of the extensions are automatic checking of error codes returned by library routines, constrained subtypes and detection of references to uninitialized and/or non‐existent array elements.