skip to main content
10.1145/2993236.2993250acmconferencesArticle/Chapter ViewAbstractPublication PagesgpceConference Proceedingsconference-collections
research-article

A change-centric approach to compile configurable systems with #ifdefs

Published: 20 October 2016 Publication History

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.

References

[1]
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.
[2]
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.
[3]
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.
[4]
S. Bohner and A. Robert. Software Change Impact Analysis. Wiley-IEEE Computer Society Press, 1996.
[5]
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.
[6]
P. Clements and L. Northrop. Software product lines: Practices and patterns. Addison-Wesley, 2009.
[7]
M. Ernst, G. Badros, and D. Notkin. An empirical analysis of C preprocessor use. IEEE Transactions on Software Engineering, pages 1146–1170, 2002.
[8]
D. Evans. Static detection of dynamic memory errors. In Proceedings of the Conference on Programming Language Design and Implementation, pages 44–53, 1996.
[9]
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.
[10]
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.
[11]
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.
[12]
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.
[13]
D. Kuhn, D. Wallace, and A. Gallo. Software fault interactions and implications for software testing. IEEE Transactions on Software Engineering, 30:418–421, 2004.
[14]
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.
[15]
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.
[16]
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.
[17]
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.
[18]
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.
[19]
K. Pohl, G. Bockle, and F. Linden. Software Product Line Engineering: Foundations, Principles and Techniques. Springer-Verlag, 2005.
[20]
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.
[21]
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.
[22]
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.

Cited By

View all
  • (2024)Evaluating the Capability of LLMs in Identifying Compilation Errors in Configurable SystemsAnais do XXXVIII Simpósio Brasileiro de Engenharia de Software (SBES 2024)10.5753/sbes.2024.3560(574-580)Online publication date: 30-Sep-2024
  • (2024)Investigating LLM Capabilities in the Identification of Compilation Errors in Configurable SystemsAnais Estendidos do XV Congresso Brasileiro de Software: Teoria e Prática (CBSoft Estendido 2024)10.5753/cbsoft_estendido.2024.4055(39-48)Online publication date: 30-Sep-2024
  • (2020)An Empirical Study on Configuration-Related Code WeaknessesProceedings of the XXXIV Brazilian Symposium on Software Engineering10.1145/3422392.3422409(193-202)Online publication date: 21-Oct-2020
  • Show More Cited By

Index Terms

  1. A change-centric approach to compile configurable systems with #ifdefs

    Recommendations

    Comments

    Information & Contributors

    Information

    Published In

    cover image ACM Conferences
    GPCE 2016: Proceedings of the 2016 ACM SIGPLAN International Conference on Generative Programming: Concepts and Experiences
    October 2016
    212 pages
    ISBN:9781450344463
    DOI:10.1145/2993236
    Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

    Sponsors

    Publisher

    Association for Computing Machinery

    New York, NY, United States

    Publication History

    Published: 20 October 2016

    Permissions

    Request permissions for this article.

    Check for updates

    Author Tags

    1. #ifdefs
    2. Configurable Systems
    3. compilation errors

    Qualifiers

    • Research-article

    Funding Sources

    Conference

    GPCE '16
    Sponsor:
    GPCE '16: Generative Programming: Concepts and Experiences
    October 31 - November 1, 2016
    Amsterdam, Netherlands

    Acceptance Rates

    Overall Acceptance Rate 56 of 180 submissions, 31%

    Contributors

    Other Metrics

    Bibliometrics & Citations

    Bibliometrics

    Article Metrics

    • Downloads (Last 12 months)6
    • Downloads (Last 6 weeks)0
    Reflects downloads up to 03 Mar 2025

    Other Metrics

    Citations

    Cited By

    View all
    • (2024)Evaluating the Capability of LLMs in Identifying Compilation Errors in Configurable SystemsAnais do XXXVIII Simpósio Brasileiro de Engenharia de Software (SBES 2024)10.5753/sbes.2024.3560(574-580)Online publication date: 30-Sep-2024
    • (2024)Investigating LLM Capabilities in the Identification of Compilation Errors in Configurable SystemsAnais Estendidos do XV Congresso Brasileiro de Software: Teoria e Prática (CBSoft Estendido 2024)10.5753/cbsoft_estendido.2024.4055(39-48)Online publication date: 30-Sep-2024
    • (2020)An Empirical Study on Configuration-Related Code WeaknessesProceedings of the XXXIV Brazilian Symposium on Software Engineering10.1145/3422392.3422409(193-202)Online publication date: 21-Oct-2020
    • (2018)A Qualitative Analysis of Variability Weaknesses in Configurable Systems with #ifdefsProceedings of the 12th International Workshop on Variability Modelling of Software-Intensive Systems10.1145/3168365.3168382(51-58)Online publication date: 7-Feb-2018
    • (2018)Equivalent Mutants in Configurable SystemsProceedings of the 12th International Workshop on Variability Modelling of Software-Intensive Systems10.1145/3168365.3168379(11-18)Online publication date: 7-Feb-2018
    • (2017)The discipline of preprocessor-based annotations does #ifdef TAG n't #endif matterProceedings of the 25th International Conference on Program Comprehension10.1109/ICPC.2017.41(297-307)Online publication date: 20-May-2017
    • (2017)DynSGX: A Privacy Preserving Toolset for Dinamically Loading Functions into Intel(R) SGX Enclaves2017 IEEE International Conference on Cloud Computing Technology and Science (CloudCom)10.1109/CloudCom.2017.42(314-321)Online publication date: Dec-2017
    • (2019)Partially safe evolution of software product linesJournal of Systems and Software10.1016/j.jss.2019.04.051155:C(17-42)Online publication date: 1-Sep-2019

    View Options

    Login options

    View options

    PDF

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader

    Figures

    Tables

    Media

    Share

    Share

    Share this Publication link

    Share on social media