A Controlled Experiment to Assess the Benefits of Procedure Argument Type Checking

  • Authors:
  • Lutz Prechelt;Walter F. Tichy

  • Affiliations:
  • Univ. Karlsruhe, Karlsruhe, Germany;Univ. Karlsruhe, Karlsruhe, Germany

  • Venue:
  • IEEE Transactions on Software Engineering
  • Year:
  • 1998

Quantified Score

Hi-index 0.00

Visualization

Abstract

Type checking is considered an important mechanism for detectingprogramming errors, especially interface errors. This reportdescribes an experiment to assess the defect-detection capabilitiesof static, intermodule type checking. The experiment uses ANSI Cand Kernighan&Ritchie (K&R) C. The relevant difference isthat the ANSI C compiler checks module interfaces (i.e., theparameter lists calls to external functions), whereas K&R Cdoes not. The experiment employs a counterbalanced design in whicheach of the 40 subjects, most of them CS PhD students, writes twonontrivial programs that interface with a complex library (Motif).Each subject writes one program in ANSI C and one in K&R C. Theinput to each compiler run is saved and manually analyzed fordefects. Results indicate that delivered ANSI C programs containsignificantly fewer interface defects than delivered K&R Cprograms. Furthermore, after subjects have gained some familiaritywith the interface they are using, ANSI C programmers removedefects faster and are more productive (measured in both deliverytime and functionality implemented).