loading...
 This Article 
   
 Share 
   
 Bibliographic References 
   
 Add to: 
 
Digg
Furl
Spurl
Blink
Simpy
Google
Del.icio.us
Y!MyWeb
 
 Search 
   
Second IEEE International Workshop on Source Code Analysis and Manipulation (SCAM'02)
Handling Preprocessor-Conditioned Declarations
Montreal, Canada
October 01-October 01
ISBN: 0-7695-1793-5
Lerina Aversano, University of Sannio
Massimiliano Di Penta, University of Sannio
Ira. D. Baxter, Semantic Designs Inc.

Many software systems are developed with configurable functionality, and for multiple hardware platforms and operating systems. This can lead to thousands of possible configurations, requiring each configuration-dependent programming entity or variable to have different types. Such configuration-dependent variables are often declared inside preprocessor conditionals (e.g., C language).

Preprocessor-conditioned declarations may be a source of problems. Commonly used configurations are type-checked by repeated compilation. Rarely used configurations are unlikely to be recently type checked, and in such configurations a variable may have a type not compatible to its use or it may contains uses of variables never defined.

This paper proposes an approach to identify all possible types each variable declared in a software system can assume, and under which conditions. Inconsistent variable usages can then be detected for all possible configurations. Impacts of preprocessor-conditioned declaration in 17 different open source software systems are also reported.

Index Terms:
Preprocessor code analysis, type-checking, symbol table, multi-platform software
Citation:
Lerina Aversano, Massimiliano Di Penta, Ira. D. Baxter, "Handling Preprocessor-Conditioned Declarations," scam, pp.83, Second IEEE International Workshop on Source Code Analysis and Manipulation (SCAM'02), 2002
Usage of this product signifies your acceptance of the Terms of Use.