An Algorithm for Quantifying the Program Variability Induced by Conditional Compilation
Julio Sincero, Reinhard Tartler, Daniel Lohmann · 2010
The C Preprocessor (CPP) provides the programmer with powerful means to implement variability. Therefore the tool CPP is an important standard asset in the development toolchain for classical system software written in C. Yet, nobody has seriously quantified the effects of implementing variability with conditional compilation. In this report we describe conditional compilation in a semi-formal way. On this basis, we present an algorithm that is able to calculate the resulting variability. With this, we believe that further analysis on variability caused by preprocessor based configuration can be supported. This is useful to detect bugs caused by inconsistencies between variability models in the actual implementation and to support exploration of actually implemented variability in source artifacts.