Home » Archived » M2M (model-to-model transformation) » on the navigation of the target model in an ATL transformation
on the navigation of the target model in an ATL transformation [message #14325] |
Fri, 02 February 2007 10:34  |
Eclipse User |
|
|
|
Originally posted by: Maher.lamari.lip6.fr
Hello,
I have a couple of questions about the navigation in the target model.
1- I would like to know if it is correct to define a helper to navigate in
the target model as given below:
helper def : getTableByName (name : String) :RDB!Table =
RDB!Table.allInstancesFrom('OUT')->select (t | t.name = name)->first();
I wrote an implementation of the UMLClass to RDB transformation in ATL and
I used the helper defined above to get the owner Table of each new column.
The transformation returns correct target models, i.e. each column has its
expected owner table.
However, it was mentioned in "Transforming Models with ATL" by Fr
|
|
|
Re: on the navigation of the target model in an ATL transformation [message #14337 is a reply to message #14325] |
Fri, 02 February 2007 11:24   |
Eclipse User |
|
|
|
Originally posted by: Hugo.Bruneliere.univ-nantes.fr
Hi Maher
Maher a écrit :
> Hello,
>
>
>
> I have a couple of questions about the navigation in the target model.
>
>
>
> 1- I would like to know if it is correct to define a helper to navigate in
> the target model as given below:
>
> helper def : getTableByName (name : String) :RDB!Table =
> RDB!Table.allInstancesFrom('OUT')->select (t | t.name = name)->first();
>
> I wrote an implementation of the UMLClass to RDB transformation in ATL and
> I used the helper defined above to get the owner Table of each new column.
> The transformation returns correct target models, i.e. each column has its
> expected owner table.
>
> However, it was mentioned in "Transforming Models with ATL" by Frédéric
> Jouault and Ivan Kurtev, the source models are READ ONLY and the target
> models are WRITE ONLY. So:
>
>
>
> 2- Can I understand, even if the result I have obtained is correct, that the
> transformation would not be confluent ?
>
For the time being, it is technically possible to navigate the generated
target model in an ATL transformation. However, in a theoretical point
of view, this should not be done since the target model is being
generated and so you are not supposed to know in which exact order the
different model elements are being created.
>
> 3- If it is not allowed to navigate in the target model, how can one get a
> target element that is supposed to be already created, in order to set a
> feature of another target element? For the UMLCLass to RDB transformation,
> how do we get an already created table to set the 'owner' feature of a
> column?
>
The principle of rules in ATL is to determine the kind of target
elements which are created only from input elements (and not from other
already created target elements).
However, in the "to" part of an ATL rule, it is possible to point to
elements created in the "to" part of other rules by using the
resolveTemp operation (see page 16 and 40 of the ATL User Manual
available from http://www.eclipse.org/m2m/atl/doc/ )
>
>
> Please, I would like to know if the imperative part of ATL proposes an
> equivalent constructor to 'while'. It would be useful for some kind of
> problems and much easier than other constructs.
>
Indeed, the ATL imperative part provides a "for" statement as it is
explained in the ATL User Manual (page 36).
>
> Thank you in advance.
>
>
>
>
Best regards,
Hugo
--
--------------------------------------------------------
Hugo Bruneliere - R&D Engineer
ATLAS Group (INRIA & LINA) - University of Nantes
2, rue de la Houssiniere
44322 Nantes Cedex 3 - France
office +33 2 51 12 58 10 /\ cell.+33 6 07 42 45 30
EMail: Hugo.Bruneliere@univ-nantes.fr
http://www.sciences.univ-nantes.fr/lina/atl/
--------------------------------------------------------
|
|
|
[ATL] Re: on the navigation of the target model in an ATL transformation [message #15154 is a reply to message #14337] |
Fri, 02 February 2007 11:27   |
Eclipse User |
|
|
|
Originally posted by: Hugo.Bruneliere.univ-nantes.fr
Just to say that you have to put the [ATL] tag at the beginning of the
subject of each email concerning ATL you send on this newsgroup.
Best regards,
Hugo
Hugo Bruneliere a écrit :
> Hi Maher
>
> Maher a écrit :
>> Hello,
>>
>>
>>
>> I have a couple of questions about the navigation in the target model.
>>
>>
>>
>> 1- I would like to know if it is correct to define a helper to
>> navigate in the target model as given below:
>>
>> helper def : getTableByName (name : String) :RDB!Table =
>> RDB!Table.allInstancesFrom('OUT')->select (t | t.name = name)->first();
>>
>> I wrote an implementation of the UMLClass to RDB transformation in
>> ATL and I used the helper defined above to get the owner Table of each
>> new column. The transformation returns correct target models, i.e.
>> each column has its expected owner table.
>>
>> However, it was mentioned in "Transforming Models with ATL" by
>> Frédéric Jouault and Ivan Kurtev, the source models are READ ONLY and
>> the target models are WRITE ONLY. So:
>>
>>
>>
>> 2- Can I understand, even if the result I have obtained is correct,
>> that the transformation would not be confluent ?
>>
>
> For the time being, it is technically possible to navigate the generated
> target model in an ATL transformation. However, in a theoretical point
> of view, this should not be done since the target model is being
> generated and so you are not supposed to know in which exact order the
> different model elements are being created.
>
>>
>> 3- If it is not allowed to navigate in the target model, how can one
>> get a target element that is supposed to be already created, in order
>> to set a feature of another target element? For the UMLCLass to RDB
>> transformation, how do we get an already created table to set the
>> 'owner' feature of a column?
>>
>
> The principle of rules in ATL is to determine the kind of target
> elements which are created only from input elements (and not from other
> already created target elements).
> However, in the "to" part of an ATL rule, it is possible to point to
> elements created in the "to" part of other rules by using the
> resolveTemp operation (see page 16 and 40 of the ATL User Manual
> available from http://www.eclipse.org/m2m/atl/doc/ )
>
>>
>>
>> Please, I would like to know if the imperative part of ATL proposes an
>> equivalent constructor to 'while'. It would be useful for some kind of
>> problems and much easier than other constructs.
>>
>
> Indeed, the ATL imperative part provides a "for" statement as it is
> explained in the ATL User Manual (page 36).
>
>>
>> Thank you in advance.
>>
>>
>>
>>
>
> Best regards,
>
> Hugo
>
--
--------------------------------------------------------
Hugo Bruneliere - R&D Engineer
ATLAS Group (INRIA & LINA) - University of Nantes
2, rue de la Houssiniere
44322 Nantes Cedex 3 - France
office +33 2 51 12 58 10 /\ cell.+33 6 07 42 45 30
EMail: Hugo.Bruneliere@univ-nantes.fr
http://www.sciences.univ-nantes.fr/lina/atl/
--------------------------------------------------------
|
|
| | |
Re: [ATL] Re: on the navigation of the target model in an ATL transformation [message #15393 is a reply to message #15256] |
Tue, 06 February 2007 08:08  |
Eclipse User |
|
|
|
Originally posted by: Hugo.Bruneliere.univ-nantes.fr
Hi Maher,
Maher a écrit :
> Thanks Hugo !!
>
> I used resolveTemp in my transformation and the transformation works fine
> too.
>
> Could you please confirm that the 'while' construct is not supported by the
> current version of ATL
>
The "while" construct is not supported by ATL. Loops have to be
implemented by using the "for" statement.
Hugo
> Maher
>
>
> "Hugo Bruneliere" <Hugo.Bruneliere@univ-nantes.fr> a écrit dans le message
> de news: epvoji$p5d$1@utils.eclipse.org...
>> Hi Maher
>>
>> Maher a écrit :
>>> Hello,
>>>
>>>
>>>
>>> I have a couple of questions about the navigation in the target model.
>>>
>>>
>>>
>>> 1- I would like to know if it is correct to define a helper to navigate
>>> in the target model as given below:
>>>
>>> helper def : getTableByName (name : String) :RDB!Table =
>>> RDB!Table.allInstancesFrom('OUT')->select (t | t.name = name)->first();
>>>
>>> I wrote an implementation of the UMLClass to RDB transformation in ATL
>>> and I used the helper defined above to get the owner Table of each new
>>> column. The transformation returns correct target models, i.e. each
>>> column has its expected owner table.
>>>
>>> However, it was mentioned in "Transforming Models with ATL" by Frédéric
>>> Jouault and Ivan Kurtev, the source models are READ ONLY and the target
>>> models are WRITE ONLY. So:
>>>
>>>
>>>
>>> 2- Can I understand, even if the result I have obtained is correct, that
>>> the transformation would not be confluent ?
>>>
>> For the time being, it is technically possible to navigate the generated
>> target model in an ATL transformation. However, in a theoretical point of
>> view, this should not be done since the target model is being generated
>> and so you are not supposed to know in which exact order the different
>> model elements are being created.
>>
>>> 3- If it is not allowed to navigate in the target model, how can one get
>>> a target element that is supposed to be already created, in order to set
>>> a feature of another target element? For the UMLCLass to RDB
>>> transformation, how do we get an already created table to set the 'owner'
>>> feature of a column?
>>>
>> The principle of rules in ATL is to determine the kind of target elements
>> which are created only from input elements (and not from other already
>> created target elements).
>> However, in the "to" part of an ATL rule, it is possible to point to
>> elements created in the "to" part of other rules by using the resolveTemp
>> operation (see page 16 and 40 of the ATL User Manual available from
>> http://www.eclipse.org/m2m/atl/doc/ )
>>
>>>
>>> Please, I would like to know if the imperative part of ATL proposes an
>>> equivalent constructor to 'while'. It would be useful for some kind of
>>> problems and much easier than other constructs.
>>>
>> Indeed, the ATL imperative part provides a "for" statement as it is
>> explained in the ATL User Manual (page 36).
>>
>>> Thank you in advance.
>>>
>>>
>>>
>>>
>> Best regards,
>>
>> Hugo
>>
>> --
>> --------------------------------------------------------
>> Hugo Bruneliere - R&D Engineer
>> ATLAS Group (INRIA & LINA) - University of Nantes
>> 2, rue de la Houssiniere
>> 44322 Nantes Cedex 3 - France
>> office +33 2 51 12 58 10 /\ cell.+33 6 07 42 45 30
>> EMail: Hugo.Bruneliere@univ-nantes.fr
>> http://www.sciences.univ-nantes.fr/lina/atl/
>> --------------------------------------------------------
>
>
>
--
--------------------------------------------------------
Hugo Bruneliere - R&D Engineer
ATLAS Group (INRIA & LINA) - University of Nantes
2, rue de la Houssiniere
44322 Nantes Cedex 3 - France
office +33 2 51 12 58 10 /\ cell.+33 6 07 42 45 30
EMail: Hugo.Bruneliere@univ-nantes.fr
http://www.sciences.univ-nantes.fr/lina/atl/
--------------------------------------------------------
|
|
|
Goto Forum:
Current Time: Fri Apr 25 05:13:37 EDT 2025
Powered by FUDForum. Page generated in 0.02795 seconds
|