Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » [ATL] Model Copy/Clone
[ATL] Model Copy/Clone [message #90879] Wed, 01 October 2008 14:00 Go to next message
Alexandre Torres is currently offline Alexandre TorresFriend
Messages: 139
Registered: July 2009
Senior Member
Hi
I think that refinement mode isn't working anymore (and to tell you the
true, it's too restrictive to be used anyway). The alternative solution
may be create a (boring) transformation that copies/clone all elements on
both models. And them use superimposition with the real transformation.
I guess I can auto-generate this transformation. How are you doing this ?
I saw some examples on the "zoo", but can't find how they generated the
transformation.
Is there an "ATL transformation" that takes a metamodel and generates
another ATL transformation that clones any model based on that metamodel?
My final goal is create a transformation that refines a model based on
another input model (so, I could not use refinement anyway).

Thanks
Re: [ATL] Model Copy/Clone [message #90894 is a reply to message #90879] Wed, 01 October 2008 14:23 Go to previous messageGo to next message
Freddy Allilaire is currently offline Freddy AllilaireFriend
Messages: 130
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------050205030804060200070003
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 8bit

Hi Alexandre,

You could use KM3 to ATL Copier transformation to generate your copier
transformation:
http://www.eclipse.org/m2m/atl/atlTransformations/#KM32ATLCo pier

Regards,
Freddy.


Alexandre Torres a
Re: [ATL] [QVTO] Model Copy/Clone [message #90942 is a reply to message #90894] Wed, 01 October 2008 15:12 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: mahdider.students.uni-mainz.de

Hello,

this looks exactly what I'd need for QVTO.
Is such an utility already available there too, or do I have to
implement it myself?

Kind Regards,
Mahdi


Freddy Allilaire schrieb:
> Hi Alexandre,
>
> You could use KM3 to ATL Copier transformation to generate your copier
> transformation:
> http://www.eclipse.org/m2m/atl/atlTransformations/#KM32ATLCo pier
>
> Regards,
> Freddy.
>
>
> Alexandre Torres a écrit :
>> Hi
>> I think that refinement mode isn't working anymore (and to tell you
>> the true, it's too restrictive to be used anyway). The alternative
>> solution may be create a (boring) transformation that copies/clone all
>> elements on both models. And them use superimposition with the real
>> transformation.
>> I guess I can auto-generate this transformation. How are you doing
>> this ? I saw some examples on the "zoo", but can't find how they
>> generated the transformation.
>> Is there an "ATL transformation" that takes a metamodel and generates
>> another ATL transformation that clones any model based on that metamodel?
>> My final goal is create a transformation that refines a model based on
>> another input model (so, I could not use refinement anyway).
>>
>> Thanks
>>
>>
>>
>>
>
Re: [ATL] Model Copy/Clone [message #90955 is a reply to message #90894] Wed, 01 October 2008 16:00 Go to previous messageGo to next message
Alexandre Torres is currently offline Alexandre TorresFriend
Messages: 139
Registered: July 2009
Senior Member
Hi Freddy
Is it possible to run KM3 with the current eclipse 3.4+ATL set ?
The metamodel is EMF, but I think I can transform it to KM3 with the
plugin IF I can find a KM3 compatible plugin. KM3 is part of AM3 that
looks dead.


Freddy Allilaire wrote:

> Hi Alexandre,

> You could use KM3 to ATL Copier transformation to generate your copier
> transformation:
> http://www.eclipse.org/m2m/atl/atlTransformations/#KM32ATLCo pier

> Regards,
> Freddy.
Re: [ATL] [QVTO] Model Copy/Clone [message #90985 is a reply to message #90942] Wed, 01 October 2008 16:42 Go to previous messageGo to next message
Radomil Dvorak is currently offline Radomil DvorakFriend
Messages: 249
Registered: July 2009
Senior Member
Hi Mahdi,

You do not need such an utility with QVTO as its Standard Library defines
clone(), deepClone() operations
for every model element.

See the usage example in the thread "[QVTO] Input model parameter '...' is
read-only!"

Regards,
/Radek


On Wed, 01 Oct 2008 17:12:57 +0200, Mahdi D-Manesh
<mahdider@students.uni-mainz.de> wrote:

> Hello,
>
> this looks exactly what I'd need for QVTO.
> Is such an utility already available there too, or do I have to
> implement it myself?
>
> Kind Regards,
> Mahdi
>
>
> Freddy Allilaire schrieb:
>> Hi Alexandre,
>> You could use KM3 to ATL Copier transformation to generate your copier
>> transformation:
>> http://www.eclipse.org/m2m/atl/atlTransformations/#KM32ATLCo pier
>> Regards,
>> Freddy.
>> Alexandre Torres a écrit :
>>> Hi
>>> I think that refinement mode isn't working anymore (and to tell you
>>> the true, it's too restrictive to be used anyway). The alternative
>>> solution may be create a (boring) transformation that copies/clone all
>>> elements on both models. And them use superimposition with the real
>>> transformation.
>>> I guess I can auto-generate this transformation. How are you doing
>>> this ? I saw some examples on the "zoo", but can't find how they
>>> generated the transformation.
>>> Is there an "ATL transformation" that takes a metamodel and generates
>>> another ATL transformation that clones any model based on that
>>> metamodel?
>>> My final goal is create a transformation that refines a model based on
>>> another input model (so, I could not use refinement anyway).
>>>
>>> Thanks
>>>
>>>
>>>
>>>
>>



--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
Re: [ATL] Model Copy/Clone [message #91000 is a reply to message #90955] Wed, 01 October 2008 16:43 Go to previous messageGo to next message
Freddy Allilaire is currently offline Freddy AllilaireFriend
Messages: 130
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------040603040800030201000007
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 8bit

Alexandre,

That's a good question but I don't know :-(. I hope AM3 team could give
you more details.

Another solution (but a little bit painful) will be to use the last
ATL-AM3 build available from here:
http://www.eclipse.org/m2m/atl/download/index-old.php to create your
copier transformation.

Regards,
Freddy.

Alexandre Torres a
Re: [ATL] Model Copy/Clone [message #91015 is a reply to message #91000] Wed, 01 October 2008 17:40 Go to previous messageGo to next message
Alexandre Torres is currently offline Alexandre TorresFriend
Messages: 139
Registered: July 2009
Senior Member
Thanks Freddy.
I'm trying to run it with an older eclipse that I have here with AM3. But
it gave me some weird erros like:
"feature name does not exist on ATL!VariableExp"
but I can't trust my old messed up distro :)
Now I'm going to try your link. If it works, I can still use it just to
generate the "atl copier" and then use it on the eclipse 3.4 distro (i
hope).

going to post the results.

Best regards,
Alexandre
Re: [ATL] Model Copy/Clone [message #91029 is a reply to message #91015] Wed, 01 October 2008 19:47 Go to previous messageGo to next message
Alexandre Torres is currently offline Alexandre TorresFriend
Messages: 139
Registered: July 2009
Senior Member
The error persisted. I think I was able to fix it, commenting the "name"
feature of VariableExp:
...
fv : ATL!VariableExp (
--name <- 's',
referredVariable <- ipe
),
...
v : distinct ATL!NavigationOrAttributeCallExp foreach(sf in sfs) (
name <- sf.name,
source <- src
),
src : distinct ATL!VariableExp foreach(sf in sfs) (
--name <- 's',
referredVariable <- ipe
)
...
The transformation now works with the Am3-Atl bundle. I could them use the
"extract atl model to file" menu option to generate the atl file, and it
worked.
And the best part is, it works on the new ATL, so I need the old bundle
just to generate the clone maker transformation.
After that I tried the clone with a superimposed transformation and it
worked.
Looks like everything is going to work now!
Thanks for the support.
I suggest someone take a note to update the Zoo with this fix, if it's a
bug (I can file a bugzila)

Alexandre
Re: [ATL] Model Copy/Clone [message #91043 is a reply to message #91029] Wed, 01 October 2008 22:14 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: freddy.allilaire.univ-nantes.fr

This is a multi-part message in MIME format.
--------------060303060508050000080508
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 8bit

I don't know if it is a bug (maybe an update in ATL metamodel). If you
could open a bugzilla entry, this will be great to track this problem.

Thanks,
Freddy.

Alexandre Torres a
Re: [ATL] Model Copy/Clone [message #93175 is a reply to message #90894] Thu, 23 October 2008 11:26 Go to previous message
Dennis Wagelaar is currently offline Dennis WagelaarFriend
Messages: 147
Registered: July 2009
Senior Member
Freddy Allilaire wrote:
> Hi Alexandre,
>
> You could use KM3 to ATL Copier transformation to generate your copier
> transformation:
> http://www.eclipse.org/m2m/atl/atlTransformations/#KM32ATLCo pier
>
> Regards,
> Freddy.
>
>
> Alexandre Torres a écrit :
>> Hi
>> I think that refinement mode isn't working anymore (and to tell you
>> the true, it's too restrictive to be used anyway). The alternative
>> solution may be create a (boring) transformation that copies/clone all
>> elements on both models. And them use superimposition with the real
>> transformation.
>> I guess I can auto-generate this transformation. How are you doing
>> this ? I saw some examples on the "zoo", but can't find how they
>> generated the transformation.
>> Is there an "ATL transformation" that takes a metamodel and generates
>> another ATL transformation that clones any model based on that metamodel?
>> My final goal is create a transformation that refines a model based on
>> another input model (so, I could not use refinement anyway).
>>
>> Thanks

An alternative way is to use ATL as a code generator:
http://ssel.vub.ac.be/viewvc/UML2CaseStudies/uml2cs-transfor mations/EModelCopyGenerator.atl?revision=7412&view=marku p

Regards,
Dennis
Previous Topic:[ATL] "If then else" with multiple code lines Syntax problem
Next Topic:[ATL]launching ATL from java using Ns URI ?
Goto Forum:
  


Current Time: Wed Sep 25 09:29:56 GMT 2024

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

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

Back to the top