Physical separation of features
Jacob Krüger, Kai Ludwig, Bernhard Zimmermann, Thomas Leich · 2018
Several implementation techniques for software product lines have emerged over time. A common distinction of these techniques is whether features are annotated in the code base (virtually separated) or composed from modules (physically separated). While each approach promises different pros and cons, mainly annotations and especially the C PreProcessor (CPP) are established in practice. Thus, the question arises, which barriers prevent the adoption of composition-based approaches. In this paper, we report an empirical study among C and C++ developers in which we investigate this issue. Therefore, we ask our participants to describe how they use the CPP and how they assess the idea of moving annotated code into modules. More precisely, we use small examples based on our Feature Compositional PreProcessor (FeatureCoPP) that enables this separation while keeping annotations---avoiding divergences from the preprocessor concept. Overall, we identify different characteristics that indicate when physical separation can be useful. While most responses are skeptical towards the approach, they also emphasize its usability for source code analysis and for implementing specific use cases.