Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » UML2 » Redefinition
Redefinition [message #478148] Mon, 02 February 2009 15:04 Go to next message
Alexandre Torres is currently offline Alexandre TorresFriend
Messages: 139
Registered: July 2009
Senior Member
Hi.
I'm creating a profile where stereotype B extends stereotype A. Stereotype
A extends the uml::Class, by the extension_A/base_Class relation.
I created a relation btw B and Class called extension_B/base_Class. I want
it to redefine extension_A.
When I execute OCL constraints in my model, extension_B is not recognized.
The good news is that base_Class works for both A and B, and I can still
use the extension_A on both stereotypes.
Until now I just set the Redefined property of my extension_B to point
extension_A, but can't figure out what to put on the member end
association.
If I create a new property base_Class on extension_B, using the redefine
property pointing to extension_A's base_Class, I get warnings from the
"define" menu about duplication and "should be annotated as redefinition".
There are so many options here that I'm a bit lost. If someone has a
example model that I could download and learn what I'm doing wrong, it
would really help.
Is there some emf annotation I need to add to the model?


Thanks
Re: Redefinition [message #478176 is a reply to message #478148] Fri, 06 February 2009 20:59 Go to previous messageGo to next message
james bruck is currently offline james bruckFriend
Messages: 1724
Registered: July 2009
Senior Member
Hi Alexandre,

I've cc'd this on the OCL newsgroup in case there is some more input from
there.
Would it be possible to attach the profile you are trying to build. There
may be some confusion between "Extend" and "Generalization" relationships.
Also I'm a bit confused as to why you want to redefine the extension_A.
It may be easier to respond if I had the bigger picture of what you are
trying to achieve.

I agree that all the genmodel options are somewhat confusing and this is an
area that is screaming for some documentation.
I'll try to put something together.

Cheers,
- James.

"Alexandre Torres" <alexandre.torres@gmail.com> wrote in message
news:a281809702b23dae9dd6fa652f130de2$1@www.eclipse.org...
> Hi.
> I'm creating a profile where stereotype B extends stereotype A. Stereotype
> A extends the uml::Class, by the extension_A/base_Class relation.
> I created a relation btw B and Class called extension_B/base_Class. I want
> it to redefine extension_A.
> When I execute OCL constraints in my model, extension_B is not recognized.
> The good news is that base_Class works for both A and B, and I can still
> use the extension_A on both stereotypes.
> Until now I just set the Redefined property of my extension_B to point
> extension_A, but can't figure out what to put on the member end
> association.
> If I create a new property base_Class on extension_B, using the redefine
> property pointing to extension_A's base_Class, I get warnings from the
> "define" menu about duplication and "should be annotated as redefinition".
> There are so many options here that I'm a bit lost. If someone has a
> example model that I could download and learn what I'm doing wrong, it
> would really help.
> Is there some emf annotation I need to add to the model?
>
>
> Thanks
>
>
Re: Redefinition [message #478179 is a reply to message #478176] Mon, 09 February 2009 16:09 Go to previous message
Eclipse UserFriend
Originally posted by: cdamus.zeligsoft.com

Hi, Alexandre,

Are you using the OCL constraints facility as generated by UML2? If so,
then this isn't working because UML2 generates OCL constraint code using
the Ecore metamodel binding, not the UML metamodel binding. Thus, the
OCL constraint parsing and evaluation is done in terms of Ecore, which
does not have the notion of non-navigable property navigation (such as
in the case of extension_B or even extension_A, for that matter).

With the UML metamodel binding, OCL will recognize the extension_B
property, but I'm not sure that it will treat it as a redefinition of
extension_A in all respects.

HTH,

Christian


James Bruck wrote:
> Hi Alexandre,
>
> I've cc'd this on the OCL newsgroup in case there is some more input from
> there.
> Would it be possible to attach the profile you are trying to build. There
> may be some confusion between "Extend" and "Generalization" relationships.
> Also I'm a bit confused as to why you want to redefine the extension_A.
> It may be easier to respond if I had the bigger picture of what you are
> trying to achieve.
>
> I agree that all the genmodel options are somewhat confusing and this is an
> area that is screaming for some documentation.
> I'll try to put something together.
>
> Cheers,
> - James.
>
> "Alexandre Torres" <alexandre.torres@gmail.com> wrote in message
> news:a281809702b23dae9dd6fa652f130de2$1@www.eclipse.org...
>> Hi.
>> I'm creating a profile where stereotype B extends stereotype A. Stereotype
>> A extends the uml::Class, by the extension_A/base_Class relation.
>> I created a relation btw B and Class called extension_B/base_Class. I want
>> it to redefine extension_A.
>> When I execute OCL constraints in my model, extension_B is not recognized.
>> The good news is that base_Class works for both A and B, and I can still
>> use the extension_A on both stereotypes.
>> Until now I just set the Redefined property of my extension_B to point
>> extension_A, but can't figure out what to put on the member end
>> association.
>> If I create a new property base_Class on extension_B, using the redefine
>> property pointing to extension_A's base_Class, I get warnings from the
>> "define" menu about duplication and "should be annotated as redefinition".
>> There are so many options here that I'm a bit lost. If someone has a
>> example model that I could download and learn what I'm doing wrong, it
>> would really help.
>> Is there some emf annotation I need to add to the model?
>>
>>
>> Thanks
>>
>>
>
>
Re: Redefinition [message #627376 is a reply to message #478148] Fri, 06 February 2009 20:59 Go to previous message
james bruck is currently offline james bruckFriend
Messages: 1724
Registered: July 2009
Senior Member
Hi Alexandre,

I've cc'd this on the OCL newsgroup in case there is some more input from
there.
Would it be possible to attach the profile you are trying to build. There
may be some confusion between "Extend" and "Generalization" relationships.
Also I'm a bit confused as to why you want to redefine the extension_A.
It may be easier to respond if I had the bigger picture of what you are
trying to achieve.

I agree that all the genmodel options are somewhat confusing and this is an
area that is screaming for some documentation.
I'll try to put something together.

Cheers,
- James.

"Alexandre Torres" <alexandre.torres@gmail.com> wrote in message
news:a281809702b23dae9dd6fa652f130de2$1@www.eclipse.org...
> Hi.
> I'm creating a profile where stereotype B extends stereotype A. Stereotype
> A extends the uml::Class, by the extension_A/base_Class relation.
> I created a relation btw B and Class called extension_B/base_Class. I want
> it to redefine extension_A.
> When I execute OCL constraints in my model, extension_B is not recognized.
> The good news is that base_Class works for both A and B, and I can still
> use the extension_A on both stereotypes.
> Until now I just set the Redefined property of my extension_B to point
> extension_A, but can't figure out what to put on the member end
> association.
> If I create a new property base_Class on extension_B, using the redefine
> property pointing to extension_A's base_Class, I get warnings from the
> "define" menu about duplication and "should be annotated as redefinition".
> There are so many options here that I'm a bit lost. If someone has a
> example model that I could download and learn what I'm doing wrong, it
> would really help.
> Is there some emf annotation I need to add to the model?
>
>
> Thanks
>
>
Re: Redefinition [message #627379 is a reply to message #478176] Mon, 09 February 2009 16:09 Go to previous message
Eclipse UserFriend
Originally posted by: cdamus.zeligsoft.com

Hi, Alexandre,

Are you using the OCL constraints facility as generated by UML2? If so,
then this isn't working because UML2 generates OCL constraint code using
the Ecore metamodel binding, not the UML metamodel binding. Thus, the
OCL constraint parsing and evaluation is done in terms of Ecore, which
does not have the notion of non-navigable property navigation (such as
in the case of extension_B or even extension_A, for that matter).

With the UML metamodel binding, OCL will recognize the extension_B
property, but I'm not sure that it will treat it as a redefinition of
extension_A in all respects.

HTH,

Christian


James Bruck wrote:
> Hi Alexandre,
>
> I've cc'd this on the OCL newsgroup in case there is some more input from
> there.
> Would it be possible to attach the profile you are trying to build. There
> may be some confusion between "Extend" and "Generalization" relationships.
> Also I'm a bit confused as to why you want to redefine the extension_A.
> It may be easier to respond if I had the bigger picture of what you are
> trying to achieve.
>
> I agree that all the genmodel options are somewhat confusing and this is an
> area that is screaming for some documentation.
> I'll try to put something together.
>
> Cheers,
> - James.
>
> "Alexandre Torres" <alexandre.torres@gmail.com> wrote in message
> news:a281809702b23dae9dd6fa652f130de2$1@www.eclipse.org...
>> Hi.
>> I'm creating a profile where stereotype B extends stereotype A. Stereotype
>> A extends the uml::Class, by the extension_A/base_Class relation.
>> I created a relation btw B and Class called extension_B/base_Class. I want
>> it to redefine extension_A.
>> When I execute OCL constraints in my model, extension_B is not recognized.
>> The good news is that base_Class works for both A and B, and I can still
>> use the extension_A on both stereotypes.
>> Until now I just set the Redefined property of my extension_B to point
>> extension_A, but can't figure out what to put on the member end
>> association.
>> If I create a new property base_Class on extension_B, using the redefine
>> property pointing to extension_A's base_Class, I get warnings from the
>> "define" menu about duplication and "should be annotated as redefinition".
>> There are so many options here that I'm a bit lost. If someone has a
>> example model that I could download and learn what I'm doing wrong, it
>> would really help.
>> Is there some emf annotation I need to add to the model?
>>
>>
>> Thanks
>>
>>
>
>
Previous Topic:No automatic generation of OCL classes
Next Topic:Re: Using UML Profiles with EMF
Goto Forum:
  


Current Time: Thu Apr 25 10:42:38 GMT 2024

Powered by FUDForum. Page generated in 0.03409 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top