Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » [ATL] Can I use a model library in ATL transformation
[ATL] Can I use a model library in ATL transformation [message #90265] Mon, 22 September 2008 08:55 Go to next message
yue ma is currently offline yue maFriend
Messages: 22
Registered: July 2009
Junior Member
Hi,
Can anyone tell me is it possible to reference or use some existing
models (based on the dest metamodel, but not generated in the ATL rule)
during the transformation?

For example, MMa is the source metamodel, MMb is dest metamodel, Ma is
source model, Mb is the target model. And there are Mb1,Mb2,Mb3 which
are models following the MMb metamodel, and they are some libraries
which Mb maybe use.

Is it possible to use the Mb1, Mb2,Mb3 model libs during the transformation?
Re: [ATL] Can I use a model library in ATL transformation [message #90296 is a reply to message #90265] Mon, 22 September 2008 15:54 Go to previous messageGo to next message
Guillaume Doux is currently offline Guillaume DouxFriend
Messages: 56
Registered: July 2009
Member
Hi Yue,

You can use several model as source in your transformation.

With your example it gives in the header of your transformation
something like :

module MMAext2MMB;
create OUT : MMB from IN1 : MMA, INMb1 : MMB, INMb2 : MMB, INMb3 : MMB;

Hope it helps.

Best regards,

Guillaume

yue a écrit :
> Hi,
> Can anyone tell me is it possible to reference or use some existing
> models (based on the dest metamodel, but not generated in the ATL rule)
> during the transformation?
>
> For example, MMa is the source metamodel, MMb is dest metamodel, Ma is
> source model, Mb is the target model. And there are Mb1,Mb2,Mb3
> which are models following the MMb metamodel, and they are some
> libraries which Mb maybe use.
>
> Is it possible to use the Mb1, Mb2,Mb3 model libs during the
> transformation?
Re: [ATL] Can I use a model library in ATL transformation [message #90308 is a reply to message #90296] Mon, 22 September 2008 16:39 Go to previous messageGo to next message
yue ma is currently offline yue maFriend
Messages: 22
Registered: July 2009
Junior Member
Hi Guillaume ,
Thanks for your help.
In this solution, can the models be used as a library?
Actually I'm looking for a way to use the models which is a libray of
the dest metamodel.

regards
Yue



Guillaume Doux a écrit :
> Hi Yue,
>
> You can use several model as source in your transformation.
>
> With your example it gives in the header of your transformation
> something like :
>
> module MMAext2MMB;
> create OUT : MMB from IN1 : MMA, INMb1 : MMB, INMb2 : MMB, INMb3 : MMB;
>
> Hope it helps.
>
> Best regards,
>
> Guillaume
>
> yue a écrit :
>> Hi,
>> Can anyone tell me is it possible to reference or use some existing
>> models (based on the dest metamodel, but not generated in the ATL
>> rule) during the transformation?
>>
>> For example, MMa is the source metamodel, MMb is dest metamodel, Ma is
>> source model, Mb is the target model. And there are Mb1,Mb2,Mb3
>> which are models following the MMb metamodel, and they are some
>> libraries which Mb maybe use.
>>
>> Is it possible to use the Mb1, Mb2,Mb3 model libs during the
>> transformation?
Re: [ATL] Can I use a model library in ATL transformation [message #90342 is a reply to message #90308] Tue, 23 September 2008 08:34 Go to previous messageGo to next message
Guillaume Doux is currently offline Guillaume DouxFriend
Messages: 56
Registered: July 2009
Member
Hi Yue,

I'm not sure I understand your question, but I know that you can get the
information contained in all the source models to use it for the
construction of your dest model. So, it must be sufficient to do what
you want.

Best regards.

Guillaume

yue a écrit :
> Hi Guillaume ,
> Thanks for your help.
> In this solution, can the models be used as a library?
> Actually I'm looking for a way to use the models which is a libray of
> the dest metamodel.
>
> regards
> Yue
>
>
>
> Guillaume Doux a écrit :
>> Hi Yue,
>>
>> You can use several model as source in your transformation.
>>
>> With your example it gives in the header of your transformation
>> something like :
>>
>> module MMAext2MMB;
>> create OUT : MMB from IN1 : MMA, INMb1 : MMB, INMb2 : MMB, INMb3 : MMB;
>>
>> Hope it helps.
>>
>> Best regards,
>>
>> Guillaume
>>
>> yue a écrit :
>>> Hi,
>>> Can anyone tell me is it possible to reference or use some existing
>>> models (based on the dest metamodel, but not generated in the ATL
>>> rule) during the transformation?
>>>
>>> For example, MMa is the source metamodel, MMb is dest metamodel, Ma
>>> is source model, Mb is the target model. And there are
>>> Mb1,Mb2,Mb3 which are models following the MMb metamodel, and they
>>> are some libraries which Mb maybe use.
>>>
>>> Is it possible to use the Mb1, Mb2,Mb3 model libs during the
>>> transformation?
Re: [ATL] Can I use a model library in ATL transformation [message #90356 is a reply to message #90342] Tue, 23 September 2008 09:14 Go to previous messageGo to next message
yue ma is currently offline yue maFriend
Messages: 22
Registered: July 2009
Junior Member
Hi Guillaume,
Thank you so much.
By the way, do you have such an example? or where can I find one?
best regards
Yue






Guillaume Doux a écrit :
> Hi Yue,
>
> I'm not sure I understand your question, but I know that you can get the
> information contained in all the source models to use it for the
> construction of your dest model. So, it must be sufficient to do what
> you want.
>
> Best regards.
>
> Guillaume
>
> yue a écrit :
>> Hi Guillaume ,
>> Thanks for your help.
>> In this solution, can the models be used as a library?
>> Actually I'm looking for a way to use the models which is a libray of
>> the dest metamodel.
>>
>> regards
>> Yue
>>
>>
>>
>> Guillaume Doux a écrit :
>>> Hi Yue,
>>>
>>> You can use several model as source in your transformation.
>>>
>>> With your example it gives in the header of your transformation
>>> something like :
>>>
>>> module MMAext2MMB;
>>> create OUT : MMB from IN1 : MMA, INMb1 : MMB, INMb2 : MMB, INMb3 : MMB;
>>>
>>> Hope it helps.
>>>
>>> Best regards,
>>>
>>> Guillaume
>>>
>>> yue a écrit :
>>>> Hi,
>>>> Can anyone tell me is it possible to reference or use some existing
>>>> models (based on the dest metamodel, but not generated in the ATL
>>>> rule) during the transformation?
>>>>
>>>> For example, MMa is the source metamodel, MMb is dest metamodel, Ma
>>>> is source model, Mb is the target model. And there are
>>>> Mb1,Mb2,Mb3 which are models following the MMb metamodel, and they
>>>> are some libraries which Mb maybe use.
>>>>
>>>> Is it possible to use the Mb1, Mb2,Mb3 model libs during the
>>>> transformation?
Re: [ATL] Can I use a model library in ATL transformation [message #90371 is a reply to message #90356] Tue, 23 September 2008 13:34 Go to previous messageGo to next message
Guillaume Doux is currently offline Guillaume DouxFriend
Messages: 56
Registered: July 2009
Member
Hi again,

I only example I have for you is on the ATL Howtos, at

http://wiki.eclipse.org/ATL_Howtos#Using_an_XML_file

This example show how to use an XML file to set parameters in a
transformation.
This type of actions can be used with every type of models where you
need to get informations.
This informations are retrieved by using helpers (in the sample the
helper is called getParameter to retrieve value from the XML model. Of
course, if your model are not XML model, you do not need the specific
XMLHelpers ATL library).

Best regards.

Guillaume

yue a écrit :
> Hi Guillaume,
> Thank you so much.
> By the way, do you have such an example? or where can I find one?
> best regards
> Yue
>
>
>
>
>
>
> Guillaume Doux a écrit :
>> Hi Yue,
>>
>> I'm not sure I understand your question, but I know that you can get
>> the information contained in all the source models to use it for the
>> construction of your dest model. So, it must be sufficient to do what
>> you want.
>>
>> Best regards.
>>
>> Guillaume
>>
>> yue a écrit :
>>> Hi Guillaume ,
>>> Thanks for your help.
>>> In this solution, can the models be used as a library?
>>> Actually I'm looking for a way to use the models which is a libray of
>>> the dest metamodel.
>>>
>>> regards
>>> Yue
>>>
>>>
>>>
>>> Guillaume Doux a écrit :
>>>> Hi Yue,
>>>>
>>>> You can use several model as source in your transformation.
>>>>
>>>> With your example it gives in the header of your transformation
>>>> something like :
>>>>
>>>> module MMAext2MMB;
>>>> create OUT : MMB from IN1 : MMA, INMb1 : MMB, INMb2 : MMB, INMb3 : MMB;
>>>>
>>>> Hope it helps.
>>>>
>>>> Best regards,
>>>>
>>>> Guillaume
>>>>
>>>> yue a écrit :
>>>>> Hi,
>>>>> Can anyone tell me is it possible to reference or use some existing
>>>>> models (based on the dest metamodel, but not generated in the ATL
>>>>> rule) during the transformation?
>>>>>
>>>>> For example, MMa is the source metamodel, MMb is dest metamodel, Ma
>>>>> is source model, Mb is the target model. And there are
>>>>> Mb1,Mb2,Mb3 which are models following the MMb metamodel, and they
>>>>> are some libraries which Mb maybe use.
>>>>>
>>>>> Is it possible to use the Mb1, Mb2,Mb3 model libs during the
>>>>> transformation?
Re: [ATL] Can I use a model library in ATL transformation [message #90743 is a reply to message #90296] Tue, 30 September 2008 09:06 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: Stefan.Warwas.freenet.de

Hi,

one problem of this approach is that you can only have a fixed number of
libraries, right? Is there a way to pass an arbitrary number of
libraries (which are chosen at runtime) to an ATL transformation?

Regards,

Stefan

Guillaume Doux schrieb:
> Hi Yue,
>
> You can use several model as source in your transformation.
>
> With your example it gives in the header of your transformation
> something like :
>
> module MMAext2MMB;
> create OUT : MMB from IN1 : MMA, INMb1 : MMB, INMb2 : MMB, INMb3 : MMB;
>
> Hope it helps.
>
> Best regards,
>
> Guillaume
>
> yue a écrit :
>> Hi,
>> Can anyone tell me is it possible to reference or use some existing
>> models (based on the dest metamodel, but not generated in the ATL
>> rule) during the transformation?
>>
>> For example, MMa is the source metamodel, MMb is dest metamodel, Ma is
>> source model, Mb is the target model. And there are Mb1,Mb2,Mb3
>> which are models following the MMb metamodel, and they are some
>> libraries which Mb maybe use.
>>
>> Is it possible to use the Mb1, Mb2,Mb3 model libs during the
>> transformation?
Re: [ATL] Can I use a model library in ATL transformation [message #91099 is a reply to message #90743] Thu, 02 October 2008 11:59 Go to previous message
Guillaume Doux is currently offline Guillaume DouxFriend
Messages: 56
Registered: July 2009
Member
Stefan Warwas a écrit :
Hi,

> Hi,
>
> one problem of this approach is that you can only have a fixed number of
> libraries, right? Is there a way to pass an arbitrary number of
> libraries (which are chosen at runtime) to an ATL transformation?
>

That's it, it is impossible yet to have an variable number of in models
in an ATL transformation. You must know the exact number of in models
during the specification of the transformation.

Best regards.

Guillaume


> Regards,
>
> Stefan
>
> Guillaume Doux schrieb:
>> Hi Yue,
>>
>> You can use several model as source in your transformation.
>>
>> With your example it gives in the header of your transformation
>> something like :
>>
>> module MMAext2MMB;
>> create OUT : MMB from IN1 : MMA, INMb1 : MMB, INMb2 : MMB, INMb3 : MMB;
>>
>> Hope it helps.
>>
>> Best regards,
>>
>> Guillaume
>>
>> yue a écrit :
>>> Hi,
>>> Can anyone tell me is it possible to reference or use some existing
>>> models (based on the dest metamodel, but not generated in the ATL
>>> rule) during the transformation?
>>>
>>> For example, MMa is the source metamodel, MMb is dest metamodel, Ma
>>> is source model, Mb is the target model. And there are
>>> Mb1,Mb2,Mb3 which are models following the MMb metamodel, and they
>>> are some libraries which Mb maybe use.
>>>
>>> Is it possible to use the Mb1, Mb2,Mb3 model libs during the
>>> transformation?
Previous Topic:ATL-self reference into foreach statement
Next Topic:[ATL] Ant task problem: "am3.loadModel"
Goto Forum:
  


Current Time: Mon Jul 15 18:25:59 GMT 2024

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

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

Back to the top