OCL XOR link constraint [message #635794] |
Thu, 28 October 2010 03:48  |
Eclipse User |
|
|
|
We're developing a tool to model the Feature metamodel of Software
Product Lines using GMF. A Feature model allows us to specify
requirements of a product-line in terms of optional/mandatory
features (i.e. a requirement or a set of requirements that are
optional or mandatory when the product-line is derived in a particular application).
The metamodel has an abstract Feature class, of which inherits 2 subtypes of features: SolitaryFeature and GroupedFeature.
There are two association relationship between the Feature class
and the SolitaryFeature that define the relations:
- a Feature /has_optional/ SolitaryFeature,
- a Feature /has_mandatory/ SolitaryFeature.
We need an OCL constraint to define a XOR between these two
relations. The OCL we have implemented is placed in the TARGET END CONSTRAINT INTO A OUR LINK CONSTRAINT (has_optional and has_mandatory). The OCL is the following:
"(oppositeEnd.has_optional=oppositeEnd.has_mandatory)"
The problem to solve is that the OCL constraint involves the
abstract Feature class in such a way that:
a SolitaryFeature1 only can be related with an optional or mandatory
relation with other SolitaryFeature2, but the constraint also
affects to a SolitaryFeature3, in such a way that SolitaryFeature1
cannot be related neither through a optional relation nor a
mandatory relation.
diagram:
http://picasaweb.google.es/108058820701013776061/Desktop#553 2698820872976066
thanks
[Updated on: Fri, 29 October 2010 03:47] by Moderator
|
|
|
Re: OCL link constraint [message #635939 is a reply to message #635794] |
Thu, 28 October 2010 12:01  |
Eclipse User |
|
|
|
Hi Ra
It looks as if half your message got lost.
Ed
On 28/10/2010 08:48, Ra wrote:
> We're developing a tool to model the Feature metamodel of Software
> Product Lines using GMF. A Feature model allows us to specify
> requirements of a product-line in terms of optional/mandatory
> features (i.e. a requirement or a set of requirements that are
> optional or mandatory when the product-line is derived in a particular
> application). The metamodel has an abstract Feature class, of which
> inherits 2 subtypes of features: SolitaryFeature and GroupedFeature.
> There are two association relationship between the Feature class
> and the SolitaryFeature that define the relations:
>
> - a Feature /has_optional/ SolitaryFeature,
> - a Feature /has_mandatory/ SolitaryFeature.
>
> We need an OCL constraint to define a XOR between these two
> relations. The OCL we have implemented is placed in the TARGET END
> CONSTRAINT INTO A OUR LINK CONSTRAINT (has_optional and
> has_mandatory). The OCL is the following:
> "(oppositeEnd.has_optional=oppositeEnd.has_mandatory)"
> The problem to solve is that the OCL constraint involves the
> abstract Feature class in such a way that:
> a SolitaryFeature1 only can be related with an optional or mandatory
> relation with other SolitaryFeature2, but the constraint also
> affects to a SolitaryFeature3, in such a way that SolitaryFeature1
> cannot be related neither through a optional relation nor a
> mandatory relation.
>
> diagram:
>
|
|
|
Powered by
FUDForum. Page generated in 0.08384 seconds