Computing Reviews
Today's Issue Hot Topics Search Browse Recommended My Account Log In
Review Help
Search
TypeChef: toward type checking #ifdef variability in C
Kenner A., Kästner C., Haase S., Leich T.  FOSD 2010 (Proceedings of the 2nd International Workshop on Feature-Oriented Software Development, Eindhoven, the Netherlands, Oct 10, 2010)25-32.2010.Type:Proceedings
Date Reviewed: May 19 2011

The technique of generating a number of versions of a program from a single body of text goes back at least to the 1960s, when macro assembly languages were used to configure operating systems for differing mixes of hardware. Testing such programs has always been a problem, because of the combinatorial explosion of possible versions. This paper applies recent results in whole-text testing to situations in which the C preprocessor (cpp) is used for version generation.

After giving an overview of the problem and available approaches to mitigation, the authors discuss the particular difficulties that arise from cpp as a version generator: file inclusion, lexical macro substitution, and the ability to ignore syntactic structure. They describe a few straightforward restrictions on cpp usage; present TypeChef, a tool based on these; and apply TypeChef to an open-source program from which cpp can generate about 1,000 different versions.

Although TypeChef isn’t capable of handling arbitrary C programs, the limitations are consistent with good coding practices and present no difficulty for newly developed code. Timing tests indicate that, if more than 20 versions can be generated from a body of text, using TypeChef is quicker than generating and testing those versions individually.

I found the paper to be interesting and informative, both in its explanation of the general techniques and its exploration of the details. It should be accessible to anyone who is familiar with C and cpp.

Reviewer:  W. M. Waite Review #: CR139072 (1112-1300)
Bookmark and Share
 
Language Constructs and Features (D.3.3 )
 
 
Preprocessors (D.3.4 ... )
 
 
Reusable Software (D.2.13 )
 
Would you recommend this review?
yes
no
Other reviews under "Language Constructs and Features": Date
A stub generator for multilanguage RPC in heterogeneous environments
Gibbons P. IEEE Transactions on Software Engineering 13(1): 77-87, 1987. Type: Article
Aug 1 1987
Essentials of programming languages
Friedman D. (ed), Haynes C., Wand M., MIT Press, Cambridge, MA, 1992. Type: Book (9780262061452)
Feb 1 1994
Symbolic computing with Lisp
Cameron R., Dixon A., Prentice-Hall, Inc., Upper Saddle River, NJ, 1992. Type: Book (9780138778460)
Apr 1 1994
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