Skip to main content

2017 | Buch

Mastering Software Variability with FeatureIDE

verfasst von: Jens Meinicke, Dr. Thomas Thüm, Reimar Schröter, Fabian Benduhn, Prof. Dr. Thomas Leich, Prof. Dr. Gunter Saake

Verlag: Springer International Publishing

insite
SUCHEN

Über dieses Buch

This book is a self-contained, practical introduction how to use FeatureIDE for modeling and implementing variable systems. In particular, readers learn how to analyze domains using feature models, specify requirements in form of configurations, and how to generate code based on conditional compilation and feature-oriented programming. Given the interactive style of the book, readers can directly try out the open-source development environment. All code examples are available in the standard distribution on GitHub and can immediately been used for individual modifications. Each part of the book is presented as a step-by-step tutorial and additionally illustrated using an ongoing example of elevator control software written in Java.
Written by the core development team of FeatureIDE, this book is suitable for students using a tool for deepening the theoretical foundations of variability modeling and implementation, and as a reference for practitioners needing a stable and scalable tool for industrial applications. FeatureIDE is the most used open-source tool for feature modeling and has been continuously improved since 2004. The success of FeatureIDE is due to being a vehicle for cutting-edge product-line research by still providing an easy-to-use and seamless integration into Eclipse.

Inhaltsverzeichnis

Frontmatter

Introduction

Frontmatter
1. Software Variability
Abstract
Variability of products is part of our daily life. We do not want to buy just a car—we want a car in our favorite color, with five doors, a cooling system, and a navigation system. Classical engineering copes well with this kind of variant-rich production. To ease the customization of software, this book presents a tool-driven approach for software variability management based on feature-oriented software development. In this chapter, we briefly discuss software variability in general, and how it is handled without dedicated tool support, and give a reading guide for the remaining chapters.
Jens Meinicke, Thomas Thüm, Reimar Schröter, Fabian Benduhn, Thomas Leich, Gunter Saake
2. Getting Started
Abstract
FeatureIDE is an Eclipse plug-in that supports the development of feature-oriented software product lines. To use the tool, we first need to set up Eclipse and install all the plug-ins we need for the preceding of this book. In this chapter, we provide step-by-step instructions on how to set up the system to use FeatureIDE. First, we explain how to install and configure Eclipse. We then introduce the general procedure of how to install Eclipse plug-ins. Finally, we show which FeatureIDE plug-ins need to be installed for different purposes. Developers who are already familiar with Eclipse and its installation mechanisms for plug-ins can skip this chapter.
Jens Meinicke, Thomas Thüm, Reimar Schröter, Fabian Benduhn, Thomas Leich, Gunter Saake
3. FeatureIDE in a Nutshell
Abstract
FeatureIDE implements a general support to implement feature-oriented software product lines. In this chapter, we give a general overview on the functionalities of FeatureIDE. To get a first impression of FeatureIDE, we use a small “Hello World” application. As FeatureIDE supports all phases of the feature-oriented software development process, we introduce how all these phases are realized.
Jens Meinicke, Thomas Thüm, Reimar Schröter, Fabian Benduhn, Thomas Leich, Gunter Saake
4. An Elevator as a Running Example
Abstract
For the description of FeatureIDE’s functionality, we use the running example of an elevator. Elevator systems can appear in multiple variations, such as different scheduling algorithms, or security properties. In this chapter, we explain a simple elevator system with a specific scheduling algorithm. The system is used as a basis in the later chapters to implement an elevator product line. This chapter has two goals. First, it should familiarize with the default functionalities of Java in Eclipse. And second, we introduce the initial elevator implementation that will be used and extended in the proceeding of this book.
Jens Meinicke, Thomas Thüm, Reimar Schröter, Fabian Benduhn, Thomas Leich, Gunter Saake

Tool Support for Feature Modeling and Configuration

Frontmatter
5. Feature Modeling
Abstract
A feature model is the central part of a software product line. Feature models are used to describe how features can be combined to form the different products of a software product line. Thus, feature models are also the central part of projects in FeatureIDE. All parts of the development process with FeatureIDE depend on the feature model, from modeling the domain and implementing the source code to deriving and analyzing products. In this chapter, we introduce the concept of a feature diagram, which is a tree structure that represents the variability of the product line (i.e., the feature model). We exemplify the use of FeatureIDE to create feature diagrams based on the Feature Model Editor. Therefore, we introduce a new product line for an elevator that we will use in the remaining chapters of the book.
Jens Meinicke, Thomas Thüm, Reimar Schröter, Fabian Benduhn, Thomas Leich, Gunter Saake
6. Product Configuration
Abstract
Product configuration is the process to select the features that should be contained in the final product. In Chap. 5, we showed how feature models define the domain. Feature models define the features and their relationships, meaning which features are required and how features need to be selected together. We showed how FeatureIDE helps to design feature models using the Feature Model Editor. In this chapter, we introduce how to configure products with FeatureIDE. In general, text files are used to store the selected features. We show how to create configurations and how configurations can be specified with the FeatureIDE’s Configuration Editor. As feature models can get complex, it also gets difficult to define correct configurations. To help configuring the program, the Configuration Editor is always in sync with the feature model and ensures that the configuration is valid.
Jens Meinicke, Thomas Thüm, Reimar Schröter, Fabian Benduhn, Thomas Leich, Gunter Saake
7. Feature Traceability in Feature Models and Configurations
Abstract
Feature traceability is the ability to find features. When working with large feature models, it can be hard to identify certain features across the project, in the feature model, in configuration files, and source artifacts. In FeatureIDE, we provide several mechanisms that ease tracing features. In this chapter, we discuss how feature traceability is supported during feature modeling and configuration. This support is used as a basis for feature traceability in the product line implementations that we discuss in the subsequent chapters.
Jens Meinicke, Thomas Thüm, Reimar Schröter, Fabian Benduhn, Thomas Leich, Gunter Saake
8. Quality Assurance for Feature Models and Configurations
Abstract
Feature modeling and product configuration are central parts of software product line development. They define the domain and which features are contained in the final products. Feature modeling and product configuration are manual and thus error-prone tasks. Thus, the design of a feature model comes with several pitfalls for validity. It is necessary to support the user during the creation as much as possible. A qualitative feature model is even important as it affects all other parts, such as product configuration and generation. Therefore, this chapter gives an overview on FeatureIDE’s support to assure the quality of feature models and configurations.
Jens Meinicke, Thomas Thüm, Reimar Schröter, Fabian Benduhn, Thomas Leich, Gunter Saake

Tool Support for Conditional Compilation

Frontmatter
9. Conditional Compilation with FeatureIDE
Abstract
Conditional compilation is one of the most important and popular techniques to implement variable systems. Using preprocessors, code can be annotated with directives to include or exclude statements depending on feature selections. That way, products can be customized to the needs of a customer. Due to this mark and exclude principle, preprocessors are simple to use and understandable and enable a fine-grained way to implement variability. However, implementing configurable software is a difficult task, especially if the implementation is not coupled with a representation of the domain. To solve these difficulties, we provide an integrated process in FeatureIDE. The process incorporates feature modeling, configuration, implementation, generation, and execution.
Jens Meinicke, Thomas Thüm, Reimar Schröter, Fabian Benduhn, Thomas Leich, Gunter Saake
10. Developing an Elevator with Conditional Compilation
Abstract
In this chapter, we introduce the main support of FeatureIDE for conditional compilation. The chapter is designed that each part can be done hands-on. We explain the details of the functionalities using our running example of the elevator from Chap. 4 Using the initial example, we start with an elevator application without any variability. The elevator is implemented as a default Java project in Eclipse and only provides the functionality of the elevator’s sabbath mode. Using the base implementation, we will develop an elevator product line in the preceding of this chapter.
Jens Meinicke, Thomas Thüm, Reimar Schröter, Fabian Benduhn, Thomas Leich, Gunter Saake
11. Feature Traceability for Conditional Compilation
Abstract
A common task during software development, in general, and feature-oriented software development, in particular, is to locate features in domain artifacts. We discuss how to trace features that are implemented using conditional compilation. Feature traceability is especially challenging for conditional compilation, as features used in preprocessor annotations are often scattered over multiple locations and files. Locating all artifacts for a certain feature is typically referred to as the feature traceability problem. With FeatureIDE, we aim to ease the implementation with preprocessors with several views and mechanisms that help to locate features and provide an overview on their implementation and usage.
Jens Meinicke, Thomas Thüm, Reimar Schröter, Fabian Benduhn, Thomas Leich, Gunter Saake
12. Quality Assurance for Conditional Compilation
Abstract
Preprocessors can help to implement better quality software as they prevent to copy and adapt an existing system multiple times. However, preprocessor annotated software also comes with problems for code comprehension and failure detection. Preprocessor annotations have a negative impact on code understanding, and it is often hard to reason about the correct usage of features in annotations. In this chapter, we show how FeatureIDE helps to improve code quality by providing specialized analyses for conditional compilation.
Jens Meinicke, Thomas Thüm, Reimar Schröter, Fabian Benduhn, Thomas Leich, Gunter Saake

Tool Support for Feature-Oriented Programming

Frontmatter
13. Feature-Oriented Programming with FeatureIDE
Abstract
Feature-oriented programming is a specialized form of generative programming. A specialized composition mechanism generates program variants out of code fragments. In contrast to conditional compilation, this approach allows to realize separation of concerns, meaning that features are implemented in isolation, while features in preprocessor annotated code intermix with each other. In this chapter, we introduce feature-oriented programming and the general process of how FeatureIDE helps to implement software product lines using this approach.
Jens Meinicke, Thomas Thüm, Reimar Schröter, Fabian Benduhn, Thomas Leich, Gunter Saake
14. Developing an Elevator with Feature-Oriented Programming
Abstract
In this chapter, we illustrate how to implement software product lines with feature-oriented programming in FeatureIDE. The goal of this chapter is to illustrate and practice how feature-oriented programming works in detail and how the workflow of FeatureIDE implements the product line. We use our running example of the elevator product line and extend it with features for control logics Sabbath and FIFO and with an optional Service feature.
Jens Meinicke, Thomas Thüm, Reimar Schröter, Fabian Benduhn, Thomas Leich, Gunter Saake
15. Feature Traceability for Feature-Oriented Programming
Abstract
Feature traceability refers to the ability to locate features in software artifacts. Traceability helps developers to identify relevant artifacts during development and maintenance. Feature-oriented programming already establishes a one-to-one mapping between features and artifacts, whereas conditional compilation comes with a many-to-many mapping. While all artifacts belonging to a feature are contained in a single feature module, the inherent complexity of variable software poses challenges for developers. The interaction of a feature module with other feature modules can easily lead to unwanted feature interactions. Thus, developers need support to understand which other feature modules are also relevant for their intended changes. In addition, debugging feature-oriented programs is typically challenging, as during the composition of feature modules the mapping disappears.
Jens Meinicke, Thomas Thüm, Reimar Schröter, Fabian Benduhn, Thomas Leich, Gunter Saake
16. Quality Assurance for Feature-Oriented Programming
Abstract
Assuring good software quality is essential to effectively deploy reliable systems. Variability of the software to implement reuse also comes with problems, such as bugs due to feature interactions, difficulties for code comprehension, and the sheer number of products that can be derived. It is hard to detect variability bugs in the first place as they might only appear for certain configurations. FeatureIDE provides functionality that helps to prevent and identify such faults. In this chapter, we show how FeatureIDE helps to check and maintain the consistency between features as defined in the feature model and their usage in feature modules. You will further learn how FeatureIDE supports the systematic derivation and automated analysis of products. Finally, we introduce several statistics and metrics provided by FeatureIDE that you can use to determine and improve the quality of the product line.
Jens Meinicke, Thomas Thüm, Reimar Schröter, Fabian Benduhn, Thomas Leich, Gunter Saake

Further Tool Support in FeatureIDE

Frontmatter
17. Tool Support Beyond Preprocessors and Feature Modules
Abstract
In feature-oriented software product lines, products can be generated completely automatic for each valid configuration. In this chapter, we give an overview on further implementation techniques that are supported within FeatureIDE. In this chapter, we focus on runtime variability resolving variability decisions at runtime, black-box frameworks enabling compile-time variability in terms of plug-ins, and aspect-oriented programming weaving crosscutting concerns into a base application. In the following, we illustrate how those techniques are supported within FeatureIDE.
Jens Meinicke, Thomas Thüm, Reimar Schröter, Fabian Benduhn, Thomas Leich, Gunter Saake
18. Tool Support for Product-Line Maintenance
Abstract
Software product lines are typically instances of long-living software. One reason is that a product line must be maintained if any of its products needs maintenance. Another reason is that the goal of product lines is to foresee future evolution and plan for it in advance. Hence, product lines are typically maintained for years, and this maintenance is more challenging than that of single systems. First, product lines are typically developed by larger development teams. Second, there are more artifacts to be maintained than for a single product of the product line. Consequently, code quality and code documentation are crucial for product line maintenance. Tasks required to maintain product lines have already been touched in previous parts of the book. In this chapter, we focus on techniques that help developers to understand the product line code more easily. For brevity, we focus on feature-oriented programming only.
Jens Meinicke, Thomas Thüm, Reimar Schröter, Fabian Benduhn, Thomas Leich, Gunter Saake
19. Overview on FeatureIDE
Abstract
The goal of this chapter is to give an overview on FeatureIDE’s functionality. While previous parts and chapters focused on aspects of the tool support only, we aim to present the big picture in the following. That is, we present the goal of views and editors as well as how they differ when using other implementation techniques as composers. In addition, we discuss what tool support is already available in the current release, in experimental versions, or planned for future releases.
Jens Meinicke, Thomas Thüm, Reimar Schröter, Fabian Benduhn, Thomas Leich, Gunter Saake
Backmatter
Metadaten
Titel
Mastering Software Variability with FeatureIDE
verfasst von
Jens Meinicke
Dr. Thomas Thüm
Reimar Schröter
Fabian Benduhn
Prof. Dr. Thomas Leich
Prof. Dr. Gunter Saake
Copyright-Jahr
2017
Electronic ISBN
978-3-319-61443-4
Print ISBN
978-3-319-61442-7
DOI
https://doi.org/10.1007/978-3-319-61443-4