[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [featuremodel-dev] Variability
|
Hello again,
by using upper and lower, you can express more than the usual variability types. So you
can have a feature group, where the user has to select at least 3 features but maximal 6
features. The classic variability types of FODA feature models are mapped:
MANDATORY lower=-1, upper=-1 -> means all
ALTERNATIVE lower=1, upper=1 -> means exact one
OPTIONAL lower=0, upper=-1 -> any from zero to all
OR lower=1; upper=-1 -> at least one
(-1 stays for size of group => all)
Because OR matches best with "select at least 3 but not more than 6", we return OR for
this kind of groups.
I hope this helps,
Holger
Am 21.10.2010 17:17, schrieb Andreas Graf:
> Hi Holger,
>
> thanks. I found the code in the implementation classes. I would like to ask, what is the
> semantics of upper and lower?
> In the code there is the comparisons of upper and lower to various combinations of -1,0
> and 1.
>
> } else {
> type = VariabilityType.OR;
> }
>
> Would setting lower to 4 and upper to 10 a valid combination? And what would it mean? Why
> did you decide to define variability by means of to ints instead of an enumeration?
>
> Thanks for the info!
>
> Andreas
>
>
>> Hallo Andreas,
>>
>> that is right. The reason is quit simple. The variability is defined by the semantic of
>> the group to which a feature belongs. A feature is an alternative feature because it is
>> part of a group of features from which exactly one feature has to be selected. The
>> variability method is only a shortcut and easier to understand:
>>
>> feature.getVariabilityType() == ALTERNATIVE
>>
>> vs.
>>
>> feature.getParentGroup().getLower() == 1&& feature.getParentGroup().getUpper() == 1
>>
>>
>> Best regards,
>> Holger
>>
>> Am 21.10.2010 16:57, schrieb Andreas Graf:
>>> Hello,
>>>
>>> ok, I see that the variability is actually reflected by the values of upper and lower in
>>> the parent group. Is there an information about the rationale behind this design?
>>>
>>> Thanks,
>>>
>>> Andreas
>>>
>>>
>>>> Hello,
>>>>
>>>> I was wondering why variability is reflected as a method in Feature, but not as an
>>>> attribute?
>>>>
>>>> Best Regards,
>>>>
>>>> Andreas
>>>>
>>>
>>
>
>
--
Holger Papajewski
Phone: +49-391-54456920 Fax: +49-391-54456990
--
pure-systems GmbH
Geschäftsführung: Danilo Beuche, Holger Papajewski
Sitz der Gesellschaft: Magdeburg
Registergericht: Amtsgericht Magdeburg, HRB 13044