Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » [ATL] delete et refining
[ATL] delete et refining [message #100143] Wed, 18 February 2009 10:20 Go to next message
sabatier is currently offline sabatierFriend
Messages: 14
Registered: July 2009
Junior Member
Hello,

I try to transform one uml metaclass in other uml metaclass, I work with
the ATL 3 on eclipse 3.5

ATL refining mode is it capable to do this transformation, or in
refining mode we can just modify some attribute of existant metaclass,
and also add other metaclass (like atl example in zoo Public to Private
transformation)

And can we delete instances in refining mode ?

thank
Re: [ATL] delete et refining [message #100212 is a reply to message #100143] Wed, 18 February 2009 13:15 Go to previous messageGo to next message
William Piers is currently offline William PiersFriend
Messages: 301
Registered: July 2009
Senior Member
Hello,

Answers below:

Laurent SABATIER a écrit :
> Hello,
>
> I try to transform one uml metaclass in other uml metaclass, I work with
> the ATL 3 on eclipse 3.5
>
> ATL refining mode is it capable to do this transformation, or in
> refining mode we can just modify some attribute of existant metaclass,

You can modify existing instances, but also add new elements. For
instance, this rule creates a new Interface next to each Class:

rule Class {
from
input : UML!Class
to
refined : UML!Class (
name <- input.name
),
added : UML!Interface(
package <- input.package,
name <- 'I' + input.name
)
}

> and also add other metaclass (like atl example in zoo Public to Private
> transformation)

Note that there is a more recent version of this example, directly
available in the New->example->atl wizard.

>
> And can we delete instances in refining mode ?

At this time we can't, you'll have to redefine your transformation in
the standard mode to do that.

Best regards,

William

>
> thank
Re: [ATL] delete et refining [message #100225 is a reply to message #100212] Wed, 18 February 2009 13:25 Go to previous messageGo to next message
sabatier is currently offline sabatierFriend
Messages: 14
Registered: July 2009
Junior Member
Hello,

My goal is this for example :

rule Class {
from
input : UML!Class
to
refined : UML!Component (
name <- input.name
)
}



William Piers a écrit :
> Hello,
>
> Answers below:
>
> Laurent SABATIER a écrit :
>> Hello,
>>
>> I try to transform one uml metaclass in other uml metaclass, I work
>> with the ATL 3 on eclipse 3.5
>>
>> ATL refining mode is it capable to do this transformation, or in
>> refining mode we can just modify some attribute of existant metaclass,
>
> You can modify existing instances, but also add new elements. For
> instance, this rule creates a new Interface next to each Class:
>
> rule Class {
> from
> input : UML!Class
> to
> refined : UML!Class (
> name <- input.name
> ),
> added : UML!Interface(
> package <- input.package,
> name <- 'I' + input.name
> )
> }
>
>> and also add other metaclass (like atl example in zoo Public to
>> Private transformation)
>
> Note that there is a more recent version of this example, directly
> available in the New->example->atl wizard.
>
>>
>> And can we delete instances in refining mode ?
>
> At this time we can't, you'll have to redefine your transformation in
> the standard mode to do that.
>
> Best regards,
>
> William
>
>>
>> thank
Re: [ATL] delete et refining [message #100238 is a reply to message #100225] Wed, 18 February 2009 14:03 Go to previous messageGo to next message
William Piers is currently offline William PiersFriend
Messages: 301
Registered: July 2009
Senior Member
The example you give implies the deletion of the input Class, so it is
not possible with the current refining mode.

Laurent SABATIER a écrit :
> Hello,
>
> My goal is this for example :
>
> rule Class {
> from
> input : UML!Class
> to
> refined : UML!Component (
> name <- input.name
> )
> }
>
>
>
> William Piers a écrit :
>> Hello,
>>
>> Answers below:
>>
>> Laurent SABATIER a écrit :
>>> Hello,
>>>
>>> I try to transform one uml metaclass in other uml metaclass, I work
>>> with the ATL 3 on eclipse 3.5
>>>
>>> ATL refining mode is it capable to do this transformation, or in
>>> refining mode we can just modify some attribute of existant metaclass,
>>
>> You can modify existing instances, but also add new elements. For
>> instance, this rule creates a new Interface next to each Class:
>>
>> rule Class {
>> from
>> input : UML!Class
>> to
>> refined : UML!Class (
>> name <- input.name
>> ),
>> added : UML!Interface(
>> package <- input.package,
>> name <- 'I' + input.name
>> )
>> }
>>
>>> and also add other metaclass (like atl example in zoo Public to
>>> Private transformation)
>>
>> Note that there is a more recent version of this example, directly
>> available in the New->example->atl wizard.
>>
>>>
>>> And can we delete instances in refining mode ?
>>
>> At this time we can't, you'll have to redefine your transformation in
>> the standard mode to do that.
>>
>> Best regards,
>>
>> William
>>
>>>
>>> thank
Re: [ATL] delete et refining [message #100373 is a reply to message #100238] Thu, 19 February 2009 15:37 Go to previous message
Ronan B is currently offline Ronan BFriend
Messages: 273
Registered: July 2009
Senior Member
I think you are better off not using refining mode. Use the default mode
and write a rule for each type you wish to map. I found using the inbuild
autocompletion of ATl to be a big help here when writing such montonous
rules. Just define the metamodel in a comment at the start of your file.
For example

-- @nsURI UML=http://www.eclipse.org/uml2/3.0.0/UML

Cheers,
Ronan
Previous Topic:Transformation from IRL to PRR
Next Topic:EMF Tiger
Goto Forum:
  


Current Time: Thu Apr 25 06:37:38 GMT 2024

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

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

Back to the top