Abstract
Configurable systems typically use #ifdefs to denote variability. Generating and compiling all configurations may be time-consuming. An alternative consists of using variability-aware parsers, such as TypeChef. However, they may not scale. In practice, compiling the complete systems may be costly. Therefore, developers can use sampling strategies to compile only a subset of the configurations. We propose a change-centric approach to compile configurable systems with #ifdefs by analyzing only configurations impacted by a code change (transformation). We implement it in a tool called CHECKCONFIGMX, which reports the new compilation errors introduced by the transformation. We perform an empirical study to evaluate 3,913 transformations applied to the 14 largest files of BusyBox, Apache HTTPD, and Expat configurable systems. CHECKCONFIGMX finds 595 compilation errors of 20 types introduced by 41 developers in 214 commits (5.46% of the analyzed transformations). In our study, it reduces by at least 50% (an average of 99%) the effort of evaluating the analyzed transformations by comparing with the exhaustive approach without considering a feature model. CHECKCONFIGMX may help developers to reduce compilation effort to evaluate fine-grained transformations applied to configurable systems with #ifdefs.
- I. Abal, C. Brabrand, and A. Wasowski. 42 variability bugs in the Linux kernel: A qualitative analysis. In Proceedings of the 29th International Conference on Automated Software Engineering, pages 421–432, 2014. Google Scholar
Digital Library
- T. Berger, R. Rublack, D. Nair, J. Atlee, M. Becker, K. Czarnecki, and A. Wasowski. A survey of variability modeling in industrial practice. In Proceedings of the 7th International Workshop on Variability Modelling of Software-intensive Systems, pages 1–7, 2013. Google Scholar
Digital Library
- T. Berger, S. She, R. Lotufo, A. Wasowski, and K. Czarnecki. A study of variability models and languages in the systems software domain. IEEE Transactions on Software Engineering, pages 1611–1640, 2013. Google Scholar
Digital Library
- S. Bohner and A. Robert. Software Change Impact Analysis. Wiley-IEEE Computer Society Press, 1996.Google Scholar
- M. Bond and K. McKinley. Tolerating memory leaks. In G. E. Harris, editor, Proceedings of the 14th International Conference on Object Oriented Programming Systems Languages and Applications, pages 109–126, 2008. Google Scholar
Digital Library
- P. Clements and L. Northrop. Software product lines: Practices and patterns. Addison-Wesley, 2009.Google Scholar
- M. Ernst, G. Badros, and D. Notkin. An empirical analysis of C preprocessor use. IEEE Transactions on Software Engineering, pages 1146–1170, 2002. Google Scholar
Digital Library
- D. Evans. Static detection of dynamic memory errors. In Proceedings of the Conference on Programming Language Design and Implementation, pages 44–53, 1996. Google Scholar
Digital Library
- R. Just, D. Jalali, L. Inozemtseva, M. Ernst, R. Holmes, and G. Fraser. Are mutants a valid substitute for real faults in software testing? In Proceedings of the 22nd ACM SIGSOFT International Symposium on the Foundations of Software Engineering, pages 654–665, 2014. Google Scholar
Digital Library
- K. Kang, S. Cohen, J. Hess, W. Novak, and A. Peterson. Feature-oriented domain analysis (FODA) feasibility study. Technical report, Carnegie-Mellon University Software Engineering Institute, 1990.Google Scholar
- C. Kästner, P. Giarrusso, T. Rendel, S. Erdweg, K. Ostermann, and T. Berger. Variability-aware parsing in the presence of lexical macros and conditional compilation. In Proceedings of the 17th International Conference on Object Oriented Programming Systems Languages and Applications, pages 805– 824, 2011. Google Scholar
Digital Library
- C. Kästner, S. Apel, T. Thüm, and G. Saake. Type checking annotation-based product lines. Transactions on Software Engineering and Methodology, 21(3):1–39, 2012. Google Scholar
Digital Library
- D. Kuhn, D. Wallace, and A. Gallo. Software fault interactions and implications for software testing. IEEE Transactions on Software Engineering, 30:418–421, 2004. Google Scholar
Digital Library
- F. Medeiros, M. Ribeiro, and R. Gheyi. Investigating preprocessor-based syntax errors. In Proceedings of the 12th International Conference on Generative Programming: Concepts & Experiences, pages 75–84, 2013. Google Scholar
Digital Library
- F. Medeiros, C. Kästner, M. Ribeiro, S. Nadi, and R. Gheyi. The love/hate relationship with the C preprocessor: An interview study. In Proceedings of the 29th European Conference on Object-Oriented Programming, pages 495–518, 2015.Google Scholar
- F. Medeiros, I. Rodrigues, M. Ribeiro, L. Teixeira, and R. Gheyi. An empirical study on configuration-related issues: Investigating undeclared and unused identifiers. In Proceedings of the 15th International Conference on Generative Programming: Concepts and Experiences, pages 35–44, 2015. Google Scholar
Digital Library
- F. Medeiros, C. Kästner, M. Ribeiro, R. Gheyi, and S. Apel. A comparison of 10 sampling algorithms for configurable systems. In Proceedings of the 38th International Conference on Software Engineering, pages 643–654, 2016. Google Scholar
Digital Library
- N. Nethercote and J. Seward. Valgrind: a framework for heavyweight dynamic binary instrumentation. In Proceedings of the 28th Programming Language Design and Implementation, pages 89–100, 2007. Google Scholar
Digital Library
- K. Pohl, G. Bockle, and F. Linden. Software Product Line Engineering: Foundations, Principles and Techniques. Springer-Verlag, 2005. Google Scholar
Digital Library
- X. Qu, M. Acharya, and B. Robinson. Configuration selection using code change impact analysis for regression testing. In Proceedings of the 28th IEEE International Conference on Software Maintenance, pages 129–138. IEEE Computer Society, 2012. Google Scholar
Digital Library
- R. Tartler, D. Lohmann, C. Dietrich, C. Egger, and J. Sincero. Configuration coverage in the analysis of large-scale system software. In Proceedings of the 6th Workshop on Programming Languages and Operating Systems, pages 1–5, 2011. Google Scholar
Digital Library
- X. Yang, Y. Chen, E. Eide, and J. Regehr. Finding and understanding bugs in C compilers. In Proceedings of the 32nd Conference on Programming Language Design and Implementation, pages 283–294, 2011. Google Scholar
Digital Library
Index Terms
A change-centric approach to compile configurable systems with #ifdefs
Recommendations
A change-centric approach to compile configurable systems with #ifdefs
GPCE 2016: Proceedings of the 2016 ACM SIGPLAN International Conference on Generative Programming: Concepts and ExperiencesConfigurable systems typically use #ifdefs to denote variability. Generating and compiling all configurations may be time-consuming. An alternative consists of using variability-aware parsers, such as TypeChef. However, they may not scale. In practice, ...
A change-aware per-file analysis to compile configurable systems with #ifdefs
Highlights- We propose CheckConfigMX, a change-aware tool to compile configurable systems.
- ...
AbstractConfigurable systems typically use #ifdefs to denote variability. Generating and compiling all configurations may be time-consuming. An alternative consists of using variability-aware parsers, such as TypeChef. In practice, compiling ...
An approach to compile configurable systems with #ifdefs based on impact analysis
SPLASH Companion 2016: Companion Proceedings of the 2016 ACM SIGPLAN International Conference on Systems, Programming, Languages and Applications: Software for HumanityConfigurable systems typically use #ifdefs to denote variability. Generating and compiling all configurations may be time-consuming. An alternative consists of using variability-aware parsers, such as TypeChef. However, they may not scale. We propose a ...







Comments