[ATL] variable number of output models [message #74687] |
Thu, 07 February 2008 12:56  |
Eclipse User |
|
|
|
Originally posted by: francopinchetti.yahoo.it
hello everybody,
I would like to know if it is possible to have a variable number of output
models. For example, it is possible to have one output model for each class
mod?:
IN:
<mod id=1>
....
</mod>
<mod id=2>
....
</mod>
<mod id=3>
....
</mod>
OUT1:
<mod id=1>
....
</mod>
OUT2:
<mod id=2>
....
</mod>
OUT3:
<mod id=3>
....
</mod>
Thank you
Franco
|
|
|
Re: [ATL] variable number of output models [message #74705 is a reply to message #74687] |
Fri, 08 February 2008 04:33  |
Eclipse User |
|
|
|
Originally posted by: Hugo.Bruneliere.univ-nantes.fr
Franco a écrit :
> hello everybody,
Hello Franco,
> I would like to know if it is possible to have a variable number of output
> models. For example, it is possible to have one output model for each class
> mod?:
>
> IN:
> <mod id=1>
> ...
> </mod>
> <mod id=2>
> ...
> </mod>
> <mod id=3>
> ...
> </mod>
>
>
> OUT1:
> <mod id=1>
> ...
> </mod>
>
> OUT2:
> <mod id=2>
> ...
> </mod>
>
> OUT3:
> <mod id=3>
> ...
> </mod>
>
The current version of ATL doesn't allow doing this: you have to
explicitly define in the ATL file header the input and output models (as
well as their respective metamodels).
A solution may be to use what is called a HOT (high-order
transformation), i.e. a transformation that generates another
transformation. This way you can dynamically determine the number of
input/output models into the generated transformation.
Here are two use cases using HOTs:
http://www.eclipse.org/gmt/amw/usecases/migration/
http://www.eclipse.org/gmt/amw/usecases/compare/
I hope this may help you.
Best regards,
Hugo
>
> Thank you
> Franco
>
>
--
--------------------------------------------------------
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/
--------------------------------------------------------
|
|
|
Powered by
FUDForum. Page generated in 0.05888 seconds