skip to main content
article

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

Published:20 October 2016Publication History
Skip Abstract Section

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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. S. Bohner and A. Robert. Software Change Impact Analysis. Wiley-IEEE Computer Society Press, 1996.Google ScholarGoogle Scholar
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. P. Clements and L. Northrop. Software product lines: Practices and patterns. Addison-Wesley, 2009.Google ScholarGoogle Scholar
  7. M. Ernst, G. Badros, and D. Notkin. An empirical analysis of C preprocessor use. IEEE Transactions on Software Engineering, pages 1146–1170, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. D. Evans. Static detection of dynamic memory errors. In Proceedings of the Conference on Programming Language Design and Implementation, pages 44–53, 1996. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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.Google ScholarGoogle Scholar
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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.Google ScholarGoogle Scholar
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. K. Pohl, G. Bockle, and F. Linden. Software Product Line Engineering: Foundations, Principles and Techniques. Springer-Verlag, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

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

    Recommendations

    Comments

    Login options

    Check if you have access through your login credentials or your institution to get full access on this article.

    Sign in

    Full Access

    • Published in

      cover image ACM SIGPLAN Notices
      ACM SIGPLAN Notices  Volume 52, Issue 3
      GPCE '16
      March 2017
      212 pages
      ISSN:0362-1340
      EISSN:1558-1160
      DOI:10.1145/3093335
      Issue’s Table of Contents
      • 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

      Copyright © 2016 ACM

      Publisher

      Association for Computing Machinery

      New York, NY, United States

      Publication History

      • Published: 20 October 2016

      Check for updates

      Qualifiers

      • article

    PDF Format

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader
    About Cookies On This Site

    We use cookies to ensure that we give you the best experience on our website.

    Learn more

    Got it!