Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » [ATL] Cross references
[ATL] Cross references [message #42988] Tue, 29 May 2007 22:43 Go to next message
Cédric Vidal is currently offline Cédric VidalFriend
Messages: 101
Registered: July 2009
Senior Member
Hello,

I'm having a hard time getting an ATL transformation to work with a meta
model which has cross references to another meta model. Is there an example
illustrating that Use Case ? If not, could you please explain to me how to
get the ATL transformation launcher to work with such a scenario or at least
how to run it through the Java API ?

Note that here, my problem is to get ATL to work with MM having cross
references, but I'm equally interested in knowing how to get ATL to work
with models which have cross references, both input and output models.

Kind regards,

C
Re: [ATL] Cross references [message #43023 is a reply to message #42988] Wed, 30 May 2007 07:40 Go to previous messageGo to next message
Dennis Wagelaar is currently offline Dennis WagelaarFriend
Messages: 147
Registered: July 2009
Senior Member
Cédric Vidal schreef:
> Hello,
>
> I'm having a hard time getting an ATL transformation to work with a meta
> model which has cross references to another meta model. Is there an example
> illustrating that Use Case ? If not, could you please explain to me how to
> get the ATL transformation launcher to work with such a scenario or at least
> how to run it through the Java API ?

This problem has been addressed quite a while back for the EMF backend.
A typical example is that the UML2 meta-model references the Ecore
meta-model. When loading a meta-model, ATL traverses all meta-classes to
find external references, traverses those external references to find
more external references, etc. The result is the transitive closure of
referenced meta-classes from the main meta-model. The meta-models
containing those meta-classes are accessible from ATL.

This mechanism is hidden from the user in that only the starting
meta-model is specified. The user can just use the meta-classes from the
referenced meta-models. It is possible to specify packages when
referring to meta-classes, thus allowing the user to specify the exact
logical - not physical - location of a meta-class: e.g.
UML2!ecore::EAnnotation vs. UML2!uml::Element.

>
> Note that here, my problem is to get ATL to work with MM having cross
> references, but I'm equally interested in knowing how to get ATL to work
> with models which have cross references, both input and output models.
>
> Kind regards,
>
> Cédric Vidal
>
>

At the model level, things work differently. The user must have control
over the physical location of a model element. If a reference "type" of
a model element "attribute" is set to "ExternalType", which resides in
an external model, then that reference will be an inter-model reference.
However, if your model transformation transforms "ExternalType" into
"OutputType" for example, the "type" reference will point to
"OutputType" instead. Since the "OutputType" and "attribute" elements
are part of the same - output - model, the "type" reference will be a
normal, intra-model reference.

N.B. For inter-model references to work, you need to enable them in the
ATL launch configuration ("Run..." dialog).

Kind regards,
Dennis
Re: [ATL] Cross references [message #45420 is a reply to message #43023] Sat, 09 June 2007 17:48 Go to previous messageGo to next message
Cédric Vidal is currently offline Cédric VidalFriend
Messages: 101
Registered: July 2009
Senior Member
Hi Dennis,

Thanx for your reply. I've managed to get MM cross references to work,
that's great. Now i'm trying to get model cross references to work :)

First of all, you mention that a model element "attribute" can be set to
"ExternalType", how do you do that ?

Secondly, I want my target model to reference elements from my input model,
how would I do that ? Since AMW is about model weaving and model cross
referencing, I had a look at the ATL2WTracer example where an ATL
transformation is enriched with tracing abilities, the trace enabled
transformation uses __xmiID__ to refer to input elements. Is it the only
way, isn't it possible to directly refer to input model elements so that
when I open the output model with for example the reflective model editor, I
can navigate to input model elements referenced by the output model elements
?

If I'm not clear, please tell, I'll try to be more specific, thanx for you
help.

Kind regards,

C
Re: [ATL] Cross references [message #45449 is a reply to message #45420] Sat, 09 June 2007 18:55 Go to previous message
Cédric Vidal is currently offline Cédric VidalFriend
Messages: 101
Registered: July 2009
Senior Member
OK, I managed to find out myself, somebody actually already asked the
question in this list ^^

The solution is described in Fr
Previous Topic:[ATL] New ATL use case: Verifying UML profiled models
Next Topic:[ATL] conflict between metamodel and MOF
Goto Forum:
  


Current Time: Thu Mar 28 17:12:17 GMT 2024

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

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

Back to the top