Transforming UML2 models and profiles [message #471822] |
Tue, 27 March 2007 11:47  |
Eclipse User |
|
|
|
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 #472094 is a reply to message #472090] |
Fri, 30 March 2007 12:20   |
Eclipse User |
|
|
|
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 15:08  |
Eclipse User |
|
|
|
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 16:17  |
Eclipse User |
|
|
|
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 #604151 is a reply to message #472090] |
Fri, 30 March 2007 12:20  |
Eclipse User |
|
|
|
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 15:08  |
Eclipse User |
|
|
|
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
|
|
|
Powered by
FUDForum. Page generated in 0.04954 seconds