Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » UML2 » Package merging
Package merging [message #477162] Sun, 30 March 2008 10:34 Go to next message
chris is currently offline chrisFriend
Messages: 72
Registered: July 2009
Member
Hi,

I'm having some beginner issues with UML2 package merging - maybe
somebody can help me out and give me a kick-off...

I'm trying to develop a DSL based on UML Activities. So, the plan is to
create a UML model, add Package Merge relations to the basic,
fundamental and intermediate packages of the UML::Activities package,
merge, transform to Ecore, and then add a couple of elements to the
resulting ecore model. The resulting model should optimally have no
dependencies on other models.

So I imported o.e.uml2.source into my workspace and copied the
Superstructure.uml and Infrastructure.uml models to my project. First
problem: Both files do have problems when I validate them (things like
"Not all members of namespace foo are distinguishable within it.", "The
context of subsetting property... does not conform with the subsetted
property...") - is that fine? I'm using Europa 3.3.2...

Next, I added the 3 Package merge relations and validated: fine. After
mergíng sucessfully, I validated the resulting .uml file, and discovered
1 problem: "Not all members of namespace foo are distinguishable within
it." Sounds familar...

If I now transform to Ecore (no errors), I get 3 .ecore files:
InfrastructureLibrary.ecore, UML.ecore and foo.ecore. Why is my
foo.ecore files depending on the other models? I expexted to just get
foo.ecore.

Finally, the resulting .ecore models contain validation errors: a couple
of properties are contained in the super- as well as in the subclass.
Obviously, the generated code doesn't compile.


For me it looks like there's already something messed up with the
original .uml models, but that's somehow hard to believe :-) I'm
probably making some stupid mistake. Anybody?

Thanks in advance,
Chris
Re: Package merging [message #477172 is a reply to message #477162] Wed, 02 April 2008 13:13 Go to previous messageGo to next message
james bruck is currently offline james bruckFriend
Messages: 1724
Registered: July 2009
Senior Member
Hi Chris,

Sorry about the delayed response. I'm having a look over this now just to
double check what is going on with the uml model.
It is often the case that UML produces messages that are benign.

- James.


"chris" <chris_42@gmx.net> wrote in message
news:fsnqcp$57v$1@build.eclipse.org...
> Hi,
>
> I'm having some beginner issues with UML2 package merging - maybe somebody
> can help me out and give me a kick-off...
>
> I'm trying to develop a DSL based on UML Activities. So, the plan is to
> create a UML model, add Package Merge relations to the basic, fundamental
> and intermediate packages of the UML::Activities package, merge, transform
> to Ecore, and then add a couple of elements to the resulting ecore model.
> The resulting model should optimally have no dependencies on other models.
>
> So I imported o.e.uml2.source into my workspace and copied the
> Superstructure.uml and Infrastructure.uml models to my project. First
> problem: Both files do have problems when I validate them (things like
> "Not all members of namespace foo are distinguishable within it.", "The
> context of subsetting property... does not conform with the subsetted
> property...") - is that fine? I'm using Europa 3.3.2...
>
> Next, I added the 3 Package merge relations and validated: fine. After
> merg
Re: Package merging [message #477181 is a reply to message #477172] Thu, 03 April 2008 14:58 Go to previous messageGo to next message
james bruck is currently offline james bruckFriend
Messages: 1724
Registered: July 2009
Senior Member
That's a very interesting observation.

When you validate the Superstructure and Infrastructure models you get these
"The context of the subsetting property ... does not conform..".
This is a result of certain generalizations not being introduced into that
particular package. The final UML.merged.uml does not have these issues
which means that the generalizations were introduced in some other language
unit and get added in as a result of package merge.
(Have a look at ClassifierOperations.conformsTo() ... it fails in the
classifier.allParents().contains(other) ).


So what does this mean to you?
You would have to ensure that you merge consistent language units in order
for your extension to work properly.

However, I do believe that the presence of these warnings is questionable.
The language unit should be completely self contained and possibly have
redundant generalizations that get ignored upon package merge with other
language units that define the same generalization, or, the subsetting
properties should only be introduced in the language unit that also contains
the generalization. I will try to get some resolution to this.

In the meantime,
Please have a close look at

https://eclipsecon.greenmeetingsystems.com/submissions/view/ 172
Then, look at the comments at the end.

It will point you to an update site..
Add the following Update Site URL to your Update Manager:
http://download.eclipse.org/modeling/mdt/updates/EclipseCon2 008-UML-Tutorial/


Cheers,
- James.



"James Bruck" <jbruck@ca.ibm.com> wrote in message
news:ft00pt$mmf$3@build.eclipse.org...
> Hi Chris,
>
> Sorry about the delayed response. I'm having a look over this now just to
> double check what is going on with the uml model.
> It is often the case that UML produces messages that are benign.
>
> - James.
>
>
> "chris" <chris_42@gmx.net> wrote in message
> news:fsnqcp$57v$1@build.eclipse.org...
>> Hi,
>>
>> I'm having some beginner issues with UML2 package merging - maybe
>> somebody can help me out and give me a kick-off...
>>
>> I'm trying to develop a DSL based on UML Activities. So, the plan is to
>> create a UML model, add Package Merge relations to the basic, fundamental
>> and intermediate packages of the UML::Activities package, merge,
>> transform to Ecore, and then add a couple of elements to the resulting
>> ecore model. The resulting model should optimally have no dependencies on
>> other models.
>>
>> So I imported o.e.uml2.source into my workspace and copied the
>> Superstructure.uml and Infrastructure.uml models to my project. First
>> problem: Both files do have problems when I validate them (things like
>> "Not all members of namespace foo are distinguishable within it.", "The
>> context of subsetting property... does not conform with the subsetted
>> property...") - is that fine? I'm using Europa 3.3.2...
>>
>> Next, I added the 3 Package merge relations and validated: fine. After
>> merg
Re: Package merging [message #477187 is a reply to message #477162] Thu, 03 April 2008 16:23 Go to previous messageGo to next message
Kenn Hussey is currently offline Kenn HusseyFriend
Messages: 1620
Registered: July 2009
Senior Member
Chris,

There are many violations of the 'members are distinguishable' rule in UML
(mostly because of members that are transitively included via imports), so
as James has suggested, these warnings can be ignored.

With respect to your merged package, it sounds like you must have merged
something that has a dependency on something that you didn't merge, e.g. a
typed element whose type is in an unmerged package, or a classifier whose
general classifier is in an unmerged package. Generally speaking, if you
want to produce a completely independent merged result, you'll need to merge
all of the packages containing dependent elements. A quick way to determine
what's missing is to look at the merged model (foo.uml?) as text and find
any references to InfrastructureLibrary.uml and/or UML.uml.

Kenn

"chris" <chris_42@gmx.net> wrote in message
news:fsnqcp$57v$1@build.eclipse.org...
> Hi,
>
> I'm having some beginner issues with UML2 package merging - maybe somebody
> can help me out and give me a kick-off...
>
> I'm trying to develop a DSL based on UML Activities. So, the plan is to
> create a UML model, add Package Merge relations to the basic, fundamental
> and intermediate packages of the UML::Activities package, merge, transform
> to Ecore, and then add a couple of elements to the resulting ecore model.
> The resulting model should optimally have no dependencies on other models.
>
> So I imported o.e.uml2.source into my workspace and copied the
> Superstructure.uml and Infrastructure.uml models to my project. First
> problem: Both files do have problems when I validate them (things like
> "Not all members of namespace foo are distinguishable within it.", "The
> context of subsetting property... does not conform with the subsetted
> property...") - is that fine? I'm using Europa 3.3.2...
>
> Next, I added the 3 Package merge relations and validated: fine. After
> merg
Re: Package merging [message #477198 is a reply to message #477187] Fri, 04 April 2008 14:44 Go to previous messageGo to next message
james bruck is currently offline james bruckFriend
Messages: 1724
Registered: July 2009
Senior Member
Hi Kenn,

Do you think it is an issue that the Superstructure.uml has warnings
concering subsetting property conformance ( see my previous post ).
It would seem to me that this should be self contained with possible
redundant generalizations.
The warnings are harmless in the end (after the final package merge) but
should perhaps be addressed nevertheless.

Perhaps this should be raised for debate at the OMG?

Cheers,
- James.


"Kenn Hussey" <Kenn.Hussey@embarcadero.com> wrote in message
news:ft466a$bbn$2@build.eclipse.org...
> Chris,
>
> There are many violations of the 'members are distinguishable' rule in UML
> (mostly because of members that are transitively included via imports), so
> as James has suggested, these warnings can be ignored.
>
> With respect to your merged package, it sounds like you must have merged
> something that has a dependency on something that you didn't merge, e.g. a
> typed element whose type is in an unmerged package, or a classifier whose
> general classifier is in an unmerged package. Generally speaking, if you
> want to produce a completely independent merged result, you'll need to
> merge all of the packages containing dependent elements. A quick way to
> determine what's missing is to look at the merged model (foo.uml?) as text
> and find any references to InfrastructureLibrary.uml and/or UML.uml.
>
> Kenn
>
> "chris" <chris_42@gmx.net> wrote in message
> news:fsnqcp$57v$1@build.eclipse.org...
>> Hi,
>>
>> I'm having some beginner issues with UML2 package merging - maybe
>> somebody can help me out and give me a kick-off...
>>
>> I'm trying to develop a DSL based on UML Activities. So, the plan is to
>> create a UML model, add Package Merge relations to the basic, fundamental
>> and intermediate packages of the UML::Activities package, merge,
>> transform to Ecore, and then add a couple of elements to the resulting
>> ecore model. The resulting model should optimally have no dependencies on
>> other models.
>>
>> So I imported o.e.uml2.source into my workspace and copied the
>> Superstructure.uml and Infrastructure.uml models to my project. First
>> problem: Both files do have problems when I validate them (things like
>> "Not all members of namespace foo are distinguishable within it.", "The
>> context of subsetting property... does not conform with the subsetted
>> property...") - is that fine? I'm using Europa 3.3.2...
>>
>> Next, I added the 3 Package merge relations and validated: fine. After
>> merg
Re: Package merging [message #477201 is a reply to message #477198] Fri, 04 April 2008 15:21 Go to previous message
Kenn Hussey is currently offline Kenn HusseyFriend
Messages: 1620
Registered: July 2009
Senior Member
James,

Yes, these should ideally be raised as issues with the OMG. We spent a lot
of time removing many of them, but it seems that some still exist. Thanks
for volunteering. ;)

Kenn

"James Bruck" <jbruck@ca.ibm.com> wrote in message
news:ft5euo$rqp$3@build.eclipse.org...
> Hi Kenn,
>
> Do you think it is an issue that the Superstructure.uml has warnings
> concering subsetting property conformance ( see my previous post ).
> It would seem to me that this should be self contained with possible
> redundant generalizations.
> The warnings are harmless in the end (after the final package merge) but
> should perhaps be addressed nevertheless.
>
> Perhaps this should be raised for debate at the OMG?
>
> Cheers,
> - James.
>
>
> "Kenn Hussey" <Kenn.Hussey@embarcadero.com> wrote in message
> news:ft466a$bbn$2@build.eclipse.org...
>> Chris,
>>
>> There are many violations of the 'members are distinguishable' rule in
>> UML (mostly because of members that are transitively included via
>> imports), so as James has suggested, these warnings can be ignored.
>>
>> With respect to your merged package, it sounds like you must have merged
>> something that has a dependency on something that you didn't merge, e.g.
>> a typed element whose type is in an unmerged package, or a classifier
>> whose general classifier is in an unmerged package. Generally speaking,
>> if you want to produce a completely independent merged result, you'll
>> need to merge all of the packages containing dependent elements. A quick
>> way to determine what's missing is to look at the merged model (foo.uml?)
>> as text and find any references to InfrastructureLibrary.uml and/or
>> UML.uml.
>>
>> Kenn
>>
>> "chris" <chris_42@gmx.net> wrote in message
>> news:fsnqcp$57v$1@build.eclipse.org...
>>> Hi,
>>>
>>> I'm having some beginner issues with UML2 package merging - maybe
>>> somebody can help me out and give me a kick-off...
>>>
>>> I'm trying to develop a DSL based on UML Activities. So, the plan is to
>>> create a UML model, add Package Merge relations to the basic,
>>> fundamental and intermediate packages of the UML::Activities package,
>>> merge, transform to Ecore, and then add a couple of elements to the
>>> resulting ecore model. The resulting model should optimally have no
>>> dependencies on other models.
>>>
>>> So I imported o.e.uml2.source into my workspace and copied the
>>> Superstructure.uml and Infrastructure.uml models to my project. First
>>> problem: Both files do have problems when I validate them (things like
>>> "Not all members of namespace foo are distinguishable within it.", "The
>>> context of subsetting property... does not conform with the subsetted
>>> property...") - is that fine? I'm using Europa 3.3.2...
>>>
>>> Next, I added the 3 Package merge relations and validated: fine. After
>>> merg
Re: Package merging [message #626332 is a reply to message #477162] Wed, 02 April 2008 13:13 Go to previous message
james bruck is currently offline james bruckFriend
Messages: 1724
Registered: July 2009
Senior Member
Hi Chris,

Sorry about the delayed response. I'm having a look over this now just to
double check what is going on with the uml model.
It is often the case that UML produces messages that are benign.

- James.


"chris" <chris_42@gmx.net> wrote in message
news:fsnqcp$57v$1@build.eclipse.org...
> Hi,
>
> I'm having some beginner issues with UML2 package merging - maybe somebody
> can help me out and give me a kick-off...
>
> I'm trying to develop a DSL based on UML Activities. So, the plan is to
> create a UML model, add Package Merge relations to the basic, fundamental
> and intermediate packages of the UML::Activities package, merge, transform
> to Ecore, and then add a couple of elements to the resulting ecore model.
> The resulting model should optimally have no dependencies on other models.
>
> So I imported o.e.uml2.source into my workspace and copied the
> Superstructure.uml and Infrastructure.uml models to my project. First
> problem: Both files do have problems when I validate them (things like
> "Not all members of namespace foo are distinguishable within it.", "The
> context of subsetting property... does not conform with the subsetted
> property...") - is that fine? I'm using Europa 3.3.2...
>
> Next, I added the 3 Package merge relations and validated: fine. After
> merg
Re: Package merging [message #626341 is a reply to message #477172] Thu, 03 April 2008 14:58 Go to previous message
james bruck is currently offline james bruckFriend
Messages: 1724
Registered: July 2009
Senior Member
That's a very interesting observation.

When you validate the Superstructure and Infrastructure models you get these
"The context of the subsetting property ... does not conform..".
This is a result of certain generalizations not being introduced into that
particular package. The final UML.merged.uml does not have these issues
which means that the generalizations were introduced in some other language
unit and get added in as a result of package merge.
(Have a look at ClassifierOperations.conformsTo() ... it fails in the
classifier.allParents().contains(other) ).


So what does this mean to you?
You would have to ensure that you merge consistent language units in order
for your extension to work properly.

However, I do believe that the presence of these warnings is questionable.
The language unit should be completely self contained and possibly have
redundant generalizations that get ignored upon package merge with other
language units that define the same generalization, or, the subsetting
properties should only be introduced in the language unit that also contains
the generalization. I will try to get some resolution to this.

In the meantime,
Please have a close look at

https://eclipsecon.greenmeetingsystems.com/submissions/view/ 172
Then, look at the comments at the end.

It will point you to an update site..
Add the following Update Site URL to your Update Manager:
http://download.eclipse.org/modeling/mdt/updates/EclipseCon2 008-UML-Tutorial/


Cheers,
- James.



"James Bruck" <jbruck@ca.ibm.com> wrote in message
news:ft00pt$mmf$3@build.eclipse.org...
> Hi Chris,
>
> Sorry about the delayed response. I'm having a look over this now just to
> double check what is going on with the uml model.
> It is often the case that UML produces messages that are benign.
>
> - James.
>
>
> "chris" <chris_42@gmx.net> wrote in message
> news:fsnqcp$57v$1@build.eclipse.org...
>> Hi,
>>
>> I'm having some beginner issues with UML2 package merging - maybe
>> somebody can help me out and give me a kick-off...
>>
>> I'm trying to develop a DSL based on UML Activities. So, the plan is to
>> create a UML model, add Package Merge relations to the basic, fundamental
>> and intermediate packages of the UML::Activities package, merge,
>> transform to Ecore, and then add a couple of elements to the resulting
>> ecore model. The resulting model should optimally have no dependencies on
>> other models.
>>
>> So I imported o.e.uml2.source into my workspace and copied the
>> Superstructure.uml and Infrastructure.uml models to my project. First
>> problem: Both files do have problems when I validate them (things like
>> "Not all members of namespace foo are distinguishable within it.", "The
>> context of subsetting property... does not conform with the subsetted
>> property...") - is that fine? I'm using Europa 3.3.2...
>>
>> Next, I added the 3 Package merge relations and validated: fine. After
>> merg
Re: Package merging [message #626347 is a reply to message #477162] Thu, 03 April 2008 16:23 Go to previous message
Kenn Hussey is currently offline Kenn HusseyFriend
Messages: 1620
Registered: July 2009
Senior Member
Chris,

There are many violations of the 'members are distinguishable' rule in UML
(mostly because of members that are transitively included via imports), so
as James has suggested, these warnings can be ignored.

With respect to your merged package, it sounds like you must have merged
something that has a dependency on something that you didn't merge, e.g. a
typed element whose type is in an unmerged package, or a classifier whose
general classifier is in an unmerged package. Generally speaking, if you
want to produce a completely independent merged result, you'll need to merge
all of the packages containing dependent elements. A quick way to determine
what's missing is to look at the merged model (foo.uml?) as text and find
any references to InfrastructureLibrary.uml and/or UML.uml.

Kenn

"chris" <chris_42@gmx.net> wrote in message
news:fsnqcp$57v$1@build.eclipse.org...
> Hi,
>
> I'm having some beginner issues with UML2 package merging - maybe somebody
> can help me out and give me a kick-off...
>
> I'm trying to develop a DSL based on UML Activities. So, the plan is to
> create a UML model, add Package Merge relations to the basic, fundamental
> and intermediate packages of the UML::Activities package, merge, transform
> to Ecore, and then add a couple of elements to the resulting ecore model.
> The resulting model should optimally have no dependencies on other models.
>
> So I imported o.e.uml2.source into my workspace and copied the
> Superstructure.uml and Infrastructure.uml models to my project. First
> problem: Both files do have problems when I validate them (things like
> "Not all members of namespace foo are distinguishable within it.", "The
> context of subsetting property... does not conform with the subsetted
> property...") - is that fine? I'm using Europa 3.3.2...
>
> Next, I added the 3 Package merge relations and validated: fine. After
> merg
Re: Package merging [message #626355 is a reply to message #477187] Fri, 04 April 2008 14:44 Go to previous message
james bruck is currently offline james bruckFriend
Messages: 1724
Registered: July 2009
Senior Member
Hi Kenn,

Do you think it is an issue that the Superstructure.uml has warnings
concering subsetting property conformance ( see my previous post ).
It would seem to me that this should be self contained with possible
redundant generalizations.
The warnings are harmless in the end (after the final package merge) but
should perhaps be addressed nevertheless.

Perhaps this should be raised for debate at the OMG?

Cheers,
- James.


"Kenn Hussey" <Kenn.Hussey@embarcadero.com> wrote in message
news:ft466a$bbn$2@build.eclipse.org...
> Chris,
>
> There are many violations of the 'members are distinguishable' rule in UML
> (mostly because of members that are transitively included via imports), so
> as James has suggested, these warnings can be ignored.
>
> With respect to your merged package, it sounds like you must have merged
> something that has a dependency on something that you didn't merge, e.g. a
> typed element whose type is in an unmerged package, or a classifier whose
> general classifier is in an unmerged package. Generally speaking, if you
> want to produce a completely independent merged result, you'll need to
> merge all of the packages containing dependent elements. A quick way to
> determine what's missing is to look at the merged model (foo.uml?) as text
> and find any references to InfrastructureLibrary.uml and/or UML.uml.
>
> Kenn
>
> "chris" <chris_42@gmx.net> wrote in message
> news:fsnqcp$57v$1@build.eclipse.org...
>> Hi,
>>
>> I'm having some beginner issues with UML2 package merging - maybe
>> somebody can help me out and give me a kick-off...
>>
>> I'm trying to develop a DSL based on UML Activities. So, the plan is to
>> create a UML model, add Package Merge relations to the basic, fundamental
>> and intermediate packages of the UML::Activities package, merge,
>> transform to Ecore, and then add a couple of elements to the resulting
>> ecore model. The resulting model should optimally have no dependencies on
>> other models.
>>
>> So I imported o.e.uml2.source into my workspace and copied the
>> Superstructure.uml and Infrastructure.uml models to my project. First
>> problem: Both files do have problems when I validate them (things like
>> "Not all members of namespace foo are distinguishable within it.", "The
>> context of subsetting property... does not conform with the subsetted
>> property...") - is that fine? I'm using Europa 3.3.2...
>>
>> Next, I added the 3 Package merge relations and validated: fine. After
>> merg
Re: Package merging [message #626358 is a reply to message #477198] Fri, 04 April 2008 15:21 Go to previous message
Kenn Hussey is currently offline Kenn HusseyFriend
Messages: 1620
Registered: July 2009
Senior Member
James,

Yes, these should ideally be raised as issues with the OMG. We spent a lot
of time removing many of them, but it seems that some still exist. Thanks
for volunteering. ;)

Kenn

"James Bruck" <jbruck@ca.ibm.com> wrote in message
news:ft5euo$rqp$3@build.eclipse.org...
> Hi Kenn,
>
> Do you think it is an issue that the Superstructure.uml has warnings
> concering subsetting property conformance ( see my previous post ).
> It would seem to me that this should be self contained with possible
> redundant generalizations.
> The warnings are harmless in the end (after the final package merge) but
> should perhaps be addressed nevertheless.
>
> Perhaps this should be raised for debate at the OMG?
>
> Cheers,
> - James.
>
>
> "Kenn Hussey" <Kenn.Hussey@embarcadero.com> wrote in message
> news:ft466a$bbn$2@build.eclipse.org...
>> Chris,
>>
>> There are many violations of the 'members are distinguishable' rule in
>> UML (mostly because of members that are transitively included via
>> imports), so as James has suggested, these warnings can be ignored.
>>
>> With respect to your merged package, it sounds like you must have merged
>> something that has a dependency on something that you didn't merge, e.g.
>> a typed element whose type is in an unmerged package, or a classifier
>> whose general classifier is in an unmerged package. Generally speaking,
>> if you want to produce a completely independent merged result, you'll
>> need to merge all of the packages containing dependent elements. A quick
>> way to determine what's missing is to look at the merged model (foo.uml?)
>> as text and find any references to InfrastructureLibrary.uml and/or
>> UML.uml.
>>
>> Kenn
>>
>> "chris" <chris_42@gmx.net> wrote in message
>> news:fsnqcp$57v$1@build.eclipse.org...
>>> Hi,
>>>
>>> I'm having some beginner issues with UML2 package merging - maybe
>>> somebody can help me out and give me a kick-off...
>>>
>>> I'm trying to develop a DSL based on UML Activities. So, the plan is to
>>> create a UML model, add Package Merge relations to the basic,
>>> fundamental and intermediate packages of the UML::Activities package,
>>> merge, transform to Ecore, and then add a couple of elements to the
>>> resulting ecore model. The resulting model should optimally have no
>>> dependencies on other models.
>>>
>>> So I imported o.e.uml2.source into my workspace and copied the
>>> Superstructure.uml and Infrastructure.uml models to my project. First
>>> problem: Both files do have problems when I validate them (things like
>>> "Not all members of namespace foo are distinguishable within it.", "The
>>> context of subsetting property... does not conform with the subsetted
>>> property...") - is that fine? I'm using Europa 3.3.2...
>>>
>>> Next, I added the 3 Package merge relations and validated: fine. After
>>> merg
Previous Topic:How to model an operation with concrete instanceSpecifications as inputs and output?
Next Topic:Connectors and Provided / Required Interfaces
Goto Forum:
  


Current Time: Sat Apr 27 02:15:21 GMT 2024

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

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

Back to the top