Skip to main content

Intraprocedural Dataflow Analysis for Software Product Lines

  • Chapter
Transactions on Aspect-Oriented Software Development X

Part of the book series: Lecture Notes in Computer Science ((TAOSD,volume 7800))

Abstract

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 intraprocedural 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 qualitatively different SPLs. On our benchmarks, the combined analysis strategy is up to almost eight times faster than the brute-force approach.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Pohl, K., Böckle, G., van der Linden, F.: Software Product Line Engineering: Foundations, Principles and Techniques. Springer (2005)

    Google Scholar 

  2. Clements, P., Northrop, L.: Software Product Lines: Practices and Patterns. Addison-Wesley (2001)

    Google Scholar 

  3. Kästner, C., Apel, S., Kuhlemann, M.: Granularity in software product lines. In: Proceedings of the 30th International Conference on Software Engineering (ICSE 2008), Leipzig, Germany, pp. 311–320. ACM (2008)

    Google Scholar 

  4. Adams, B., De Meuter, W., Tromp, H., Hassan, A.E.: Can we refactor conditional compilation into aspects? In: Proceedings of the 8th ACM International Conference on Aspect-Oriented Software Development (AOSD 2009), Charlottesville, Virginia, USA, pp. 243–254. ACM (2009)

    Google Scholar 

  5. Kildall, G.A.: A unified approach to global program optimization. In: Proceedings of the 1st Annual ACM Symposium on Principles of Programming Languages (POPL 1973), Boston, Massachusetts, pp. 194–206. ACM (1973)

    Google Scholar 

  6. Ribeiro, M., Pacheco, H., Teixeira, L., Borba, P.: Emergent feature modularization. In: Onward! 2010, Affiliated with the 1st ACM SIGPLAN International Conference on Systems, Programming, Languages and Applications: Software for Humanity (SPLASH 2010), Reno, NV, USA, pp. 11–18 (2010)

    Google Scholar 

  7. Fowler, M.: Refactoring: Improving the Design of Existing Code. Addison-Wesley (1999)

    Google Scholar 

  8. Nielson, F., Nielson, H.R., Hankin, C.: Principles of Program Analysis. Springer, Secaucus (1999)

    Book  MATH  Google Scholar 

  9. Kästner, C., Apel, S., Kuhlemann, M.: A model of refactoring physically and virtually separated features. In: Proceedings of the Eighth International Conference on Generative Programming and Component Engineering, GPCE 2009, pp. 157–166. ACM, New York (2009)

    Chapter  Google Scholar 

  10. Brabrand, C., Ribeiro, M., Tolêdo, T., Borba, P.: Intraprocedural dataflow analysis for software product lines. In: AOSD, pp. 13–24 (2012)

    Google Scholar 

  11. Bodden, E.: Position Paper: Static flow-sensitive & context-sensitive information-flow analysis for software product lines. In: ACM SIGPLAN Seventh Workshop on Programming Languages and Analysis for Security, PLAS 2012 (June 2012)

    Google Scholar 

  12. Kästner, C., Giarrusso, P.G., Rendel, T., Erdweg, S., Ostermann, K., Berger, T.: Variability-aware parsing in the presence of lexical macros and conditional compilation. In: Proceedings of the ACM International Conference on Object-Oriented Programming Systems Languages and Applications (OOPSLA 2011), Portland, OR, USA, pp. 805–824. ACM (2011)

    Google Scholar 

  13. Apel, S., Kästner, C., Grösslinger, A., Lengauer, C.: Type safety for feature-oriented product lines. Automated Software Engineering 17, 251–300 (2010)

    Article  Google Scholar 

  14. Spencer, H., Collyer, G.: #ifdef considered harmful, or portability experience with C news. In: Proceedings of the Usenix Summer 1992 Technical Conference, pp. 185–198. Usenix Association, Berkeley (1992)

    Google Scholar 

  15. Krone, M., Snelting, G.: On the inference of configuration structures from source code. In: Proceedings of the 16th International Conference on Software Engineering (ICSE 2004), pp. 49–57. IEEE Computer, Los Alamitos (1994)

    Chapter  Google Scholar 

  16. Ernst, M.D., Badros, G.J., Notkin, D.: An empirical analysis of c preprocessor use. IEEE Transactions on Software Engineering 28, 1146–1170 (2002)

    Article  Google Scholar 

  17. Liebig, J., Apel, S., Lengauer, C., Kästner, C., Schulze, M.: An analysis of the variability in forty preprocessor-based software product lines. In: Proceedings of the 32nd ACM/IEEE International Conference on Software Engineering (ICSE 2010), Cape Town, South Africa, pp. 105–114. ACM (2010)

    Google Scholar 

  18. Kästner, C.: Virtual Separation of Concerns: Toward Preprocessors 2.0. PhD thesis, University of Magdeburg, Germany (May 2010)

    Google Scholar 

  19. Kang, K.C., Cohen, S.G., Hess, J.A., Novak, W.E., Peterson, A.S.: Feature-Oriented Domain Analysis (FODA) feasibility study. Tech. rep., Carnegie-Mellon University Software Engineering Institute (November 1990)

    Google Scholar 

  20. Post, H., Sinz, C.: Configuration lifting: Verification meets software configuration. In: Proceedings of the 23rd IEEE/ACM International Conference on Automated Software Engineering (ASE 2008), L’Aquila, Italy, pp. 347–350. IEEE Computer Society (2008)

    Google Scholar 

  21. Apel, S., Speidel, H., Wendler, P., von Rhein, A., Beyer, D.: Detection of feature interactions using feature-aware verification. In: Proceedings of the 26th IEEE/ACM International Conference on Automated Software Engineering (ASE 2011), Lawrence, USA. IEEE Computer Society (November 2011)

    Google Scholar 

  22. Czarnecki, K., Pietroszek, K.: Verifying feature-based model templates against well-formedness ocl constraints. In: Proceedings of the 5th International Conference on Generative Programming and Component Engineering, GPCE 2006, pp. 211–220. ACM, New York (2006)

    Chapter  Google Scholar 

  23. Akers, S.B.: Binary decision diagrams. IEEE Transactions on Computers 27, 509–516 (1978)

    Article  MATH  Google Scholar 

  24. Jones, N.D., Gomard, C.K., Sestoft, P.: Partial evaluation and automatic program generation. Prentice-Hall, Inc., Upper Saddle River (1993)

    MATH  Google Scholar 

  25. Vallée-Rai, R., Co, P., Gagnon, E., Hendren, L., Lam, P., Sundaresan, V.: Soot - a java bytecode optimization framework. In: Proceedings of the 1999 Conference of the Centre for Advanced Studies on Collaborative Research (CASCON 1999), p. 13. IBM Press (1999)

    Google Scholar 

  26. The colt project: Open source libraries for high performance scientific and technical computing in java. CERN: European Organization for Nuclear Research

    Google Scholar 

  27. Figueiredo, E., Cacho, N., Sant’Anna, C., Monteiro, M., Kulesza, U., Garcia, A., Soares, S., Ferrari, F., Khan, S., Filho, F.C., Dantas, F.: Evolving software product lines with aspects: an empirical study on design stability. In: Proceedings of the 30th International Conference on Software Engineering (ICSE 2008), Leipzig, Germany, pp. 261–270. ACM (2008)

    Google Scholar 

  28. Wohlin, C., Runeson, P., Höst, M., Ohlsson, M.C., Regnell, B., Wesslén, A.: Experimentation in software engineering: an introduction. Kluwer Academic Publishers (2000)

    Google Scholar 

  29. Thüm, T., Apel, S., Kästner, C., Kuhlemann, M., Schaefer, I., Saake, G.: Analysis strategies for software product lines. Tech. rep., School of Computer Science, University of Magdeburg, Germany, Technical Report FIN-004-2012 (2012)

    Google Scholar 

  30. Apel, S., Speidel, H., Wendler, P., von Rhein, A., Beyer, D.: Detection of feature interactions using feature-aware verification. In: Proceedings of the 2011 26th IEEE/ACM International Conference on Automated Software Engineering, ASE 2011, pp. 372–375. IEEE Computer Society, Washington, DC (2011)

    Chapter  Google Scholar 

  31. Delaware, B., Cook, W.R., Batory, D.: Fitting the pieces together: a machine-checked model of safe composition. In: Proceedings of the the 7th Joint Meeting of the European Software Engineering Conference and the ACM SIGSOFT Symposium on the Foundations of Software Engineering, ESEC/FSE 2009, pp. 243–252. ACM, New York (2009)

    Google Scholar 

  32. Thaker, S., Batory, D., Kitchin, D., Cook, W.: Safe composition of product lines. In: Proceedings of the 6th International Conference on Generative Programming and Component Engineering, GPCE 2007, pp. 95–104. ACM, New York (2007)

    Google Scholar 

  33. Gruler, A., Leucker, M., Scheidemann, K.: Modeling and Model Checking Software Product Lines. In: Barthe, G., de Boer, F.S. (eds.) FMOODS 2008. LNCS, vol. 5051, pp. 113–131. Springer, Heidelberg (2008)

    Chapter  Google Scholar 

  34. Lauenroth, K., Pohl, K., Toehning, S.: Model checking of domain artifacts in product line engineering. In: Proceedings of the 2009 IEEE/ACM International Conference on Automated Software Engineering, ASE 2009, pp. 269–280. IEEE Computer Society, Washington, DC (2009)

    Chapter  Google Scholar 

  35. Kästner, C., Apel, S., Thüm, T., Saake, G.: Type checking annotation-based product lines. ACM Trans. Softw. Eng. Methodol. 21, 14:1–14:39 (2012)

    Article  Google Scholar 

  36. Thüm, T., Schaefer, I., Hentschel, M., Apel, S.: Family-based deductive verification of software product lines. In: Proceedings of the 11th International Conference on Generative Programming and Component Engineering, GPCE 2012, pp. 11–20. ACM, New York (2012)

    Chapter  Google Scholar 

  37. Ball, T., Rajamani, S.K.: Bebop: a path-sensitive interprocedural dataflow engine. In: PASTE 2001, Snowbird, Utah, USA, pp. 97–103 (2001)

    Google Scholar 

  38. Ammons, G., Larus, J.R.: Improving data-flow analysis with path profiles. In: Programming Language Design and Implementation (PLDI 1998), Montreal, Canada, pp. 72–84 (1998)

    Google Scholar 

  39. Wegman, M.N., Zadeck, F.K.: Constant propagation with conditional branches. ACM Transactions on Programming Languages and Systems 13, 181–210 (1991)

    Article  Google Scholar 

  40. Moon, S., Hall, M.W., Murphy, B.R.: Predicated array data-flow analysis for run-time parallelization. In: Proceedings of the 12th International Conference on Supercomputing (ICS 1998), Melbourne, Australia, pp. 204–211. ACM (1998)

    Google Scholar 

  41. Hwan, C., Kim, P., Batory, D., Khurshid, S.: Reducing combinatorics in testing product lines. In: Proceedings of the 10th International Conference on Aspect-oriented Software Development (AOSD 2011), Porto de Galinhas, Brazil, pp. 57–68. ACM (2011)

    Google Scholar 

  42. Reps, T., Horwitz, S., Sagiv, M.: Precise interprocedural dataflow analysis via graph reachability. In: Proceedings of the 22nd ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, POPL 1995, pp. 49–61. ACM, New York (1995)

    Chapter  Google Scholar 

  43. Sagiv, M., Reps, T., Horwitz, S.: Precise Interprocedural Dataflow Analysis with Applications to Constant Propagation. In: Mosses, P.D., Nielsen, M., Schwartzbach, M.I. (eds.) CAAP 1995, FASE 1995, and TAPSOFT 1995. LNCS, vol. 915, pp. 651–665. Springer, Heidelberg (1995)

    Google Scholar 

  44. Kästner, C., Apel, S.: Type-checking software product lines - a formal approach. In: Proceedings of the 23rd IEEE/ACM International Conference on Automated Software Engineering (ASE 2008), L’Aquila, Italy, pp. 258–267 (2008)

    Google Scholar 

  45. Classen, A., Heymans, P., Schobbens, P.-Y., Legay, A., Raskin, J.-F.: Model checking lots of systems: efficient verification of temporal properties in software product lines. In: Proceedings of the 32nd ACM/IEEE International Conference on Software Engineering (ICSE 2010), Cape Town, South Africa, pp. 335–344. ACM (2010)

    Google Scholar 

  46. Classen, A., Heymans, P., Schobbens, P.-Y., Legay, A.: Symbolic model checking of software product lines. In: ICSE, pp. 321–330 (2011)

    Google Scholar 

  47. Kim, C.H.P., Bodden, E., Batory, D., Khurshid, S.: Reducing Configurations to Monitor in a Software Product Line. In: Barringer, H., Falcone, Y., Finkbeiner, B., Havelund, K., Lee, I., Pace, G., Roşu, G., Sokolsky, O., Tillmann, N. (eds.) RV 2010. LNCS, vol. 6418, pp. 285–299. Springer, Heidelberg (2010)

    Chapter  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2013 Springer-Verlag Berlin Heidelberg

About this chapter

Cite this chapter

Brabrand, C., Ribeiro, M., Tolêdo, T., Winther, J., Borba, P. (2013). Intraprocedural Dataflow Analysis for Software Product Lines. In: Leavens, G.T., Chiba, S., Tanter, É. (eds) Transactions on Aspect-Oriented Software Development X. Lecture Notes in Computer Science, vol 7800. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-36964-3_3

Download citation

  • DOI: https://doi.org/10.1007/978-3-642-36964-3_3

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-642-36963-6

  • Online ISBN: 978-3-642-36964-3

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics