FeatureCoPP
Kai Ludwig, Jacob Krüger, Thomas Leich · 2020
Annotation-based and composition-based variability mechanisms have complementary strengths regarding software maintenance and evolution. Consequently, several proposals have been made to combine, integrate, and substitute both mechanisms. An open challenge is to provide a unified, automatic, and practical technique to adopt such proposals. In this paper, we present a technique to convert variable feature code that is enclosed in the C preprocessor's conditional compilation into compositional feature modules and vice versa. We facilitate the usability of our technique by keeping the annotation-based representation of the C preprocessor. Besides contributing a practicable implementation, we describe the core principles of our technique and demonstrate its functionality based on previous empirical studies and by analyzing the Linux kernel. While our technique is fast in transforming projects, we also illustrate the challenges of maintaining fine-grained feature modules.