Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » UML2 » Transforming UML2 models and profiles
Transforming UML2 models and profiles [message #471822] Tue, 27 March 2007 15:47 Go to next message
Paul Gribben is currently offline Paul GribbenFriend
Messages: 28
Registered: July 2009
Junior Member
Hello.

I have defined a UML2 profile (using UML2 editor), and used it
successfully generate a UML2 model with stereotypes applied, etc. I now
want to perform model transformations (using ATL and AMW) on the model and
am unsure which path to take. It seems that ATL2006 will work with UML2
files although I'm not sure about AMW just yet.

My guess is that it may be easier to convert my model file to an ecore
model file, which would require me to create an ecore metamodel for my
profile (hopefully I can find an ATL transformation to do this!).

Could anyone advise on the the best approach to adopt?
Thanks
Paul
Re: Transforming UML2 models and profiles [message #472087 is a reply to message #471822] Thu, 29 March 2007 20:17 Go to previous messageGo to next message
james bruck is currently offline james bruckFriend
Messages: 1724
Registered: July 2009
Senior Member
Hi Paul,

I don't know much about these transformations you refer to but I just wanted
to mention that you can convert your profile by using the regular "convert
to ecore" menu or by the EMF creation wizard and selecting "uml" as input.
You are not restricted to using "define" for your profile to create an ecore
representation.

I'm not certain but you might also be interested in a new static profile
definition feature that was delivered recently
https://bugs.eclipse.org/bugs/show_bug.cgi?id=155535.

Regards,

- James.



"Paul Gribben" <paul.gribben@gmail.com> wrote in message
news:7cc228c8343830cbb7ab0acc7886cafb$1@www.eclipse.org...
> Hello.
>
> I have defined a UML2 profile (using UML2 editor), and used it
> successfully generate a UML2 model with stereotypes applied, etc. I now
> want to perform model transformations (using ATL and AMW) on the model and
> am unsure which path to take. It seems that ATL2006 will work with UML2
> files although I'm not sure about AMW just yet.
>
> My guess is that it may be easier to convert my model file to an ecore
> model file, which would require me to create an ecore metamodel for my
> profile (hopefully I can find an ATL transformation to do this!).
>
> Could anyone advise on the the best approach to adopt?
> Thanks
> Paul
>
Re: Transforming UML2 models and profiles [message #472090 is a reply to message #471822] Thu, 29 March 2007 21:29 Go to previous messageGo to next message
Jean Bezivin is currently offline Jean BezivinFriend
Messages: 38
Registered: July 2009
Member
Paul,

I copy your post also to the M2M and AMW newsgroups.

Jean


"Paul Gribben" <paul.gribben@gmail.com> a
Re: Transforming UML2 models and profiles [message #472094 is a reply to message #472090] Fri, 30 March 2007 16:20 Go to previous messageGo to next message
Dennis Wagelaar is currently offline Dennis WagelaarFriend
Messages: 147
Registered: July 2009
Senior Member
Jean.Bezivin schreef:
> Paul,
>
> I copy your post also to the M2M and AMW newsgroups.
>
> Jean
>
>
> "Paul Gribben" <paul.gribben@gmail.com> a écrit dans le message de news:
> 7cc228c8343830cbb7ab0acc7886cafb$1@www.eclipse.org...
>> Hello.
>>
>> I have defined a UML2 profile (using UML2 editor), and used it
>> successfully generate a UML2 model with stereotypes applied, etc. I now
>> want to perform model transformations (using ATL and AMW) on the model and
>> am unsure which path to take. It seems that ATL2006 will work with UML2
>> files although I'm not sure about AMW just yet.

ATL will work, but different approaches are required for UML2 v.1.1
(Eclipse 3.1) and UML2 v.2.0 (Eclipse 3.2).

See also:
http://wiki.eclipse.org/index.php/ATL_Language_Troubleshoote r#UML2_Profiles

Example model transformations for UML2 v.2.0 can be found here:
http://ssel.vub.ac.be/viewcvs/viewcvs.py/UML2CaseStudies/uml 2cs-transformations/

>>
>> My guess is that it may be easier to convert my model file to an ecore
>> model file, which would require me to create an ecore metamodel for my
>> profile (hopefully I can find an ATL transformation to do this!).

I thought that the UML2 plugin includes tools for translating between
Ecore and UML?

UML profiles are definitely difficult for the purpose of model
transformation. They are more complex than a simple meta-model.
Modelling of profiles is done on UML level. You can't apply any
stereotypes directly from the profile, however, since Stereotype
instances cannot exist at the UML level (M2). That's why you need to
"define" your profile, which generates an Ecore representation of your
profile. Now that your Stereotypes are promoted to EClasses (M3 level),
they can be instantiated at UML level (M2).

If you stick to meta-models vs. models, you don't need any meta-level
voodoo like this. Mind you: the voodoo is correct and all (cf. Welty's
"spanning objects"), but not easy to understand.

>>
>> Could anyone advise on the the best approach to adopt?
>> Thanks
>> Paul
>>
>
>

If you plan to transform your UML + profiles to Ecore first by using
ATL, then the damage is already done: you need to access your stereotype
applications. You might as well transform your UML model directly.

If you can use the UML2 tools to convert your models/profiles to Ecore,
then that makes model transformation in ATL easier.
--
Cheers,
Dennis
Re: Transforming UML2 models and profiles [message #472097 is a reply to message #472094] Sat, 31 March 2007 19:08 Go to previous message
Dennis Wagelaar is currently offline Dennis WagelaarFriend
Messages: 147
Registered: July 2009
Senior Member
Dennis Wagelaar schreef:
> UML profiles are definitely difficult for the purpose of model
> transformation. They are more complex than a simple meta-model.
> Modelling of profiles is done on UML level. You can't apply any
> stereotypes directly from the profile, however, since Stereotype
> instances cannot exist at the UML level (M2). That's why you need to
> "define" your profile, which generates an Ecore representation of your
> profile. Now that your Stereotypes are promoted to EClasses (M3 level),
> they can be instantiated at UML level (M2).

Got the M-levels wrong :-/. The UML level is M1, while the Ecore level
(UML meta-model) is M2.
--
Dennis
Re: Transforming UML2 models and profiles [message #604118 is a reply to message #471822] Thu, 29 March 2007 20:17 Go to previous message
james bruck is currently offline james bruckFriend
Messages: 1724
Registered: July 2009
Senior Member
Hi Paul,

I don't know much about these transformations you refer to but I just wanted
to mention that you can convert your profile by using the regular "convert
to ecore" menu or by the EMF creation wizard and selecting "uml" as input.
You are not restricted to using "define" for your profile to create an ecore
representation.

I'm not certain but you might also be interested in a new static profile
definition feature that was delivered recently
https://bugs.eclipse.org/bugs/show_bug.cgi?id=155535

Regards,

- James.



"Paul Gribben" <paul.gribben@gmail.com> wrote in message
news:7cc228c8343830cbb7ab0acc7886cafb$1@www.eclipse.org...
> Hello.
>
> I have defined a UML2 profile (using UML2 editor), and used it
> successfully generate a UML2 model with stereotypes applied, etc. I now
> want to perform model transformations (using ATL and AMW) on the model and
> am unsure which path to take. It seems that ATL2006 will work with UML2
> files although I'm not sure about AMW just yet.
>
> My guess is that it may be easier to convert my model file to an ecore
> model file, which would require me to create an ecore metamodel for my
> profile (hopefully I can find an ATL transformation to do this!).
>
> Could anyone advise on the the best approach to adopt?
> Thanks
> Paul
>
Re: Transforming UML2 models and profiles [message #604124 is a reply to message #471822] Thu, 29 March 2007 21:29 Go to previous message
Jean Bezivin is currently offline Jean BezivinFriend
Messages: 38
Registered: July 2009
Member
Paul,

I copy your post also to the M2M and AMW newsgroups.

Jean


"Paul Gribben" <paul.gribben@gmail.com> a
Re: Transforming UML2 models and profiles [message #604151 is a reply to message #472090] Fri, 30 March 2007 16:20 Go to previous message
Dennis Wagelaar is currently offline Dennis WagelaarFriend
Messages: 147
Registered: July 2009
Senior Member
Jean.Bezivin schreef:
> Paul,
>
> I copy your post also to the M2M and AMW newsgroups.
>
> Jean
>
>
> "Paul Gribben" <paul.gribben@gmail.com> a écrit dans le message de news:
> 7cc228c8343830cbb7ab0acc7886cafb$1@www.eclipse.org...
>> Hello.
>>
>> I have defined a UML2 profile (using UML2 editor), and used it
>> successfully generate a UML2 model with stereotypes applied, etc. I now
>> want to perform model transformations (using ATL and AMW) on the model and
>> am unsure which path to take. It seems that ATL2006 will work with UML2
>> files although I'm not sure about AMW just yet.

ATL will work, but different approaches are required for UML2 v.1.1
(Eclipse 3.1) and UML2 v.2.0 (Eclipse 3.2).

See also:
http://wiki.eclipse.org/index.php/ATL_Language_Troubleshoote r#UML2_Profiles

Example model transformations for UML2 v.2.0 can be found here:
http://ssel.vub.ac.be/viewcvs/viewcvs.py/UML2CaseStudies/uml 2cs-transformations/

>>
>> My guess is that it may be easier to convert my model file to an ecore
>> model file, which would require me to create an ecore metamodel for my
>> profile (hopefully I can find an ATL transformation to do this!).

I thought that the UML2 plugin includes tools for translating between
Ecore and UML?

UML profiles are definitely difficult for the purpose of model
transformation. They are more complex than a simple meta-model.
Modelling of profiles is done on UML level. You can't apply any
stereotypes directly from the profile, however, since Stereotype
instances cannot exist at the UML level (M2). That's why you need to
"define" your profile, which generates an Ecore representation of your
profile. Now that your Stereotypes are promoted to EClasses (M3 level),
they can be instantiated at UML level (M2).

If you stick to meta-models vs. models, you don't need any meta-level
voodoo like this. Mind you: the voodoo is correct and all (cf. Welty's
"spanning objects"), but not easy to understand.

>>
>> Could anyone advise on the the best approach to adopt?
>> Thanks
>> Paul
>>
>
>

If you plan to transform your UML + profiles to Ecore first by using
ATL, then the damage is already done: you need to access your stereotype
applications. You might as well transform your UML model directly.

If you can use the UML2 tools to convert your models/profiles to Ecore,
then that makes model transformation in ATL easier.
--
Cheers,
Dennis
Re: Transforming UML2 models and profiles [message #604175 is a reply to message #472094] Sat, 31 March 2007 19:08 Go to previous message
Dennis Wagelaar is currently offline Dennis WagelaarFriend
Messages: 147
Registered: July 2009
Senior Member
Dennis Wagelaar schreef:
> UML profiles are definitely difficult for the purpose of model
> transformation. They are more complex than a simple meta-model.
> Modelling of profiles is done on UML level. You can't apply any
> stereotypes directly from the profile, however, since Stereotype
> instances cannot exist at the UML level (M2). That's why you need to
> "define" your profile, which generates an Ecore representation of your
> profile. Now that your Stereotypes are promoted to EClasses (M3 level),
> they can be instantiated at UML level (M2).

Got the M-levels wrong :-/. The UML level is M1, while the Ecore level
(UML meta-model) is M2.
--
Dennis
Previous Topic:[Announce] MDT UML2 2.1.0 I200703301423 is available
Next Topic:template expansion
Goto Forum:
  


Current Time: Sat Dec 20 23:08:46 GMT 2014

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

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