Title :
A controlled experiment to assess the benefits of procedure argument type checking
Author :
Prechelt, Lutz ; Tichy, Walter F.
Author_Institution :
Fakultat fur Inf., Karlsruhe Univ., Germany
fDate :
4/1/1998 12:00:00 AM
Abstract :
Type checking is considered an important mechanism for detecting programming errors, especially interface errors. This report describes an experiment to assess the defect-detection capabilities of static, intermodule type checking. The experiment uses ANSI C and Kernighan & Ritchie (K&R) C. The relevant difference is that the ANSI C compiler checks module interfaces (i.e., the parameter lists calls to external functions), whereas K&R C does not. The experiment employs a counterbalanced design in which each of the 40 subjects, most of them CS PhD students, writes two nontrivial programs that interface with a complex library (Motif). Each subject writes one program in ANSI C and one in K&R C. The input to each compiler run is saved and manually analyzed for defects. Results indicate that delivered ANSI C programs contain significantly fewer interface defects than delivered K&R C programs. Furthermore, after subjects have gained some familiarity with the interface they are using, ANSI C programmers remove defects faster and are more productive (measured in both delivery time and functionality implemented)
Keywords :
C language; program debugging; ANSI C; K&R C; defect-detection; intermodule type checking; programming errors; type checking; Computer Society; Computer errors; Computer languages; Gain measurement; Helium; Libraries; Productivity; Program processors; Programming profession; Time measurement;
Journal_Title :
Software Engineering, IEEE Transactions on