A change-aware per-file analysis to compile configurable systems with #ifdefs. (December 2018) - Braz, Larissa; Gheyi, Rohit; Mongiovi, Melina; Ribeiro, Márcio; Medeiros, Flávio; Teixeira, Leopoldo; Souto, Sabrina
Highlights: We propose CheckConfigMX, a change-aware tool to compile configurable systems. We evaluate 7, 891 transformations applied to 32 files of 9 configurable systems. CheckConfigMX finds 1, 699 compilation errors of 34 kinds. We apply 8 mutation operators and generate 11, 229 mutants. We kill all of them. Abstract: Configurable systems typically use#ifdefs to denote variability. Generating and compiling all configurations may be time-consuming. An alternative consists of using variability-aware parsers, such as TypeChef. In practice, compiling complete systems may be costly. Therefore, developers use sampling strategies to compile only a subset of the configurations. In our previous work, we propose a change-aware per-file analysis to compile configurable systems with#ifdefs by analyzing only configurations impacted by a code change (transformation). We implement it in a tool calledCheckConfigMX, which reports the new compilation errors introduced by the transformation. We extend our previous work by performing an empirical study to evaluate 7, 891 transformations applied to 32 files of configurable systems such as Linux and OpenSSL.CheckConfigMX finds 1, 699 compilation errors of 34 types introduced by 155 distinct developers in 756 commits (9.19% of the analyzed transformations). In our study, the tool reduces by at least 50% (an average of 99%) the effort of evaluating the analyzed transformations compared to the exhaustive approach and without considering a feature model. In addition, we also evaluate the effectiveness ofCheckConfigMX by using mutation testing. We generate 11, 229 mutants by applying eight mutant operators to some evaluated files.CheckConfigMX kills all mutants. Therefore, it may help developers to reduce compilation effort to evaluate fine-grained transformations applied to configurable systems with#ifdefs .