AbstractThe 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.
Read full abstract