Do not Repeat Yourself!
Observe that in the model on the previous page, three clafers
(main_tracks, tracks_in,
tracks_out) have identical properties (children) and
identical constraints. This redundancy is irritating. Real variability
models need reuse mechanisms as any other large models. In Clafer we use
inheritance to reuse similar units of variability (inheritance was not
present in the original FODA feature models):
This also illustrates why it is useful to mix class modeling constructs with feature modeling constructs. Feature modeling benefits from the reuse methods of OO-modeling, while class modeling benefits obtaining a very concise notation for configuration models / feature models.
Let’s use ClaferConfigurator again to quickly check
whether we get the same instances (to properly check this, using this
tool, you need to investigate all 16 instances).
Close the configurator and move to the page
Domain Constraints.
Previous
