Automated analysis of feature models

Automated Test Data Generation on the Analyses of Feature Models: A Metamorphic Testing Approach
by Sergio Segura, Robert M. Hierons, David Benavides and Antonio Ruiz-Cortes

2.2. Automated analysis of feature models

The automated analysis of feature models deals with the computer–aided extraction of information from feature models. From the information obtained, marketing strategies and technical decisions can be derived. Catalogues with a number of analysis operations identified on feature models are reported in the literature [4], [5], [19]. Next, we summarize some of the analysis operations we will refer to through the rest of the paper.

  1. Determining if a feature model is void. This operation takes a feature model as input and returns a value stating whether the feature model is void or not. A feature model is void if it represents no products. [1], [3], [12], [13], [14], [17], [18], [19], [21], [24].
  2. Finding out if a product is valid. This operation checks whether an input product (i.e. set of features) belongs to the set of products represented by a given feature model or not. As an example, let us consider the feature model of Figure 1 and the following product P={E-Shop, Catalogue, Info, Description, Security, Medium, GUI, PC}. Notice that P is not a valid product of the product line represented by the model because it does not include the mandatory feature ‘Payment’. [1], [3], [14], [17], [18], [19], [21], [24].
  3. Obtaining all products. This operation takes a feature model as input and returns all the products represented by the model. [1], [3], [12], [14], [21]. Y Calculating the number of products. This operation returns the number of products represented by a feature model. The model in Figure 1 represents 2016 different products. [3], [12], [17].
  4. Calculating variability. This operation takes a feature model as input and returns the ratio between the number of products and 2n − 1 where n is the number of features in the model [3]. This operation may be used to measure the flexibility of the product line. For instance, a small factor means that the number of combinations of features is very limited compared to the total number of potential products. In Figure 1, Variability = 0.00048.
  5. Calculating commonality. This operation takes a feature model and a feature as inputs and returns a value representing the proportion of valid products in which the feature appears [3]. This operation may be used to prioritize the order in which the features are to be developed and can also be used to detect dead features [22]. In Figure 1, Commonality(Banners) = 25%.


Previous operations can be performed automatically using different approaches. Most translate feature models into specific logic paradigms such as propositional logic [1], [14], [17], [21] description logic [13], [24] or constraint programming [3], [22]. Others propose ad-hoc algorithms and solutions to perform these analyses [12], [18]. Finally, previous analysis capabilities can also be found in several commercial and open source tools such as AHEAD Tool Suite, FaMa Framework, Feature Model Plug-in and
pure::variants.