Metrics for analyzing variability and its implementation in software product lines: A systematic literature review

https://doi.org/10.1016/j.infsof.2018.08.015Get rights and content

Abstract

Context: Software Product Line (SPL) development requires at least concepts for variability implementation and variability modeling for deriving products from a product line. These variability implementation concepts are not required for the development of single systems and, thus, are not considered in traditional software engineering. Metrics are well established in traditional software engineering, but existing metrics are typically not applicable to SPLs as they do not address variability management. Over time, various specialized product line metrics have been described in literature, but no systematic description of these metrics and their characteristics is currently available.

Objective: This paper describes and analyzes variability-aware metrics, designed for the needs of software product lines. More precisely we restrict the scope of our study explicitly to metrics designed for variability models, code artifacts, and metrics taking both kinds of artifacts into account. Further, we categorize the purpose for which these metrics were developed. We also analyze to what extent these metrics were evaluated to provide a basis for researchers for selecting adequate metrics.

Method: We conducted a systematic literature review to identify variability-aware implementation metrics. We discovered 42 relevant papers reporting metrics intended to measure aspects of variability models or code artifacts.

Results: We identified 57 variability model metrics, 34 annotation-based code metrics, 46 code metrics specific to composition-based implementation techniques, and 10 metrics integrating information from variability model and code artifacts. For only 31 metrics, an evaluation was performed assessing their suitability to draw any qualitative conclusions.

Conclusions: We observed several problematic issues regarding the definition and the use of the metrics. Researchers and practitioners benefit from the catalog of variability-aware metrics, which is the first of its kind. Also, the research community benefits from the identified observations in order to avoid those problems when defining new metrics.

Introduction

Software Product Line Engineering (SPLE) has been established to minimize costs and efforts, while maximizing the quality of products in a family of software products [1]. This requires additional implementation concepts to manage variability and to facilitate the derivation of individual products based on a common platform. These concepts are the variability model and the variation points, i.e., elements in code, which describe the point of impact of a variation in an artifact. Both concepts are not required for the development of single systems and, thus, are not considered in traditional software engineering. At the same time, this is the minimum information required to realize a product line and is thus often considered jointly.

In software engineering, software metrics are an established approach to characterize properties of software, for instance, [2] and [3] are two well-cited publications from academia and industry dealing with the application of metrics in software engineering. However, while they are well-analyzed and surveyed for systems without variability, there is currently no broad characterization of variability management concepts of SPLs.

Here, we present a systematic literature review to identify and characterize variability-aware metrics designed for the needs of SPLs. Our study aims at identifying existing metrics as a basis to draw qualitative conclusions on implementation properties of product lines. We include variability model metrics, because they are linked to all levels of product line realization, including implementation. Thus, we focus only on variability model metrics and code metrics that take variation points into account to characterize product line implementation. We explicitly exclude metrics for requirements, architecture, and testing to focus our research. We pursue the following research questions:

  • RQ1 Which metrics have been defined for variability models and implementation artifacts of SPLs?

    • RQ1.1 Which metrics have been defined for variability models?

    • RQ1.2 Which metrics have been defined for code artifacts, which consider variability?

    • RQ1.3 Which metrics have been defined, which combine information of the variability model and variability of code artifacts?

Besides the mere description of variability metrics, we also want to understand to what extent the metrics have been used to derive qualitative characterizations of software product lines.

  • RQ2 Which correlations between these measures and quality characteristics of product lines have been studied?

    • RQ2.1 Which correlations have been studied?

    • RQ2.2 Which methods and examples have been used to determine the validity of the correlations?

    • RQ2.3 Which correlations could be successfully demonstrated?

In summary, the main contributions of this study are1:

  • We present a systematic literature review performed in early 2017 to identify the state of the art of implementation-related metrics for software product lines. This literature review comprises peer-reviewed articles of the last 10 years (2007–2016).

  • We present a catalog of variability-aware metrics for software product lines. This comprises metrics for variability models, code artifacts, and metrics measuring both artifact types. This catalog provides an overview of metrics, which are available in this domain, but we also identify open issues for the research community.

  • We analyze to what extent these metrics have been evaluated to show their ability to draw conclusions about qualitative aspects of the analyzed artifacts. Only 53 metrics ( ≈  36%) have been evaluated in 14 out of 42 identified papers.

This paper is structured as follows: In the following section, we present related work. Section 3 provides an overview about required background. Section 4 presents our search strategy to identify relevant work. In Sections 5 – 8, we answer RQ1 by presenting the identified metrics. These metrics are structured according to the measured artifact types: variability models, code artifacts (separated into annotative approaches for handling negative variability and metrics specific to compositional approaches, for handling positive variability), and metrics measuring both artifact types. Afterwards, we analyze the quality of the identified papers in Section 9. First, we answer RQ2 by analyzing to what extent evaluations have been applied to prove their ability to serve as a basis to draw conclusions about qualitative aspects of the analyzed artifacts in Section 9.1. Subsequently, we discuss some key findings regarding the definition of the metrics in Section 9.2. We report the limitations of our study in Section 10 and our conclusions in Section 11.

Section snippets

Related work

Systematic literature reviews and mapping studies are established practice in software engineering to aggregate research results [5]. Marimuthu and Chandrasekaran list 60 studies in the area of software product lines [6]. However, there exist only very little work on measures and their evaluation of product line artifacts. More precisely, we know only three surveys, which are relevant for this work.

Bezerra et al. [7] survey measures for feature models. The authors provide a categorization of

Background

Software Product Line Engineering (SPLE) has been established to minimize costs and efforts, while maximizing the quality of products in a family of software products [1]. This is achieved by means of highly configurable software to avoid opportunistic reuse and clone-and-own principles, which drastically increase the maintenance effort. We look at variability management from the perspective of implementation; as a consequence variability modeling and variability implementation are the most

Research method

The primary goal of this study is to provide an overview of variability-aware implementation metrics for software product lines. We followed the guidelines given by Kitchenham et al. [20], [21]. This section presents the steps followed in this study.

Variability model metrics

In this section, we present metrics for variability models of software product lines. We start in Section 5.1 with modifiers, which may be used to adapt metrics to change the elements of interest. In Section 5.2, we introduce the simplest metrics: size metrics. These metrics are used to measure different aspects of the size of a variability model. Section 5.3 presents complexity metrics and ratios based on the aforementioned metrics. In Section 5.4, we introduce metrics applied to single

Metrics for annotation-based code

In this section, we present code metrics for software product lines for annotation-based implementation techniques. In the next section, we present code metrics, which are explicitly designed for composition-based implementation techniques, i.e., feature-oriented programming and aspectization. Both sections answer research question RQ1.2. Contrary to Section 8, we list here pure code metrics only. These metrics do not take any information of the variability model into account, like the

Metrics for composition-based code

This section presents code metrics for composition-based code, like feature-oriented programming and aspectization. These approaches serve as modularization techniques as they allow an independent development of a basic implementation and feature-specific extensions. We do not differentiate between feature-oriented approaches and aspect-oriented programming as most of the metrics can conceptually be applied to any concrete implementation technique. However, we explicitly name measured elements

Mixed metrics

Here, we present metrics, which integrate information from variability model and code artifacts. This section is not subdivided as the previous metric sections, since we identified only ten metrics published in three papers.

Literature assessment

Here, we provide a qualitative analysis of the studied papers. First, we answer RQ2 in Section 9.1 before discussing some findings regarding the definition of the metrics in Section 9.2.

Study limitations

A major problem of systematic literature reviews is finding all relevant studies. We used an automated search in ACM’s “guide to computing literature”, which covers also work published by other scientific publishers in computing. Nonetheless, this database may not contain a complete list of papers of other publishers. We also included results of a second automated search in the database of ScienceDirect to be able to estimate the criticality of missing relevant papers and to minimize this

Concluding remarks

In this paper, we presented the results of our systematic literature review to identify variability-aware implementation metrics, designed for the needs of SPLs. This literature study covered peer-reviewed work from the last decade in product line engineering. We identified variability model metrics (RQ1.1), code metrics considering variation points (RQ1.2), and also some metrics combining the information of the variability model with variability detected in code artifacts (RQ1.3). With our

Acknowledgments

This work is partially supported by the ITEA3 project REVaMP2, funded by the BMBF (German Ministry of Research and Education) under grant 01IS16042H. Any opinions expressed herein are solely by the authors and not of the BMBF.

References (75)

  • C.I.M. Bezerra et al.

    Measures for quality evaluation of feature models

    14th International Conference on Software Reuse

    (2015)
  • S. Montagud et al.

    A systematic review of quality attributes and measures for software product lines

    Softw. Qual. J.

    (2012)
  • S. Montagud et al.

    Gathering current knowledge about quality evaluation in software product lines

    13th International Software Product Line Conference

    (2009)
  • R. Abílio et al.

    Detecting code smells in software product lines – an exploratory study

    12th International Conference on Information Technology – New Generations

    (2015)
  • T. Berger et al.

    A study of variability models and languages in the systems software domain

    IEEE Trans. Software Eng.

    (2013)
  • K.C. Kang et al.

    Feature-oriented domain analysis (FODA) feasibility study

    Technical Report

    (1990)
  • Kconfig language specification, 2018, Last visited...
  • J. Dallaway, The eCos component writer’s guide, 2000, Last visited...
  • S. Apel et al.

    Feature-oriented software product lines

    (2013)
  • The C preprocessor, 2018, Last visited...
  • D. Batory

    A tutorial on feature oriented programming and the AHEAD tool suite

    2005 International Conference on Generative and Transformational Techniques in Software Engineering

    (2006)
  • I. Schaefer et al.

    Delta-oriented programming of software product lines

  • B. Kitchenham

    Procedures for performing systematic reviews

    Joint Technical Report

    (2004)
  • B. Kitchenham et al.

    Evidence-based software engineering and systematic reviews

    (2016)
  • G. Vale et al.

    Bad smells in software product lines: A systematic review

    2014 Eighth Brazilian Symposium on Software Components, Architectures and Reuse

    (2014)
  • C. Wohlin

    Guidelines for snowballing in systematic literature studies and a replication in software engineering

    18th International Conference on Evaluation and Assessment in Software Engineering

    (2014)
  • S. She et al.

    The variability model of the linux kernel

    VaMoS ’10

    (2010)
  • M. Mendonca et al.

    S.P.L.O.T.: Software product lines online tools

    24th ACM SIGPLAN Conference Companion on Object Oriented Programming Systems Languages and Applications

    (2009)
  • G. Ferreira et al.

    Do #ifdefs influence the occurrence of vulnerabilities? An empirical study of the linux kernel

    20th International Systems and Software Product Line Conference

    (2016)
  • B. Zhang et al.

    Variability evolution and erosion in industrial product lines: A case study

    17th International Software Product Line Conference

    (2013)
  • J. Liebig et al.

    An analysis of the variability in forty preprocessor-based software product lines

    32nd ACM/IEEE International Conference on Software Engineering – Volume 1

    (2010)
  • T. Berger et al.

    Towards system analysis with variability model metrics

    8th International Workshop on Variability Modelling of Software-Intensive Systems

    (2014)
  • L. Passos et al.

    A study of non-boolean constraints in variability models of an embedded operating system

    15th International Software Product Line Conference, Volume 2

    (2011)
  • W. Zhang et al.

    A propositional logic-based method for verification of feature models

    International Conference on Formal Engineering Methods

    (2004)
  • S. Mann et al.

    Control variant-rich models by variability measures

    5th International Workshop on Variability Modelling of Software-Intensive Systems

    (2011)
  • E. Bagheri et al.

    Assessing the maintainability of software product line feature models using structural metrics

    Softw. Qual. J.

    (2011)
  • C.I.M. Bezerra et al.

    Dymmer: A measurement-based tool to support quality evaluation of dspl feature models

    20th International Systems and Software Product Line Conference

    (2016)
  • Cited by (57)

    • Automating Feature Model maintainability evaluation using machine learning techniques

      2023, Journal of Systems and Software
      Citation Excerpt :

      The analysis considers the correlations between the 15 FM maintainability measures and the importance of each measure for a set of ML models. El-Sharkawy et al. (2019b) carried out a systematic literature review to identify measures of SPL variability. The authors analyzed 42 papers in which 52 measures for variability models were identified, 80 for code artifacts and 10 for both artifacts.

    • Combining multiple granularity variability in a software product line approach for web engineering

      2022, Information and Software Technology
      Citation Excerpt :

      Particularly, the main reasons to exclude metrics from our evaluation were: (1) they are language-related, this is, their calculation is based on elements that exist on a specific object-oriented language, usually Java, and that do not make sense in other languages such as HTML or JavaScript (e.g., aspect size, lack of cohesion in methods or class fragmentation); (2) they do not make sense with both our approaches, this is, we are trying to compare an annotation-based approach with our combined approach so the metric should work for both (e.g., number of refinements); and (3) they are not affected by the new approach, this is, the result of the metric is the same independently of the approach (e.g., cross tree-constraints ratio or number of valid configurations). The selected metrics are shown in Table 3, being most of them from the groups composition and annotation-based code [19], since metrics from the other two groups, variability model and mixed, were omitted for the given reasons. The metrics mostly show the difference between the approaches related to the percentage of the code which is in fact annotated, being counting lines of code (LOC), files or components.

    • Spreadsheet-based Configuration of Families of Real-Time Specifications

      2023, Electronic Proceedings in Theoretical Computer Science, EPTCS
    View all citing articles on Scopus
    View full text