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.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
Pohl, K., Böckle, G., van der Linden, F.: Software Product Line Engineering: Foundations, Principles and Techniques. Springer (2005)
Clements, P., Northrop, L.: Software Product Lines: Practices and Patterns. Addison-Wesley (2001)
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)
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)
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)
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)
Fowler, M.: Refactoring: Improving the Design of Existing Code. Addison-Wesley (1999)
Nielson, F., Nielson, H.R., Hankin, C.: Principles of Program Analysis. Springer, Secaucus (1999)
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)
Brabrand, C., Ribeiro, M., Tolêdo, T., Borba, P.: Intraprocedural dataflow analysis for software product lines. In: AOSD, pp. 13–24 (2012)
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)
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)
Apel, S., Kästner, C., Grösslinger, A., Lengauer, C.: Type safety for feature-oriented product lines. Automated Software Engineering 17, 251–300 (2010)
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)
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)
Ernst, M.D., Badros, G.J., Notkin, D.: An empirical analysis of c preprocessor use. IEEE Transactions on Software Engineering 28, 1146–1170 (2002)
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)
Kästner, C.: Virtual Separation of Concerns: Toward Preprocessors 2.0. PhD thesis, University of Magdeburg, Germany (May 2010)
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)
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)
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)
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)
Akers, S.B.: Binary decision diagrams. IEEE Transactions on Computers 27, 509–516 (1978)
Jones, N.D., Gomard, C.K., Sestoft, P.: Partial evaluation and automatic program generation. Prentice-Hall, Inc., Upper Saddle River (1993)
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)
The colt project: Open source libraries for high performance scientific and technical computing in java. CERN: European Organization for Nuclear Research
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
Ball, T., Rajamani, S.K.: Bebop: a path-sensitive interprocedural dataflow engine. In: PASTE 2001, Snowbird, Utah, USA, pp. 97–103 (2001)
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)
Wegman, M.N., Zadeck, F.K.: Constant propagation with conditional branches. ACM Transactions on Programming Languages and Systems 13, 181–210 (1991)
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)
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)
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)
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)
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)
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)
Classen, A., Heymans, P., Schobbens, P.-Y., Legay, A.: Symbolic model checking of software product lines. In: ICSE, pp. 321–330 (2011)
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)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights 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)