Computing Reviews
Today's Issue Hot Topics Search Browse Recommended My Account Log In
Review Help
Search
Investigating preprocessor-based syntax errors
Medeiros F., Ribeiro M., Gheyi R.  GPCE 2013 (Proceedings of the 12th International Conference on Generative Programming: Concepts & Experiences, Indianapolis, IN, Oct 27-28, 2013)75-84.2013.Type:Proceedings
Date Reviewed: Dec 30 2013

The C preprocessor is often used to configure a program for different environments. A combination of flags denotes a particular environment, controlling conditionals and macros to generate an appropriate version of the program. Generally, only a few of the many possible versions are actually used in practice, and those are the ones that developers generate and test. Untested combinations of flags may result in syntactically incorrect programs. The authors of this paper use a parser that checks all possible versions of the source code to evaluate the extent of preprocessor-based syntax errors in real systems.

The experiment was extensive, using 41 systems ranging in size from 2,000 to 1.5 million lines of code as experimental subjects. These subject programs had been placed under version control by their authors, so the experimenters were able to look at the commit in which a preprocessor-based syntax error was introduced and the commit in which it was corrected. The paper poses and answers seven interesting questions, such as, “How do developers introduce preprocessor-based syntax errors?” and “What types of preprocessor-based syntax errors do we find in practice?”

I found both the methodology and the results interesting. The authors’ use of version control history to explore the genesis and persistence of these errors is compelling, and the low number of actual errors found indicates that we do a pretty good job of avoiding them. The paper is easy to read, and there are appropriate references to the tools used and to the topic in general.

Reviewer:  W. M. Waite Review #: CR141842 (1403-0217)
Bookmark and Share
 
Preprocessors (D.3.4 ... )
 
 
Parsing (D.3.4 ... )
 
Would you recommend this review?
yes
no
Other reviews under "Preprocessors": Date
Fatal error in pass zero: how not to confuse novices
du Boulay B., Matthew I.  Readings on cognitive ergonomics - mind and computers (, Gmunden, Austria,1411984. Type: Proceedings
Sep 1 1985
Papering over deficiencies in your language for convenience and portability: preprocessors vs. standards
Feldman S.  Tools, methods and languages for scientific and engineering computation (, Paris, France,2741984. Type: Proceedings
Jan 1 1986
VAX FORTRAN to FORTRAN 77 translator
Hessel R., Chico S. Advances in Engineering Software 7(3): 142-156, 1985. Type: Article
Jun 1 1987
more...

E-Mail This Printer-Friendly
Send Your Comments
Contact Us
Reproduction in whole or in part without permission is prohibited.   Copyright 1999-2024 ThinkLoud®
Terms of Use
| Privacy Policy