|Lea Kristin Gerling and Klaus Schmid
|Syntax-Preserving Slicing of C-BasedSoftware Product Lines: An Experience Report
|Beitrag zu einer Tagung / Konferenz
|Proceedings of the 14th International Working Conference on Variability Modelling of Software-Intensive Systems (VaMoS '20)
Program slicing is an important technique for various follow-up activities like program understanding or feature identification. So far only little work exists on program slicing of product lines. A key challenge in this context is to identify a slice including the implementation as well as the (relevant) variability information. It is our goal to create a program slicing approach to identify semantically related lines of code in a C-based software product line, using the C-Preprocessor as the basis for variability implementation. However, at the time of our research no existing approach was able to produce a program slice that fully preserves the structure of the preprocessor code. Thus, the variability structure in the slice was no longer intact. This is problematic as the desired slice should be a real subset of the product line implementation without modification of the syntax. Thus, we had to create a new syntax-preserving variability-aware slicing technique. In this paper, we report our experiences with the conception and implementation of this technique. We highlight the key challenges and our proposed solutions to foster discussions and future research about the handling of variability in static analysis.