Modeling Variability in Views

To model actual variability in the views of an AF3 model the model elements have to be connected to the Feature Model via so called Presence Conditions. Such Presence Conditions and the variability induce another potential source of modeling errors which can be detected by Product-line Analysis.

Presence Conditions

In order to link optional model elements with the features of the Feature Model, Presence Conditions are used. A Presence Condition is a textual formula that specifies this relationship by using the feature names. They can be specified in the Properties section typing the feature names. By [CTRL] + [Space] you can enable auto completion to simplify the input:



Presence Conditions are propositional logical formulae which enable also more complex specifications using the boolean operators NOT, AND, OR and brackets. With adding a Presence Condition, the model element will be removed from Variants, whenever this formula evaluates to 'false' for a given configuration. Every selected feature of such a configuration will become 'true', every non-selected feature will become 'false', respectively during variant generation:



Such Presence Conditions can be specified for all model elements which can be optional. Supported model elements are:

If you think an AF3 element is missing to be optional with Presence Conditions, please contact the AF3 developer team.

Product Line Analysis

Adding Presence Conditions to parts of a model might change the semantics of a view to a certain extend. For example, it becomes possible to add more than one input channel to an input port, as soon as the existing inputs are optional. In this example, the 150% model (with all optional components included) is not a valid AF3 model variant by itself anymore. Yet, it is allowed as long as all variants which can be generated from it will only have one input channel for all ports.

In such cases, the modeler who adds variability via Presence Conditions has to ensure that all variants will be correct. For the above example of multiple input ports, this means that the Presence Conditions need to be chosen in a way that makes them mutually exclusive. AF3 supports modelers hereby by constantly performing Product-line Analysis every time a model is saved to ensure that all variants will be correct. Again for the example of optional input ports a problem with any variant would be displayed as this: