ABSTRACT
Developers use configuration options to tailor systems to different platforms. This configurability leads to exponential configuration spaces and traditional tools (e.g., gcc) check only one configuration at a time. As a result, developers introduce configuration-related issues (i.e., bad smells and faults) that appear only when we select certain configuration options. By interviewing 40 developers and performing a survey with 202 developers, we found that configuration- related issues are harder to detect and more critical than is- sues that appear in all configurations. We propose a strategy to detect configuration-related issues and a catalogue of refactorings to remove bad smells in preprocessor directives. We found 131 faults and 500 bad smells in 40 real-world configurable systems, including Apache and Libssh.
- M. Ernst, G. Badros, and D. Notkin. An empirical analysis of C preprocessor use. IEEE Trans. on Software Engineering, 2002. Google ScholarDigital Library
- 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 OOPSLA. ACM, 2011. Google ScholarDigital Library
- F. Medeiros, M. Ribeiro, and R. Gheyi. Investigating preprocessor-based syntax errors. In Proceedings of GPCE. ACM, 2013. Google ScholarDigital Library
- F. Medeiros, M. Ribeiro, R. Gheyi, and B. Fonseca. A catalogue of refactorings to remove incomplete annotations. Journal of Universal Computer Science, 2014.Google Scholar
- F. Medeiros, C. Kästner, M. Ribeiro, R. Gheyi, and S. Apel. Reasoning about sampling algorithms for configurable systems. Technical Report TR-15-001, Federal University of Campina Grande, 2015.Google Scholar
- 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 ECOOP, 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 GPCE. ACM, 2015. Google ScholarDigital Library
- Research Problem and Motivation Background Approach Results and ContributionsGoogle Scholar
Index Terms
- Safely evolving configurable systems
Recommendations
Safely evolving preprocessor-based configurable systems
ICSE '16: Proceedings of the 38th International Conference on Software Engineering CompanionSince the 70s, the C preprocessor is still widely used in practice in a numbers of projects, including Apache, Linux, and Libssh, to tailor systems to different platforms. To better understand the C preprocessor challenges, we conducted 40 interviews ...
A change-centric approach to compile configurable systems with #ifdefs
GPCE '16Configurable 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, ...
SPLat: lightweight dynamic analysis for reducing combinatorics in testing configurable systems
ESEC/FSE 2013: Proceedings of the 2013 9th Joint Meeting on Foundations of Software EngineeringMany programs can be configured through dynamic and/or static selection of configuration variables. A software product line (SPL), for example, specifies a family of programs where each program is defined by a unique combination of features. ...
Comments