Syntax-preserving slicing of C-based software product lines: an experience report

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.

[1]  Sven Apel,et al.  Scalable analysis of variable software , 2013, ESEC/FSE 2013.

[2]  Claus Brabrand,et al.  Intraprocedural dataflow analysis for software product lines , 2012, AOSD.

[3]  James Miller,et al.  Inferring Extended Probabilistic Finite-State Automaton Models from Software Executions , 2018, ACM Trans. Softw. Eng. Methodol..

[4]  Mark Harman,et al.  A survey of empirical results on program slicing , 2004, Adv. Comput..

[5]  Sven Apel,et al.  Variability-Aware Static Analysis at Scale , 2018, ACM Trans. Softw. Eng. Methodol..

[6]  Uwe Ryssel,et al.  Reverse engineering challenges of the feedback scenario in co-evolving product lines , 2017, SPLC.

[7]  Thomas W. Reps,et al.  Program Specialization via Program Slicing , 1996, Dagstuhl Seminar on Partial Evaluation.

[8]  ApelSven,et al.  A Classification and Survey of Analysis Strategies for Software Product Lines , 2014 .

[9]  Gunter Saake,et al.  A Classification and Survey of Analysis Strategies for Software Product Lines , 2014, ACM Comput. Surv..

[10]  Baowen Xu,et al.  A brief survey of program slicing , 2005, SOEN.

[11]  J. Rubin,et al.  Semantic Slicing of Software Version Histories , 2018, IEEE Transactions on Software Engineering.

[12]  Andrzej Wasowski,et al.  Identifying Features in Forks , 2018, 2018 IEEE/ACM 40th International Conference on Software Engineering (ICSE).

[13]  Lea Kristin Gerling Automated Migration Support for Software Product Line Co-evolution , 2018, 2018 IEEE/ACM 40th International Conference on Software Engineering: Companion (ICSE-Companion).

[14]  Thomas Leich,et al.  TypeChef: toward type checking #ifdef variability in C , 2010, FOSD '10.

[15]  Mark Harman,et al.  Automated software transplantation , 2015, ISSTA.

[16]  David W. Binkley,et al.  Program slicing , 2008, 2008 Frontiers of Software Maintenance.

[17]  Márcio Ribeiro,et al.  Feature maintenance with emergent interfaces , 2014, ICSE.

[18]  Mira Mezini,et al.  SPLLIFT: statically analyzing software product lines in minutes instead of years , 2013, Software Engineering.

[19]  Andrzej Wasowski,et al.  Forked and integrated variants in an open-source firmware project , 2015, 2015 IEEE International Conference on Software Maintenance and Evolution (ICSME).

[20]  Andreas Grimmer,et al.  Change impact analysis for maintenance and evolution of variable software systems , 2019, Automated Software Engineering.

[21]  Klaus Schmid,et al.  Variability-Aware Semantic Slicing Using Code Property Graphs , 2019, SPLC.

[22]  Rainer Koschke,et al.  From preprocessor-constrained parse graphs to preprocessor-constrained control flow , 2015, 2015 IEEE 15th International Working Conference on Source Code Analysis and Manipulation (SCAM).

[23]  Konrad Rieck,et al.  Modeling and Discovering Vulnerabilities with Code Property Graphs , 2014, 2014 IEEE Symposium on Security and Privacy.

[24]  Uwe Ryssel,et al.  Aligning Coevolving Artifacts Between Software Product Lines and Products , 2016, VaMoS.

[25]  Thomas W. Reps,et al.  Precise interprocedural dataflow analysis via graph reachability , 1995, POPL '95.

[26]  Josep Silva,et al.  A vocabulary of program slicing-based techniques , 2012, CSUR.

[27]  Thomas W. Reps,et al.  Integrating noninterfering versions of programs , 1989, TOPL.

[28]  Sebastian Erdweg,et al.  Variability-aware parsing in the presence of lexical macros and conditional compilation , 2011, OOPSLA '11.

[29]  Sandro Schulze,et al.  Program Slicing in the Presence of Preprocessor Variability , 2014, 2014 IEEE International Conference on Software Maintenance and Evolution.

[30]  Robert Grimm,et al.  SuperC: parsing all of C by taming the preprocessor , 2012, PLDI.

[31]  Mahsa Varshosaz,et al.  Towards Efficient Analysis of Variation in Time and Space , 2019, SPLC.