Title :
A framework for dynamic checks of C arrays via a C++ class
Author :
Macphee, Katriona E. ; Dix, Trevor I.
Author_Institution :
Sch. of Comput. Sci. & Software Eng., Monash Univ., Clayton, Vic., Australia
Abstract :
The ability to define overloaded operators and generic templated classes in C++ provides a mechanism for the definition of array classes. We present an array class hierarchy that can be substituted for built-in arrays in a given C program, with minimal changes to the actual code and no change in the run-time semantics of the program. This augments our previous work (1997) that developed a class hierarchy for C pointers. The array class hierarchy provides a framework for customising the semantics of array operations and enables, for example, full bounds checking to be performed. By translating the original source code declarations to use the array class, so-called safe arrays can be provided
Keywords :
C language; C listings; C++ language; abstract data types; arrays; data integrity; C arrays; C++ class; array class definition; array class hierarchy; array operation semantics customization; bounds checking; dynamic checking; generic templated classes; minimal code changes; overloaded operators; run-time semantics; safe arrays; source code declarations; Computer science; Indexing; Laboratories; Law; Legal factors; Particle measurements; Program processors; Programming profession; Runtime; Software engineering;
Conference_Titel :
Software Engineering Conference, 1998. Proceedings. 1998 Australian
Conference_Location :
Adelaide, SA
Print_ISBN :
0-8186-9187-5
DOI :
10.1109/ASWEC.1998.730913