Abstract
A software analysis is a computer program that takes some representation of a software product as input and produces some useful information about that product as output. A software product line encompasses many software product variants, and thus existing analyses can be applied to each of the product variations individually, but not to the entire product line as a whole. Enumerating all product variants and analyzing them one by one is usually intractable due to the combinatorial explosion of the number of product variants with respect to product line features. Several software analyses (e.g., type checkers, model checkers, data flow analyses) have been redesigned/re-implemented to support variability. This usually requires a lot of time and effort, and the variability-aware version of the analysis might have new errors/bugs that do not exist in the original one.
Given an analysis program written in a functional language based on PCF, in this paper we present two approaches to transforming (lifting) it into a semantically equivalent variability-aware analysis. A light-weight approach (referred to as shallow lifting) wraps the analysis program into a variability-aware version, exploring all combinations of its input arguments. Deep lifting, on the other hand, is a program rewriting mechanism where the syntactic constructs of the input program are rewritten into their variability-aware counterparts. Compositionally this results in an efficient program semantically equivalent to the input program, modulo variability.
We present the correctness criteria for functional program lifting, together with correctness proof sketches of shallow lifting. We evaluate our approach on a set of program analyses applied to the BusyBox C-language product line.
Supplemental Material
- Alejandro Aguirre, Gilles Barthe, Marco Gaboardi, Deepak Garg, and Pierre-Yves Strub. 2017. A Relational Logic for HigherOrder Programs. Proc. ACM Program. Lang. 1, ICFP, Article 21 ( Aug. 2017 ), 29 pages. https://doi.org/10.1145/3110265 Google Scholar
Digital Library
- Sven Apel, Alexander von Rhein, Philipp Wendler, Armin Größlinger, and Dirk Beyer. 2013. Strategies for Product-line Verification: Case Studies and Experiments. In Proc. of ICSE'13. IEEE Press, 482-491.Google Scholar
Cross Ref
- Michael Arntzenius and Neelakantan R. Krishnaswami. 2016. Datafun: A Functional Datalog. In Proceedings of the 21st ACM SIGPLAN International Conference on Functional Programming (Nara, Japan) (ICFP 2016 ). Association for Computing Machinery, New York, NY, USA, 214-227. https://doi.org/10.1145/2951913.2951948 Google Scholar
Digital Library
- Eric Bodden, Társis Tolêdo, Márcio Ribeiro, Claus Brabrand, Paulo Borba, and Mira Mezini. 2013. SPLLIFT: Statically Analyzing Software Product Lines in Minutes Instead of Years. In Proc. of PLDI'13. ACM, 355-364.Google Scholar
Digital Library
- Sheng Chen and Martin Erwig. 2014. Type-based Parametric Analysis of Program Families. In Proc. of ICFP'14. ACM, 39-51.Google Scholar
Digital Library
- Andreas Classen, Maxime Cordy, Pierre-Yves Schobbens, Patrick Heymans, Axel Legay, and Jean-Francois Raskin. 2013. Featured Transition Systems: Foundations for Verifying Variability-Intensive Systems and Their Application to LTL Model Checking. IEEE Trans. Softw. Eng. 39, 8 (Aug. 2013 ), 1069-1089.Google Scholar
Digital Library
- Paul Clements and Linda Northrop. 2001. Software Product Lines: Practices and Patterns. Addison-Wesley Professional.Google Scholar
Digital Library
- Krzysztof Czarnecki and Michal Antkiewicz. 2005. Mapping Features to Models: A Template Approach Based on Superimposed Variants. In Proc. of GPCE'05. 422-437.Google Scholar
Digital Library
- Martin Erwig and Eric Walkingshaw. 2011. The Choice Calculus: A Representation for Software Variation. ACM Trans. Softw. Eng. Methodol. 21, 1 (Dec. 2011 ), 6 : 1-6 : 27.Google Scholar
Digital Library
- Paul Gazzillo and Robert Grimm. 2012. SuperC: Parsing All of C by Taming the Preprocessor. In Proc. of PLDI'12. ACM, 323-334.Google Scholar
Digital Library
- Christian Kästner and Sven Apel. 2008. Integrating Compositional and Annotative Approaches for Product Line Engineering.. In Proc. of GPCE'08. 35-40.Google Scholar
- Christian Kästner, Sven Apel, Thomas Thüm, and Gunter Saake. 2012. Type Checking Annotation-based Product Lines. ACM Trans. Softw. Eng. Methodol. 21, 3 ( July 2012 ), 14 : 1-14 : 39.Google Scholar
Digital Library
- Christian Kästner, Paolo G. Giarrusso, Tillmann Rendel, Sebastian Erdweg, Klaus Ostermann, and Thorsten Berger. 2011. Variability-aware Parsing in the Presence of Lexical Macros and Conditional Compilation. In Proc. of OOPSLA'11. ACM, 805-824.Google Scholar
Digital Library
- G. A. Kavvos, Edward Morehouse, Daniel R. Licata, and Norman Danner. 2019. Recurrence Extraction for Functional Programs through Call-by-Push-Value. Proc. ACM Program. Lang. 4, POPL, Article 15 ( Dec. 2019 ), 31 pages. https: //doi.org/10.1145/3371083 Google Scholar
Digital Library
- Sven Keidel and Sebastian Erdweg. 2019. Sound and Reusable Components for Abstract Interpretation. Proc. ACM Program. Lang. 3, OOPSLA, Article 176 (Oct. 2019 ), 28 pages. https://doi.org/10.1145/3360602 Google Scholar
Digital Library
- Jörg Liebig, Sven Apel, Christian Lengauer, Christian Kästner, and Michael Schulze. 2010. An Analysis of the Variability in Forty Preprocessor-Based Software Product Lines. In Proceedings of the 32nd ACM/IEEE International Conference on Software Engineering-Volume 1 ( Cape Town, South Africa) (ICSE '10). Association for Computing Machinery, New York, NY, USA, 105-114. https://doi.org/10.1145/1806799.1806819 Google Scholar
Digital Library
- Jörg Liebig, Alexander von Rhein, Christian Kästner, Sven Apel, Jens Dörre, and Christian Lengauer. 2013. Scalable Analysis of Variable Software. In Proc. of ESEc/FSE'13. 81-91.Google Scholar
Digital Library
- Magnus Madsen, Ming-Ho Yee, and Ondvrej Lhoták. 2016. From Datalog to Flix: A Declarative Language for Fixed Points on Lattices. In Proceedings of the 37th ACM SIGPLAN Conference on Programming Language Design and Implementation (Santa Barbara, CA, USA) ( PLDI '16). ACM, New York, NY, USA, 194-208. https://doi.org/10.1145/2908080.2908096 Google Scholar
Digital Library
- Jan Midtgaard, Aleksandar S. Dimovski, Claus Brabrand, and Andrzej Wąsowski. 2015. Systematic Derivation of Correct Variability-aware Program Analyses. Sci. Comput. Program. 105, C ( July 2015 ), 145-170.Google Scholar
- John C. Mitchell. 1996. Foundations for Programming Languages. The MIT Press.Google Scholar
Digital Library
- Sarah Nadi and Ric Holt. 2014. The Linux Kernel: A Case Study of Build System Variability. J. Softw. Evol. Process 26, 8 (Aug. 2014 ), 730-746. https://doi.org/10.1002/smr.1595 Google Scholar
Digital Library
- Benjamin C. Pierce. 2002. Types and Programming Languages (1st ed.). The MIT Press.Google Scholar
Digital Library
- G.D. Plotkin. 1977. LCF considered as a programming language. Theoretical Computer Science 5, 3 ( 1977 ), 223-255. https://doi.org/10.1016/ 0304-3975 ( 77 ) 90044-5 Google Scholar
Cross Ref
- Klaus Pohl, Günter Böckle, and Frank J. van der Linden. 2005. Software Product Line Engineering: Foundations, Principles and Techniques. Springer-Verlag, Berlin, Heidelberg.Google Scholar
Digital Library
- Thomas Reps, Susan Horwitz, and Mooly Sagiv. 1995. Precise Interprocedural Dataflow Analysis via Graph Reachability. In Proc. of POPL'95. ACM, 49-61.Google Scholar
Digital Library
- Julia Rubin and Marsha Chechik. 2012. Combining Related Products into Product Lines. In Proc. of FASE'12. LNCS, Vol. 7212. 285-300.Google Scholar
Digital Library
- Ulrich Schöpp. 2017. Defunctionalisation as Modular Closure Conversion. In Proceedings of the 19th International Symposium on Principles and Practice of Declarative Programming (Namur, Belgium) (PPDP '17). Association for Computing Machinery, New York, NY, USA, 175-186. https://doi.org/10.1145/3131851.3131868 Google Scholar
Digital Library
- Ramy Shahin and Marsha Chechik. 2020. Variability-Aware Datalog. In Practical Aspects of Declarative Languages, Ekaterina Komendantskaya and Yanhong Annie Liu (Eds.). Springer International Publishing, 213-221.Google Scholar
- Ramy Shahin, Marsha Chechik, and Rick Salay. 2019. Lifting Datalog-based Analyses to Software Product Lines. In Proceedings of the 2019 27th ACM Joint Meeting on European Software Engineering Conference and Symposium on the Foundations of Software Engineering (Tallinn, Estonia) (ESEC/FSE 2019). ACM, New York, NY, USA, 39-49.Google Scholar
Digital Library
- Fabio Somenzi. 1998. CUDD: CU Decision Diagram Package Release 2.2.0. (06 1998 ).Google Scholar
- Thomas Thüm, Sven Apel, Christian Kästner, Ina Schaefer, and Gunter Saake. 2014. A Classification and Survey of Analysis Strategies for Software Product Lines. ACM Comput. Surv. 47, 1, Article 6 ( June 2014 ), 45 pages.Google Scholar
- Alexander Von Rhein, JöRG Liebig, Andreas Janker, Christian Kästner, and Sven Apel. 2018. Variability-Aware Static Analysis at Scale: An Empirical Study. ACM Trans. Softw. Eng. Methodol. 27, 4, Article 18 ( Nov. 2018 ), 33 pages. https: //doi.org/10.1145/3280986 Google Scholar
Digital Library
Index Terms
Automatic and efficient variability-aware lifting of functional programs
Recommendations
Systematic derivation of correct variability-aware program analyses
A recent line of work lifts particular verification and analysis methods to Software Product Lines (SPL). In an effort to generalize such case-by-case approaches, we develop a systematic methodology for lifting single-program analyses to SPLs using ...
Evaluation of Quality Attribute Variability in Software Product Families
ECBS '08: Proceedings of the 15th Annual IEEE International Conference and Workshop on the Engineering of Computer Based SystemsSoftware product family or line is a software engineering paradigm that systematizes reuse. In Software Product Line Engineering, two phases are distinguished: Domain Engineering which is in charge of developing a common infrastructure and assets and ...
Lifting Datalog-based analyses to software product lines
ESEC/FSE 2019: Proceedings of the 2019 27th ACM Joint Meeting on European Software Engineering Conference and Symposium on the Foundations of Software EngineeringApplying program analyses to Software Product Lines (SPLs) has been a fundamental research problem at the intersection of Product Line Engineering and software analysis. Different attempts have been made to ”lift” particular product-level analyses to ...






Comments