Dataflow Analysis for Software Product Lines

Software product lines (SPLs) developed using annotative approaches such as conditional compilation come with an inherent risk of constructing erroneous products. For this reason, it is essential to be able to analyze such SPLs. However, as dataflow analysis techniques are not able to deal with SPLs, developers must generate and analyze all valid products individually, which is expensive for non-trivial SPLs. In this paper, we demonstrate how to take any standard intraproce- dural dataflow analysis and automatically turn it into a feature-sensitive dataflow analysis in five different ways where the last is a combination of the other four. All analyses are capable of analyzing all valid products of an SPL without having to generate all of them explicitly. We have implemented all analyses using SOOT's intraprocedural dataflow analysis framework and experimentally evaluated four of them according to their performance and memory characteristics on five quali- tatively different SPLs. On our benchmarks, the combined analysis strat- egy is up to almost eight times faster than the brute-force approach.

[1]  Martin Fowler,et al.  Refactoring - Improving the Design of Existing Code , 1999, Addison Wesley object technology series.

[2]  Krzysztof Czarnecki,et al.  Verifying feature-based model templates against well-formedness OCL constraints , 2006, GPCE '06.

[3]  Michael D. Ernst,et al.  An Empirical Analysis of C Preprocessor Use , 2002, IEEE Trans. Software Eng..

[4]  Alfred V. Aho,et al.  Compilers: Principles, Techniques, and Tools , 1986, Addison-Wesley series in computer science / World student series edition.

[5]  Claes Wohlin,et al.  Experimentation in software engineering: an introduction , 2000 .

[6]  Vander Alves,et al.  Extracting and Evolving Mobile Games Product Lines , 2005, SPLC.

[7]  Henry Spencer,et al.  #ifdef Considered Harmful, or Portability Experience with C News , 1992, USENIX Summer.

[8]  Sven Apel,et al.  Analyzing the discipline of preprocessor annotations in 30 million lines of C code , 2011, AOSD '11.

[9]  Marco Tulio Valente,et al.  Extracting Software Product Lines: A Case Study Using Conditional Compilation , 2011, 2011 15th European Conference on Software Maintenance and Reengineering.

[10]  Sven Apel,et al.  Type-Checking Software Product Lines - A Formal Approach , 2008, 2008 23rd IEEE/ACM International Conference on Automated Software Engineering.

[11]  Sven Apel,et al.  Granularity in software product lines , 2008, 2008 ACM/IEEE 30th International Conference on Software Engineering.

[12]  Sriram K. Rajamani,et al.  Bebop: a path-sensitive interprocedural dataflow engine , 2001, PASTE '01.

[13]  Don S. Batory,et al.  Feature Models, Grammars, and Propositional Formulas , 2005, SPLC.

[14]  Gary A. Kildall,et al.  A unified approach to global program optimization , 1973, POPL.

[15]  Cristina Gacek,et al.  Implementing product line variabilities , 2001, SSR '01.

[16]  Flemming Nielson,et al.  Principles of Program Analysis , 1999, Springer Berlin Heidelberg.

[17]  Eric Bodden,et al.  Static flow-sensitive & context-sensitive information-flow analysis for software product lines: position paper , 2012, PLAS.

[18]  C. Pipper,et al.  [''R"--project for statistical computing]. , 2008, Ugeskrift for laeger.

[19]  Sven Apel,et al.  Family-based deductive verification of software product lines , 2012, GPCE '12.

[20]  Sven Apel,et al.  Type safety for feature-oriented product lines , 2010, Automated Software Engineering.

[21]  Sven Apel,et al.  A Case Study Implementing Features Using AspectJ , 2007, 11th International Software Product Line Conference (SPLC 2007).

[22]  Martin Leucker,et al.  Modeling and Model Checking Software Product Lines , 2008, FMOODS.

[23]  Matthias Hauswirth,et al.  Producing wrong data without doing anything obviously wrong! , 2009, ASPLOS.

[24]  Marco Pistoia,et al.  Saving the world wide web from vulnerable JavaScript , 2011, ISSTA '11.

[25]  Sven Apel,et al.  A model of refactoring physically and virtually separated features , 2009, GPCE '09.

[26]  William R. Cook,et al.  Fitting the pieces together: a machine-checked model of safe composition , 2009, ESEC/FSE '09.

[27]  Gunter Saake,et al.  Type checking annotation-based product lines , 2012, TSEM.

[28]  Claus Brabrand,et al.  On the impact of feature dependencies when maintaining preprocessor-based software product lines , 2011, GPCE '11.

[29]  Sven Apel,et al.  Detection of feature interactions using feature-aware verification , 2011, 2011 26th IEEE/ACM International Conference on Automated Software Engineering (ASE 2011).

[31]  Christian Kästner,et al.  Virtual Separation of Concerns: Toward Preprocessors 2.0 , 2010, it Inf. Technol..

[32]  Martin Erwig,et al.  #ifdef confirmed harmful: Promoting understandable software variation , 2011, 2011 IEEE Symposium on Visual Languages and Human-Centric Computing (VL/HCC).

[33]  Cláudio Sant'Anna,et al.  Evolving software product lines with aspects , 2008, 2008 ACM/IEEE 30th International Conference on Software Engineering.

[34]  Wolfgang De Meuter,et al.  Can we refactor conditional compilation into aspects? , 2009, AOSD '09.

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

[36]  Gregor Snelting,et al.  On the inference of configuration structures from source code , 1994, Proceedings of 16th International Conference on Software Engineering.

[37]  Sven Apel,et al.  An analysis of the variability in forty preprocessor-based software product lines , 2010, 2010 ACM/IEEE 32nd International Conference on Software Engineering.

[38]  Sheldon B. Akers,et al.  Binary Decision Diagrams , 1978, IEEE Transactions on Computers.

[39]  Klaus Pohl,et al.  Software Product Line Engineering - Foundations, Principles, and Techniques , 2005 .

[40]  Mira Mezini,et al.  Transparent and Efficient Reuse of IFDS-based Static Program Analyses for Software Product Lines , 2012 .

[41]  Kyo Chul Kang,et al.  Feature-Oriented Domain Analysis (FODA) Feasibility Study , 1990 .

[42]  Klaus Pohl,et al.  Model Checking of Domain Artifacts in Product Line Engineering , 2009, 2009 IEEE/ACM International Conference on Automated Software Engineering.

[43]  James R. Larus,et al.  Improving data-flow analysis with path profiles , 1998, PLDI.

[44]  Carsten Sinz,et al.  Configuration Lifting: Verification meets Software Configuration , 2008, 2008 23rd IEEE/ACM International Conference on Automated Software Engineering.

[45]  Pierre-Yves Schobbens,et al.  Symbolic model checking of software product lines , 2011, 2011 33rd International Conference on Software Engineering (ICSE).

[46]  Vander Alves,et al.  Implementing software product line adoption strategies , 2007 .

[47]  Peter Sestoft,et al.  Partial evaluation and automatic program generation , 1993, Prentice Hall international series in computer science.

[48]  F. Wilcoxon Individual Comparisons by Ranking Methods , 1945 .

[49]  Claus Brabrand,et al.  Emergo: a tool for improving maintainability of preprocessor-based product lines , 2012, AOSD.

[50]  Gunter Saake,et al.  Analysis Strategies for Software Product Lines , 2012 .

[51]  Thomas W. Reps,et al.  Precise Interprocedural Dataflow Analysis with Applications to Constant Propagation , 1995, TAPSOFT.

[52]  Sven Apel,et al.  Virtual Separation of Concerns - A Second Chance for Preprocessors , 2009, J. Object Technol..

[53]  Laurie Hendren,et al.  Soot: a Java bytecode optimization framework , 2010, CASCON.

[54]  Paul Clements,et al.  Software product lines - practices and patterns , 2001, SEI series in software engineering.

[55]  Mark N. Wegman,et al.  Constant propagation with conditional branches , 1985, POPL.

[56]  Rolf Drechsler,et al.  Binary Decision Diagrams - Theory and Implementation , 1998 .

[57]  Sarfraz Khurshid,et al.  Reducing Configurations to Monitor in a Software Product Line , 2010, RV.

[58]  Márcio Ribeiro,et al.  Emergent feature modularization , 2010, SPLASH/OOPSLA Companion.

[59]  Pierre-Yves Schobbens,et al.  Model checking lots of systems: efficient verification of temporal properties in software product lines , 2010, 2010 ACM/IEEE 32nd International Conference on Software Engineering.

[60]  Sungdo Moon,et al.  Predicated array data-flow analysis for run-time parallelization , 1998, ICS '98.

[61]  Sarfraz Khurshid,et al.  Reducing combinatorics in testing product lines , 2011, AOSD '11.

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

[63]  William R. Cook,et al.  Safe composition of product lines , 2007, GPCE '07.

[64]  Peter Kampstra,et al.  Beanplot: A Boxplot Alternative for Visual Comparison of Distributions , 2008 .

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