Abstract | ||
---|---|---|
The C preprocessor is commonly used to implement variability. Given a feature selection, code fragments can be excluded from compilation with #ifdef and similar directives. However, the token-based nature of the C preprocessor makes variability implementation difficult and error-prone. Additionally, variability mechanisms are intertwined with macro definitions, macro expansion, and file inclusion. To determine whether a code fragment is compiled, the entire file must be preprocessed. We present a partial preprocessor that preprocesses file inclusion and macro expansion, but retains variability information for further analysis. We describe the mechanisms of the partial preprocessor, provide a full implementation, and present some initial experimental results. The partial preprocessor is part of a larger endeavor in the TypeChef project to check variability implementations (syntactic correctness, type correctness) in C projects such as the Linux kernel. |
Year | DOI | Venue |
---|---|---|
2011 | 10.1145/1944892.1944908 | VaMoS |
Keywords | Field | DocType |
partial preprocessing c code,variability implementation,c preprocessor,macro definition,entire file,code fragment,macro expansion,variability information,variability mechanism,partial preprocessor,variability analysis,c project,feature selection,decision models | Data mining,Programming language,Feature selection,Computer science,Correctness,Preprocessor,Macro,Softcoding,Code (cryptography),Security token,Linux kernel | Conference |
Citations | PageRank | References |
11 | 0.64 | 38 |
Authors | ||
3 |
Name | Order | Citations | PageRank |
---|---|---|---|
Christian Kästner | 1 | 3591 | 135.92 |
Paolo G. Giarrusso | 2 | 271 | 9.97 |
Klaus Ostermann | 3 | 457 | 23.97 |