Information Technology Reference
In-Depth Information
5.2.3. The cardinality property
To fulfill the requirement R2 presented before, which
specifies that only (maximum) one window can be automatic,
our approach includes the definition of the cardinality
property ( A ). The cardinality property is similar in form to
feature cardinality.
D EFINITION 5.3.- We define cardinality as a UML-like
cardinality A =[i..j] ,where i<=j , i and j are natural numbers,
and j can be denoted by to express an unbounded number.
Cardinality ( A ) adds semantics to a constraint C =[M,F,A, D]
by expressing the fact that the designer can create a restricted
number of bindings between model elements that conform to M
and the feature F (a number between i and j ).
The requirement (R2) is an example where cardinality is
requiredtolimitthenumberofbindingsamongmodelelements
andfeatures.Thisindicatesthatonly(amaximum)onewindow
can be automatic.
The next two subsections present the semantics of the
cardinality property in a constraint. The semantics depend
on the type of feature included in the constraint, i.e. group,
groupedorsolitary.Theintroductionofthecardinalityproperty
specifies the cardinality of the original features in the feature
model.
Cardinality on Solitary and Grouped Features. In a
constraint C = M, F, A = i..j],D] where F is a solitary
or grouped feature, the meanings of i and j are respectively
the minimum and maximum number of model elements that
conform to M that can be bound to F . For example, if a
product line architect wants to restrict to 0 or 1 the number
of automatic windows, he must add the cardinality A =[0..1]
to the constraint1 presented in Figure 5.2. Thus, maximum
one window could be automatic, e.g. the mainRoomW2 (see
Figure 5.1).
Search WWH ::




Custom Search