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

  • Name:

    Journal Article

  • Author:

    Lutz Prechelt
    Walter F. Tichy

  • Summary

    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, inter-module 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 of 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 Ph.D. students, writes two non-trivial 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).

    Bibtex

    @article{,
    author={Lutz Prechelt, Walter F. Tichy},
    title={A Controlled Experiment to Assess the Benefits of Procedure Argument Type Checking},
    year=1998,
    month=Apr,
    volume={24},
    url={http://ps.ipd.kit.edu/downloads/za_1998_controlled_experiment_assess_benefits_procedure_argument.pdf},
    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, inter-module 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 of 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 Ph.D. students, writes two non-trivial 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).},
    number={4},
    pages={302-312},
    journal={IEEE Transactions on Software Engineering},
    }
  • Year:

    1998

  • Links:
Associated Project
Title