User:Rafalotufo/Feature model

Feature models are used as a representation of possible configurations in product lines. A feature model is composed of hierarchical features, with dependencies and constraints between them. The dependencies and constraints specify if one feature implies the presence another feature, if features are mandatory, and even a choice of one feature invalidates a choice of another. A product configuration is derived by choosing the desired features, and complying to the feature constraints specified by the model.

A feature is a system property that is relevant to some stakeholder and is used to capture commonalities or discriminate among systems in a family.

What makes feature models particularly appealing is the fact that they prevent the derivation of illegal product specifications. That is, the relations in the feature model constrain the way in which features can be combined into system specifications. For instance, the feature model enforces that mutually-exclusive features are never part of the same product.

Applications
Feature modeling is a key approach to capture and manage the common and variable features in a system family or a product line. It can be used to represent all the possible features in a product line and its dependencies, e.g., feature f1 is mandatory if feature f2 is selected, thus representing all the possible product configurations in a product line.

Feature models also play a key role in generative software development as it can help the automation of application engineering based on software families. With this approach, a system is generated from a specification written in one or more textual or graphical domain-specific languages (DSLs). Feature models can then be used to scope and develop DSLs, which may range from simple parameter lists or feature hierarchies to more sophisticated DSLs with graph-like structures.

Structure
A feature model is composed of a root feature, which is generally called the concept, and is mandatory for all product configurations. Other than the root feature, there are four types of features: mandatory, optional, inclusive-OR and exclusive-OR.

For all of the feature types, if a feature is selected, so too is its parent. If a the parent is selected, then all mandatory children are selected. As for the optional features, they can be selected or not. If it is not selected, then none of its sub-features are selected. The inclusive-OR and exclusive-OR constraints are applied to features a a group. As for the inclusive-OR group, at least one feature in the group must be selected whenever the group's parent feature is selected. On the other hand, in the exclusive-OR groups, only one feature must selected when its parent feature is selected.

Feature models can also have extra-constraints, which are dependencies that can be difficult to represent using the features hierarchical structure, mandatory, optional features and OR groups. These constraints can be of the type: if feature f1 implies feature f2, but the features are generally not closely related, thus needing this special explicit constraint.