Elsevier

Computer Networks

Volume 51, Issue 2, 7 February 2007, Pages 456-479
Computer Networks

Generic semantics of feature diagrams

https://doi.org/10.1016/j.comnet.2006.08.008Get rights and content

Abstract

Feature Diagrams (FDs) are a family of popular modelling languages used to address the feature interaction problem, particularly in software product lines, FDs were first introduced by Kang as part of the FODA (Feature-Oriented Domain Analysis) method back in 1990. Afterwards, various extensions of FODA FDs were introduced to compensate for a purported ambiguity and lack of precision and expressiveness. However, they never received a formal semantics, which is the hallmark of precision and unambiguity and a prerequisite for efficient and safe tool automation.

The reported work is intended to contribute a more rigorous approach to the definition, understanding, evaluation, selection and implementation of FD languages. First, we provide a survey of FD variants. Then, we give them a formal semantics, thanks to a generic construction that we call Free Feature Diagrams (FFDs). This demonstrates that FDs can be precise and unambiguous. This also defines their expressiveness. Many variants are expressively complete, and thus the endless quest for extensions actually cannot be justified by expressiveness. A finer notion is thus needed to compare these expressively complete languages. Two solutions are well-established: succinctness and embeddability, that express the naturalness of a language. We show that the expressively complete FDs fall into two succinctness classes, of which we of course recommend the most succinct. Among the succinct expressively complete languages, we suggest a new, simple one that is not harmfully redundant: Varied FD (VFD). Finally, we study the execution time that tools will need to solve useful problems in these languages.

Introduction

Features have been defined as “a distinguishable characteristic of a concept (e.g., system, component and so on) that is relevant to some stakeholder of the concept” [9]. This broad definition encompasses most commonly used meanings, for example: new services or options added to an existing base system.

The description of systems in terms of features is popular in many domains such as telecommunication or embedded systems. Features are not used for one-shot developments, but for systems that must have multiple incarnations because (1) they need to evolve through time or (2) variants must be deployed in many contexts. A typical example of the former are telephony systems which, to face harsh competition, need to adapt quickly to satisfy demand. An example of the second are product lines (also known as product families) in domains such as home appliances or the automotive industry.

Two perspectives are used in turn:

  • When the base system (or system family) is conceived, features are “units of evolution” (or change) that adapt it to an optional user requirement [12]. A recurrent problem is the one of feature interaction: adding new features may modify the operation of already implemented ones. When this modification is undesirable, it is called a feature interference. This problem is difficult because “individual features do not typically trace directly to an individual component” [15]. With the increasing size and complexity of current systems and associated product lines, dealing with feature interaction becomes challenging. To guarantee that systems will deliver the desirable behaviour, interactions must be detected, resolved if possible, or the combination of features must be forbidden.

  • When a specific system (or family member or product) must be designed, “[the] product is defined by selecting a group of features, [for which] a carefully coordinated and complicated mixture of parts of different components are involved” [15]. Hence, it is essential that features and their interactions be well-identified. This knowledge about their valid and forbidden combinations must be packaged in a form that is usable by the customers selecting their options, and by the engineers deploying them.

In software product lines, the former activity is often referred to as domain engineering and the second as application engineering [5], [26].

To express the knowledge about allowed feature combinations, practitioners use feature diagrams (FDs). FDs are an essential means of communication between domain and application engineers as well as customers and other stakeholders such as marketing representatives, managers, etc. In particular, FDs play an essential role during requirements engineering [26], which is known to be the most critical phase of software development. FDs provide a concise and explicit way to:

  • describe allowed variabilities between products of the same line/family,

  • represent feature dependencies,

  • guide the selection of features allowing the construction of a specific product,

  • facilitate the reuse and the evolution of software components implementing these features.

These benefits of FD notations are deemed particularly valuable in emergent application domains which, above all, are characterized by an increasing complexity: they undergo a multitude of constantly changing requirements and must adapt quickly to changing technologies, they are pervasive (they have to interact with many kinds of users and systems), they are composed of many communicating, heterogeneous and often legacy components. The fact that such systems exist in many, possibly co-existing variants brings an additional dimension to this complexity. Therefore, variability management techniques have been explored and used in domains such as smart homes [26], electronic commerce and embedded systems [13] or robotics [21]. Such techniques are central in the emergent product line engineering paradigm. Features have also been advocated to be first-class citizens in Model-Driven Engineering (MDE) [30] approaches such as Fire Works [29].

In the last 15 years or so, research and industry have developed several FD languages. The first and seminal proposal was introduced as part of the FODA method back in 1990 [19], An example of a FODA FD is given in Fig. 1. It is inspired from a case study defined in [6] and indicates the allowed combinations of features for a family of systems intended to monitor the engine of a car. As is illustrated, FODA features are nodes of a graph represented by strings and related by various types of edges. On top of the figure, the feature Monitor Engine System is called the root feature, or concept. The edges are used to progressively decompose it into more detailed features. In FODA, there are and- and xor-decompositions (where edges are linked by a line segment, as between Measures and its sons in Fig. 1). The exact meaning of these and other constructs will be discussed extensively throughout the paper.

In the sequel, we will refer to FODA FD as Original Feature Trees or OFTs for short. “Original” is because OFTs were the first FD language ever proposed and because they were the starting point for the work of many researchers. “Tree” is because in OFT, FDs are structured as trees vs. single-rooted directed acyclic graphs (DAGs) as in FORM [20].

Since Kang et al.’s initial proposal, several extensions of OFT have been devised as part of the following methods: FORM [20], FeatureRSEB [14], Generative Programming [9], PLUSS [10], and in the work of the following authors: Riebisch et al. [28], [27], van Gurp et al. [36], van Deursen et al. [35], Czarnecki et al. [7], [8] and Batory [1]. While some authors have recently started to better define their semantics [35], [3], [8], [1], most proponents of FD [20], [14], [9], [28], [27], [36], [10] have not. Still, they have argued for an “improved expressiveness”. In this paper, we adopt a formal approach to check the validity of such claims.

Formal semantics is not an issue to be taken lightly. As remarkably argued in [16], [17], formal semantics is the best way (1) to avoid ambiguities (see Definition 22) and (2) to start building safe automated reasoning tools for a variety of purposes including verification, transformation and code generation. More specifically, for FD, we must be sure that a model excludes all the forbidden feature combinations and admits all the valid ones. If this is not the case, harmful feature interactions are likely to take place, or the product line will be unnecessarily restricted and thus less competitive. A tool for assisting stakeholders in selecting features therefore must be based on formal semantics.

Our formal approach is designed to introduce more rigour in the motivation and definition of FD languages. This should make the discussion of their qualities more focused and productive. In the end, we hope for a better convergence of research efforts in this area. A new, rigorously defined and motivated FD language, called VFD, is introduced in this paper as a first step in this direction. VFD uses a single construct instead of all the proposed extensions. Indeed, the proliferation of constructs and languages is an additional source of interpretation and interoperability problems. For example, if two product lines that use different modelling languages need to be merged, their respective teams will have to make extra efforts to understand each other’s FD, thereby increasing the likelihood of misunderstandings. Moreover, a new FD will have to be created from the existing ones to account for the new merged product line. It is important that rigorous criteria are used to chose the new FD language and that proved correct semantic-preserving translations are used.

In the context of emergent and complex systems, it is important that automation of product line and model-driven engineering activities such as those that we just described are made as available, as safe and as efficient as possible. The present paper tries to advance the state of the art in feature modelling towards this target. Its content is organized as follows. First, in Section 2, we survey OFT and its extensions, generically called FD. In Section 3, we propose a formal framework designed to easily provide FD languages with formal semantics. We take care to make this framework generic in order to account for extant FD variants and possibly others to come. Sections 3.1 From concrete to abstract syntax, 3.2 Generic abstract syntax describe our proposal of a common abstract syntax. The semantics then given in Section 3.4. In Section 3.3, we apply this framework to give a formal semantics to OFT and several of its extensions. Surprisingly, although extremely concise and translated almost literally from [19], a formal definition of OFT had never been published before.1 Since we restricted the scope of this paper to FD notations that lack a formal semantics, formal definitions for the analysed extensions are also missing. The formal comparison of FD languages is addressed in Section 4. Contrary to folklore, we prove that all these extensions add no expressiveness to the first extension FORM (OFD) [20], since OFDs are expressively complete (Theorem 4.3). We do not question the fact that extended FDs have advantages over the original ones, but these are succinctness (Section 4.3) and naturalness (Section 4.2) rather than expressiveness. In most extensions, there are synonymous constructs, i.e., they are redundant (Definition 23). Thus we propose a new, natural, succinct, and non-redundant variant of FDs: VFD. We conclude Section 4 with a study of the complexity of the decision procedures supporting an envisioned FD-based tool environment (Section 4.5). Finally, Section 5 compares our results with related works, especially other formal definition endeavours [35], [8], [1], while Section 6 concludes the paper.

Section snippets

Survey

In this section, we survey the informal OFT extensions enumerated in Section 1. We illustrate them with examples from the same case study (the one already used in Section 1) adapted from [6] and concerning an engine system monitor product line.

For convenience, we have developed a naming scheme to designate the reviewed languages. FD languages without graphical constraints are named with three or four letters acronyms. The first or first two letters are representative of the original name of the

Generic formal definition of feature diagrams

In this section, we provide a generic definition of the syntax and semantics of FD. We do this by introducing Free Feature Diagrams (FFDs). FFDs are a generalization of all the variants of FDs surveyed in Section 2. To make everything explicit, we separate concrete syntax, abstract syntax and semantics.

Formal comparison

In this section, we compare FD languages with respect to the formal criteria of expressiveness, embeddability, succinctness and redundancy.

Related works

In this paper, we have studied the formal underpinnings of a family of languages in the line of the original feature trees [19], that have not yet received a formal definition, but where a product line semantics (see Definition 13) is clearly intended. Recently, however, a few more formally defined notations have surfaced:

  • 1.

    van Deursen et al. [35] deal with a textual FD language to which they provide a semantics by coding rewriting rules in the ASF + SDF specification formalism associated to a

Conclusion

Throughout this paper, we have tried to clarify feature diagrams. Feature diagrams are a popular and valuable tool to address the complexity of engineering software product lines. However, after surveying past research, we have concluded that most of it has not looked enough at the foundations necessary to avoid ambiguities and to build safe and efficient tools. We have thus proposed a generic formalization of the syntax and semantics of feature diagrams which, we hope, can be the basis for

Acknowledgements

The authors would like to thank the anonymous referees for their helpful and constructive comments. We also appreciated valuable feedback from the colleagues of the PRECISE team, Raimundas Matulevičius and Germain Saval. This work was partially supported by the Walloon Region and FSE.

Pierre-Yves Schobbens holds M.Sc. and a Ph.D. from University of Louvain, Belgium. He is a full professor at the PRECISE Lab, CS Department, University of Namur. His research interests include formal semantics, logics in computer science, model checking, UML semantics and agent-oriented specification.

References (38)

  • Don S. Batory, Feature Models, Grammars, and Propositional Formulas, in Obbink and Pohl [24], pp....
  • David Benavides et al.

    Automated reasoning on feature models

  • Yves Bontemps, Patrick Heymans, Pierre-Yves Schobbens, Jean-Christophe Trigaux, Semantics of FODA feature diagrams, in:...
  • Yves Bontemps et al.

    Generic Semantics of Feature Diagrams Variants

  • Paul C. Clements et al.

    Software Product Lines: Practices and Patterns

    (2001)
  • Sholom Cohen, Bedir Tekinerdogan, Krzysztof Czamecki, A case study on requirement specification: driver monitor, in:...
  • Krzysztof Czarnecki et al.

    Staged configuration using feature models. Software process improvement and practice

    Process and Management

    (2005)
  • Krzysztof Czarnecki et al.

    Formalizing cardinality-based feature models and their specialization

    Software Process: Improvement and Practice

    (2005)
  • Ulrich W. Eisenecker et al.

    Generative Programming: Methods Tools and Applications

    (2000)
  • Magnus Eriksson, Jürgen Börstler, Kjell Borg, The PLUSS Approach - Domain Modeling with Features, Use Cases and Use...
  • M. Felleisen

    On the expressive power of programming languages

  • J.P. Gibson

    Feature requirements models: understanding interactions

  • Hassan Gomaa

    Designing Software Product Lines with UML: From Use Cases to Pattern-Based Software Architectures

    (2004)
  • M. Griss, J. Favaro, M. d’Alessandro, Integrating feature modeling with the RSEB, in: Proceedings of the Fifth...
  • Martin L. Griss

    Implementing product-line features with component reuse

  • D. Harel, B. Rumpe, Modeling Languages: Syntax, Semantics and All That Stuff, Part I: The Basic Stuff, Technical Report...
  • D. Harel et al.

    Meaningful modeling: what’s the semantics of “semantics”?

    IEEE Computer

    (2004)
  • Dirk Janssens et al.

    On the structure of node label controlled graph languages

    Information Science

    (1980)
  • K. Kang, S. Cohen, J. Hess, W. Novak, S. Peterson, Feature-Oriented Domain Analysis (FODA) Feasibility Study, Technical...
  • Cited by (252)

    • A modular metamodel and refactoring rules to achieve software product line interoperability

      2023, Journal of Systems and Software
      Citation Excerpt :

      Horcas et al. (2022) define roadmaps for tool interoperability based on the activity to be performed (e.g., modeling, analysis, derivation), but these roadmaps are limited to the current import/export support of the tools (Table 3). Concerning language analysis, Schobbens et al. (2007) provide formal semantics for feature diagrams that result in a language: varied feature diagrams (VFD) that is expressively complete in terms of Boolean features, making it able to express several diverse constructs. Knüppel et al. (2017) analyze whether less expressive languages are sufficient for industrial SPLs.

    • Grammars for Feature Models

      2024, ACM International Conference Proceeding Series
    • Product Line Management with Graphical MBSE Views

      2023, Electronic Proceedings in Theoretical Computer Science, EPTCS
    • Elimination of constraints for parallel analysis of feature models

      2023, ACM International Conference Proceeding Series
    View all citing articles on Scopus

    Pierre-Yves Schobbens holds M.Sc. and a Ph.D. from University of Louvain, Belgium. He is a full professor at the PRECISE Lab, CS Department, University of Namur. His research interests include formal semantics, logics in computer science, model checking, UML semantics and agent-oriented specification.

    Patrick Heymans holds an M.Sc. and a Ph.D. in Computer Science from the University of Namur. He is a full professor at the PRECISE Lab, CS Department, University of Namur. His research interests include Software Modelling Languages, Requirements Engineering and Software Product Lines.

    Jean-Christophe Trigaux holds an M.Sc. in Computer Science from the University of Namur, Belgium. He is a Ph.D. student at the PRECISE Lab, CS Department, University of Namur where he works under the supervision of Prof. Patrick Heymans and Prof. Pierre-Yves Schobbens. The topic of his thesis is a formal approach to the modelling of software product lines. His doctoral studies are funded by the Walloon Region and FSE under the FIRST Europe Objective 3 project PLENTY (Contract No. 215315).

    Yves Bontemps holds an M.Sc. and a Ph.D. in Computer Science from the University of Namur, Belgium. In 2005, he completed his Ph.D. Thesis under the supervision of Prof. Pierre-Yves Schobbens. His doctoral studies were funded by a Belgian FNRS “Research Fellow” grant. He is currently a full-time consultant with SmalS-MvM/eGov, Belgium.

    Work supported by Walloon Region and FSE under FIRST Europe Objective 3 Project PLENTY EPH3310300R0462/215315.

    View full text