Skip to main content

A Decision Tree Lifted Domain for Analyzing Program Families with Numerical Features

Part of the Lecture Notes in Computer Science book series (LNTCS,volume 12649)

Abstract

Lifted (family-based) static analysis by abstract interpretation is capable of analyzing all variants of a program family simultaneously, in a single run without generating any of the variants explicitly. The elements of the underlying lifted analysis domain are tuples, which maintain one property per variant. Still, explicit property enumeration in tuples, one by one for all variants, immediately yields combinatorial explosion. This is particularly apparent in the case of program families that, apart from Boolean features, contain also numerical features with large domains, thus giving rise to astronomical configuration spaces.

The key for an efficient lifted analysis is a proper handling of variability-specific constructs of the language (e.g., feature-based runtime tests and \(\texttt {\#if}\) directives). In this work, we introduce a new symbolic representation of the lifted abstract domain that can efficiently analyze program families with numerical features. This makes sharing between property elements corresponding to different variants explicitly possible. The elements of the new lifted domain are constraint-based decision trees, where decision nodes are labeled with linear constraints defined over numerical features and the leaf nodes belong to an existing single-program analysis domain. To illustrate the potential of this representation, we have implemented an experimental lifted static analyzer, called SPLNum \(^2\) Analyzer, for inferring invariants of C programs. An empirical evaluation on BusyBox and on benchmarks from SV-COMP yields promising preliminary results indicating that our decision trees-based approach is effective and outperforms the baseline tuple-based approach.

References

  1. Sven Apel, Hendrik Speidel, Philipp Wendler, Alexander von Rhein, and Dirk Beyer. Detection of feature interactions using feature-aware verification. In 26th IEEE/ACM International Conference on Automated Software Engineering (ASE 2011), pages 372–375, 2011.

    Google Scholar 

  2. Sven Apel, Alexander von Rhein, Philipp Wendler, Armin Größlinger, and Dirk Beyer. Strategies for product-line verification: case studies and experiments. In 35th Intern. Conference on Software Engineering, ICSE ’13, pages 482–491, 2013.

    Google Scholar 

  3. Claus Brabrand, Márcio Ribeiro, Társis Tolêdo, Johnni Winther, and Paulo Borba. Intraprocedural dataflow analysis for software product lines. T. Aspect-Oriented Software Development, 10:73–108, 2013.

    Google Scholar 

  4. Junjie Chen and Patrick Cousot. A binary decision tree abstract domain functor. In Static Analysis - 22nd International Symposium, SAS 2015,Proceedings, volume 9291 of LNCS, pages 36–53. Springer, 2015.

    Google Scholar 

  5. Philipp Chrszon, Clemens Dubslaff, Sascha Klüppelholz, and Christel Baier. Profeat: feature-oriented engineering for family-based probabilistic model checking. Formal Aspects Comput., 30(1):45–75, 2018.

    Google Scholar 

  6. Paul Clements and Linda Northrop. Software Product Lines: Practices and Patterns. Addison-Wesley, 2001.

    Google Scholar 

  7. Patrick Cousot and Radhia Cousot. Abstract interpretation: A unified lattice model for static analysis of programs by construction or approximation of fixpoints. In Conference Record of the Fourth ACM Symposium on Principles of Programming Languages, pages 238–252. ACM, 1977.

    Google Scholar 

  8. Patrick Cousot, Radhia Cousot, Jérôme Feret, Laurent Mauborgne, Antoine Miné, David Monniaux, and Xavier Rival. The astreé analyzer. In Programming Languages and Systems, 14th European Symposium on Programming, ESOP 2005, Proceedings, volume 3444 of LNCS, pages 21–30. Springer, 2005.

    Google Scholar 

  9. Patrick Cousot, Radhia Cousot, and Laurent Mauborgne. A scalable segmented decision tree abstract domain. In Time for Verification, Essays in Memory of Amir Pnueli, volume 6200 of LNCS, pages 72–95. Springer, 2010.

    Google Scholar 

  10. Patrick Cousot and Nicolas Halbwachs. Automatic discovery of linear restraints among variables of a program. In Conference Record of the Fifth Annual ACM Symposium on Principles of Programming Languages (POPL’78), pages 84–96. ACM Press,1978.

    Google Scholar 

  11. Aleksandar S. Dimovski. Lifted static analysis using a binary decision diagram abstract domain. In Proceedings of the 18th ACM SIGPLAN International Conference on Generative Programming: Concepts and Experiences, GPCE 2019, pages 102–114. ACM, 2019.

    Google Scholar 

  12. Aleksandar S. Dimovski. On calculating assertion probabilities for program families. Prilozi Contributions, Sec. Nat. Math. Biotech. Sci, MASA, 41(1):13–23, 2020.

    Google Scholar 

  13. Aleksandar S. Dimovski, Sven Apel, and Axel Legay. A decision tree lifted domain for analyzing program families with numerical features (extended version). CoRR, abs/2012.05863, 2020.

    Google Scholar 

  14. Aleksandar S. Dimovski, Claus Brabrand, and Andrzej Wasowski. Variability abstractions: Trading precision for speed in family-based analyses. In 29th European Conference on Object-Oriented Programming, ECOOP 2015, volume 37 of LIPIcs, pages 247–270. Schloss Dagstuhl -Leibniz-Zentrum fuer Informatik, 2015.

    Google Scholar 

  15. Aleksandar S. Dimovski, Claus Brabrand, and Andrzej Wasowski. Finding suitable variability abstractions for lifted analysis. Formal Aspects Comput., 31(2):231–259, 2019.

    Google Scholar 

  16. Aleksandar S. Dimovski and Axel Legay. Computing program reliability using forward-backward precondition analysis and model counting. In Fundamental Approaches to Software Engineering - 23rd International Conference, FASE 2020, Proceedings, volume 12076 of LNCS, pages 182–202. Springer, 2020.

    Google Scholar 

  17. Philippe Granger. Static analysis of arithmetical congruences. International Journal of Computer Mathematics, 30(3-4):165–190, 1989.

    Google Scholar 

  18. Arie Gurfinkel and Sagar Chaki. Boxes: A symbolic abstract domain of boxes. In Static Analysis - 17th International Symposium, SAS 2010. Proceedings, volume 6337 of LNCS, pages 287–303. Springer, 2010.

    Google Scholar 

  19. Bertrand Jeannet and Antoine Miné. Apron: A library of numerical abstract domains for static analysis. In Computer Aided Verification, 21st Intern. Conference, CAV2009. Proceedings, volume 5643 of LNCS, pages 661–667. Springer,2009.

    Google Scholar 

  20. Christian Kästner. Virtual Separation of Concerns: Toward Preprocessors 2.0. PhD thesis, University of Magdeburg, Germany, May 2010.

    Google Scholar 

  21. Gary A. Kildall. A unified approach to global program optimization. In Conference Record of the ACM Symposium on Principles of Programming Languages, (POPL’73), pages 194–206, 1973.

    Google Scholar 

  22. Jan Midtgaard, Aleksandar S. Dimovski, Claus Brabrand, and Andrzej Wasowski. Systematic derivation of correct variability-aware program analyses. Sci. Comput. Program., 105:145–170, 2015.

    Google Scholar 

  23. Antoine Miné. The octagon abstract domain. Higher-Order and Symbolic Computation, 19(1):31–100, 2006.

    Google Scholar 

  24. Antoine Miné. Tutorial on static inference of numeric invariants by abstract interpretation. Foundations and Trends in Programming Languages, 4(3-4):120–372, 2017.

    Google Scholar 

  25. Daniel-Jesus Munoz, Jeho Oh, Mónica Pinto, Lidia Fuentes, and Don S. Batory. Uniform random sampling product configurations of feature models that have numerical features. In Proceedings of the 23rd International Systems and Software Product Line Conference, SPLC 2019, Volume A, pages 39:1–39:13. ACM, 2019.

    Google Scholar 

  26. Caterina Urban and Antoine Miné. A decision tree abstract domain for proving conditional termination. In Static Analysis - 21st International Symposium, SAS 2014.Proceedings, volume 8723 of LNCS, pages 302–318. Springer, 2014.

    Google Scholar 

  27. Alexander von Rhein, Jörg Liebig, Andreas Janker, ChristianKästner, and Sven Apel. Variability-aware static analysis at scale: An empirical study. ACM Trans. Softw. Eng. Methodol., 27(4):18:1–18:33, 2018.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Aleksandar S. Dimovski .

Editor information

Editors and Affiliations

Rights and permissions

Open Access This chapter is licensed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license and indicate if changes were made.

The images or other third party material in this chapter are included in the chapter's Creative Commons license, unless indicated otherwise in a credit line to the material. If material is not included in the chapter's Creative Commons license and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder.

Reprints and Permissions

Copyright information

© 2021 The Author(s)

About this paper

Verify currency and authenticity via CrossMark

Cite this paper

Dimovski, A.S., Apel, S., Legay, A. (2021). A Decision Tree Lifted Domain for Analyzing Program Families with Numerical Features. In: Guerra, E., Stoelinga, M. (eds) Fundamental Approaches to Software Engineering. FASE 2021. Lecture Notes in Computer Science(), vol 12649. Springer, Cham. https://doi.org/10.1007/978-3-030-71500-7_4

Download citation

  • DOI: https://doi.org/10.1007/978-3-030-71500-7_4

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-030-71499-4

  • Online ISBN: 978-3-030-71500-7

  • eBook Packages: Computer ScienceComputer Science (R0)