Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
10.1145/3336294.3336296acmotherconferencesArticle/Chapter ViewAbstractPublication PagessplcConference Proceedingsconference-collections
research-article

Covert and Phantom Features in Annotations: Do They Impact Variability Analysis?

Published: 09 September 2019 Publication History

Abstract

The annotation-based variability of the C preprocessor (CPP) has a bad reputation regarding comprehensibility and maintainability of software systems, but is widely adopted in practice. To assess the complexity of such systems' variability, several analysis techniques and metrics have been proposed in scientific communities. While most metrics seem reasonable at first glance, they do not generalize over all possible usages of C preprocessor variability that appear in practice. Consequently, some analyses may neglect the actual complexity of variability in these systems and may not properly reflect the real situation. In this paper, we investigate two types of variation points, namely negating and #else directives, to which we refer to as corner cases, as they are seldom explicitly considered in research. To investigate these directives, we rely on three commonly used metrics: lines of feature code, scattering degree, and tangling degree. We (1) describe how the considered directives impact these metrics, (2) unveil the resulting differences within 19 systems, and (3) propose how to address the arising issues. The results show that the corner cases appear regularly in variable feature code and can heavily change the results obtained with established metrics. We argue that we need to refine metrics and improve variability analysis techniques to provide more precise results, but we also need to reason about the meaning of corner cases and metrics.

References

[1]
Mathieu Acher, Benoit Baudry, Patrick Heymans, Anthony Cleve, and Jean-Luc Hainaut. 2013. Support for Reverse Engineering and Maintaining Feature Models. In International Workshop on Variability Modelling of Software-Intensive Systems (VaMoS). ACM, 20:1--20:8.
[2]
Nele Andersen, Krzysztof Czarnecki, Steven She, and Andrzej Wąsowski. 2012. Efficient Synthesis of Feature Models. In International Software Product Line Conference (SPLC). ACM, 106--115.
[3]
Sven Apel, Don Batory, Christian Kästner, and Gunter Saake. 2016. Feature-Oriented Software Product Lines. Springer.
[4]
Benjamin Behringer, Jochen Palz, and Thorsten Berger. 2017. PEoPL: Projectional Editing of Product Lines. In International Conference on Software Engineering (ICSE). IEEE, 563--574.
[5]
Frank DeRemer. 1969. Practical Translators for LR(k) Languages. Ph.D. Dissertation. Massachusetts Institute of Technology.
[6]
Sascha El-Sharkawy, Nozomi Yamagishi-Eichler, and Klaus Schmid. 2019. Metrics for Analyzing Variability and Its Implementation in Software Product Lines: A Systematic Literature Review. Information and Software Technology 106 (2019), 1--30.
[7]
Janet Feigenspan, Christian Kästner, Sven Apel, Jörg Liebig, Michael Schulze, Raimund Dachselt, Maria Papendieck, Thomas Leich, and Gunter Saake. 2013. Do Background Colors Improve Program Comprehension in the #ifdef Hell? Empirical Software Engineering 18, 4 (2013), 699--745.
[8]
Janet Feigenspan, Michael Schulze, Maria Papendieck, Christian Kästner, Raimund Dachselt, Veit Köppen, and Mathias Frisch. 2011. Using Background Colors to Support Program Comprehension in Software Product Lines. In Annual Conference on Evaluation & Assessment in Software Engineering (EASE). IET, 66--75.
[9]
Wolfram Fenske, Sandro Schulze, and Gunter Saake. 2017. How Preprocessor Annotations (Do Not) Affect Maintainability: A Case Study on Change-Proneness. In International Conference on Generative Programming: Concepts and Experiences (GPCE). ACM, 77--90.
[10]
Norman Fenton and James Bieman. 2014. Software Metrics: A Rigorous and Practical Approach. CRC Press.
[11]
Cristina Gacek and Michalis Anastasopoules. 2001. Implementing Product Line Variabilities. ACM SIGSOFT Software Engineering Notes 26, 3 (2001), 109--117.
[12]
Paul Gazzillo and Robert Grimm. 2012. SuperC: Parsing All of C by Taming the Preprocessor. In Conference on Programming Language Design and Implementation (PLDI). ACM, 323--334.
[13]
Claus Hunsen, Bo Zhang, Janet Siegmund, Christian Kästner, Olaf Leßenich, Martin Becker, and Sven Apel. 2016. Preprocessor-Based Variability in Open-Source and Industrial Software Systems: An Empirical Study. Empirical Software Engineering 21, 2 (2016), 449--482.
[14]
ISO/IEC. 2011. Programming Languages-C. Technical Report ISO/IEC 9899:201x. International Standards Organization.
[15]
Christian Kästner. 2010. Virtual Separation of Concerns. Ph.D. Dissertation. Otto-von-Guericke University.
[16]
Christian Kästner and Sven Apel. 2009. Virtual Separation of Concerns - A Second Chance for Preprocessors. Journal of Object Technology 8, 6 (2009), 59--78.
[17]
Christian Kästner, Sven Apel, and Martin Kuhlemann. 2009. A Model of Refactoring Physically and Virtually Separated Features. SIGPLAN Notices 45, 2 (2009), 157--166.
[18]
Christian Kästner, Paolo G. Giarrusso, Tillmann Rendel, Sebastian Erdweg, Klaus Ostermann, and Thorsten Berger. 2011. Variability-Aware Parsing in the Presence of Lexical Macros and Conditional Compilation. In International Conference on Object Oriented Programming Systems Languages and Applications (OOPSLA). ACM, 805--824.
[19]
Andy Kenner, Christian Kästner, Steffen Haase, and Thomas Leich. 2010. Type-Chef: Toward Type Checking #Ifdef Variability in C. In International Workshop on Feature-Oriented Software Development (FOSD). ACM, 25--32.
[20]
Brian W. Kernighan and Dennis M. Ritchie. 1988. The C Programming Language. Prentice Hall.
[21]
Sebastian Krieter, Jacob Krüger, and Thomas Leich. 2018. Don't Worry About It: Managing Variability On-The-Fly. In International Workshop on Variability Modelling of Software-Intensive Systems (VaMoS). ACM, 19--26.
[22]
Christian Kröher, Sascha El-Sharkawy, and Klaus Schmid. 2018. KernelHaven: An Open Infrastructure for Product Line Analysis. In International Systems and Software Product Line Conference (SPLC). ACM, 5--10.
[23]
Jacob Krüger, Wanzi Gu, Hui Shen, Mukelabai Mukelabai, Regina Hebig, and Thorsten Berger. 2018. Towards a Better Understanding of Software Features and Their Characteristics: A Case Study of Marlin. In International Workshop on Variability Modelling of Software-Intensive Systems (VaMoS). ACM, 105--112.
[24]
Jacob Krüger, Kai Ludwig, Bernhard Zimmermann, and Thomas Leich. 2018. Physical Separation of Features: A Survey with CPP Developers. In Symposium On Applied Computing (SAC). ACM, 2044--2052.
[25]
Jacob Krüger, Marcus Pinnecke, Andy Kenner, Christopher Kruczek, Fabian Benduhn, Thomas Leich, and Gunter Saake. 2018. Composing Annotations Without Regret? Practical Experiences Using FeatureC. Software: Practice and Experience 48, 3 (2018), 402--427.
[26]
Jacob Krüger, Ivonne SchrÖter, Andy Kenner, Christopher Kruczek, and Thomas Leich. 2016. FeatureCoPP: Compositional Annotations. In International Workshop on Feature-Oriented Software Development (FOSD). ACM, 74--84.
[27]
Elias Kuiter, Sebastian Krieter, Jacob Krüger, Kai Ludwig, Thomas Leich, and Gunter Saake. 2018. PClocator: A Tool Suite to Automatically Identify Configurations for Code Locations. In International Systems and Software Product Line Conference (SPLC). ACM, 284--288.
[28]
Duc Le, Eric Walkingshaw, and Martin Erwig. 2011. #ifdef Confirmed Harmful: Promoting Understandable Software Variation. In Visual Languages and Human-Centric Computing (VL/HCC). IEEE, 143--150.
[29]
Jorg Liebig, Sven Apel, Christian Lengauer, Christian Kästner, and Michael Schulze. 2010. An Analysis of the Variability in Forty Preprocessor-Based Software Product Lines. In International Conference on Software Engineering (ICSE). IEEE, 105--114.
[30]
Jörg Liebig, Christian Kästner, and Sven Apel. 2011. Analyzing the Discipline of Preprocessor Annotations in 30 Million Lines of C Code. In Conference on Aspect-Oriented Software Development (AOSD). ACM, 191--202.
[31]
Max Lillack, Christian Kästner, and Eric Bodden. 2017. Tracking Load-Time Configuration Options. IEEE Transactions on Software Engineering 44, 12 (2017), 1269--1291.
[32]
Flávio Medeiros, Christian Kästner, Márcio Ribeiro, Sarah Nadi, and Rohit Gheyi. 2015. TheLove/Hate Relationship with the C Preprocessor: An Interview Study. In European Conference on Object-Oriented Programming (ECOOP). Schloss Dagstuhl-Leibniz-Zentrum fuer Informatik, 495--518.
[33]
Flávio Medeiros, Márcio Ribeiro, Rohit Gheyi, Sven Apel, Christian Kästner, Bruno Ferreira, Luiz Carvalho, and Baldoino Fonseca. 2018. Discipline Matters: Refactoring of Preprocessor Directives in the #ifdef Hell. IEEE Transactions on Software Engineering 44, 5 (2018), 453--469.
[34]
Jens Meinicke, Thomas Thüm, Reimar Schröter, Fabian Benduhn, and Gunter Saake. 2014. An Overview on Analysis Tools for Software Product Lines. In International Software Product Line Conference (SPLC). ACM, 94--101.
[35]
Mukelabai Mukelabai, Benjamin Behringer, Moritz Fey, Jochen Palz, Jacob Krüger, and Thorsten Berger. 2018. Multi-View Editing of Software Product Lines with PEoPL. In International Conference on Software Engineering (ICSE). ACM, 81--84.
[36]
Sarah Nadi, Thorsten Berger, Christian Kästner, and Krzysztof Czarnecki. 2014. Mining Configuration Constraints: Static Analyses and Empirical Results. In International Conference on Software Engineering (ICSE). ACM, 140--151.
[37]
Sarah Nadi, Thorsten Berger, Christian Kästner, and Krzysztof Czarnecki. 2015. Where do Configuration Constraints Stem From? An Extraction Approach and an Empirical Study. IEEE Transactions on Software Engineering 41, 8 (2015), 820--841.
[38]
Dewayne E Perry, Adam A Porter, and Lawrence G Votta. 2000. Empirical Studies of Software Engineering: A Roadmap. In International Conference on on Software Engineering - Future of Software Engineering Track (ICSE). ACM, 345--355.
[39]
Klaus Pohl, Günter Böckle, and Frank J. van Der Linden. 2005. Software Product Line Engineering: Foundations, Principles and Techniques. Springer.
[40]
Rodrigo Queiroz, Leonardo Passos, Marco Tulio Valente, Claus Hunsen, Sven Apel, and Krzysztof Czarnecki. 2017. The Shape of Feature Code: An Analysis of Twenty C-Preprocessor-Based Systems. Software & Systems Modeling 16, 1 (2017), 77--96.
[41]
Jarrett Rosenberg. 1997. Some Misconceptions About Lines of Code. In International Software Metrics Symposium (METRIC). IEEE, 137--142.
[42]
Francesca Rossi, Peter Van Beek, and Toby Walsh. 2006. Handbook of Constraint Programming. Elsevier.
[43]
Sandro Schulze, Jörg Liebig, Janet Siegmund, and Sven Apel. 2013. Does the Discipline of Preprocessor Annotations Matter?: A Controlled Experiment. In International Conference on Generative Programming: Concepts & Experiences (GPCE). ACM, 65--74.
[44]
Steven She, Rafael Lotufo, Thorsten Berger, Andrzej Wąsowski, and Krzysztof Czarnecki. 2011. Reverse Engineering Feature Models. In International Conference on Software Engineering (ICSE). ACM, 461--470.
[45]
Janet Siegmund, Christian Kästner, Jörg Liebig, and Sven Apel. 2012. Comparing Program Comprehension of Physically and Virtually Separated Concerns. In International Workshop on Feature-Oriented Software Development (FOSD). ACM, 17--24.
[46]
Julio Sincero, Reinhard Tartler, Daniel Lohmann, and Wolfgang Schröder-Preikschat. 2010. Efficient Extraction and Analysis of Preprocessor-based Variability. In International Conference on Generative Programming and Component Engineering (GPCE). ACM, 33--42.
[47]
Henry Spencer. 1992. #ifdef Considered Harmful, or Portability Experience with C News. In USENIX Conference. 185--197.
[48]
Reinhard Tartler, Daniel Lohmann, Julio Sincero, and Wolfgang Schröder-Preikschat. 2011. Feature Consistency in Compile-Time-Configurable System Software: Facing the Linux 10,000 Feature Problem. In European Conference on Computer Systems (EuroSys). ACM, 47--60.
[49]
Markus Voelter. 2010. Implementing Feature Variability for Models and Code with Projectional Language Workbenches. In International Workshop on Feature-Oriented Software Development (FOSD). ACM, 41--48.
[50]
Claes Wohlin, Per Runeson, Martin Höst, Magnus C Ohlsson, Björn Regnell, and Anders Wesslén. 2012. Experimentation in Software Engineering. Springer.

Cited By

View all
  • (2024)Feature-oriented test case selection and prioritization during the evolution of highly-configurable systemsJournal of Systems and Software10.1016/j.jss.2024.112157217(112157)Online publication date: Nov-2024
  • (2023)Feature-oriented Test Case Selection during Evolution of Highly-Configurable SystemsProceedings of the 27th ACM International Systems and Software Product Line Conference - Volume A10.1145/3579027.3608979(76-86)Online publication date: 28-Aug-2023
  • (2023)Evolutionary Feature Dependencies: Analyzing Feature Co-Changes in C Systems2023 IEEE 23rd International Working Conference on Source Code Analysis and Manipulation (SCAM)10.1109/SCAM59687.2023.00019(84-95)Online publication date: 2-Oct-2023
  • Show More Cited By

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Other conferences
SPLC '19: Proceedings of the 23rd International Systems and Software Product Line Conference - Volume A
September 2019
356 pages
ISBN:9781450371384
DOI:10.1145/3336294
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 the author(s) 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].

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 09 September 2019

Permissions

Request permissions for this article.

Check for updates

Badges

Author Tags

  1. empirical study
  2. preprocessor
  3. software metrics
  4. software product lines
  5. variability analysis

Qualifiers

  • Research-article

Funding Sources

Conference

SPLC 2019

Acceptance Rates

Overall Acceptance Rate 167 of 463 submissions, 36%

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)3
  • Downloads (Last 6 weeks)2
Reflects downloads up to 15 Oct 2024

Other Metrics

Citations

Cited By

View all
  • (2024)Feature-oriented test case selection and prioritization during the evolution of highly-configurable systemsJournal of Systems and Software10.1016/j.jss.2024.112157217(112157)Online publication date: Nov-2024
  • (2023)Feature-oriented Test Case Selection during Evolution of Highly-Configurable SystemsProceedings of the 27th ACM International Systems and Software Product Line Conference - Volume A10.1145/3579027.3608979(76-86)Online publication date: 28-Aug-2023
  • (2023)Evolutionary Feature Dependencies: Analyzing Feature Co-Changes in C Systems2023 IEEE 23rd International Working Conference on Source Code Analysis and Manipulation (SCAM)10.1109/SCAM59687.2023.00019(84-95)Online publication date: 2-Oct-2023
  • (2023)Analysis and Propagation of Feature Revisions in Preprocessor-based Software Product Lines2023 IEEE International Conference on Software Analysis, Evolution and Reengineering (SANER)10.1109/SANER56733.2023.00035(284-295)Online publication date: Mar-2023
  • (2022)Test2FeatureProceedings of the 26th ACM International Systems and Software Product Line Conference - Volume B10.1145/3503229.3547031(62-65)Online publication date: 12-Sep-2022
  • (2021)The life cycle of features in highly-configurable software systems evolving in space and timeProceedings of the 20th ACM SIGPLAN International Conference on Generative Programming: Concepts and Experiences10.1145/3486609.3487195(2-15)Online publication date: 17-Oct-2021
  • (2021)Iterative development and changing requirementsProceedings of the 25th ACM International Systems and Software Product Line Conference - Volume B10.1145/3461002.3473950(113-122)Online publication date: 6-Sep-2021
  • (2020)Evolving System Families in Space and TimeProceedings of the 24th ACM International Systems and Software Product Line Conference - Volume B10.1145/3382026.3431252(104-111)Online publication date: 19-Oct-2020
  • (2020)FeatureCoPPProceedings of the 14th International Working Conference on Variability Modelling of Software-Intensive Systems10.1145/3377024.3377039(1-9)Online publication date: 5-Feb-2020
  • (2020)#ifdef Directives and Program Comprehension: The Dilemma between Correctness and Preference2020 IEEE International Conference on Software Maintenance and Evolution (ICSME)10.1109/ICSME46990.2020.00033(255-266)Online publication date: Sep-2020

View Options

Get Access

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media