Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » [ATL] references to input elements doesn't work in output trace model
[ATL] references to input elements doesn't work in output trace model [message #631090] Wed, 06 October 2010 07:36 Go to next message
Miguel Llàcer San Fernando is currently offline Miguel Llàcer San FernandoFriend
Messages: 63
Registered: July 2009
Member
Hi, I have a problem with references to input elements in traces model, but ONLY if I specify this reference in TO section.

My ATL transformation
------------------------------------------------------------ ----------------
create OUT : uim, OUT_TRACE : trace from IN : sketcher;

rule Sketcher2UserInterfaceModel {
from
i : sketcher!Sketcher
to
o : uim!UserInterfaceModel(
name <- i.id,
description <- i.description
),
__wmodel : trace!TraceModel (
wovenModels <- Sequence {__model_IN, __model_OUT}
),
__model_IN : trace!TraceModelRef (
name <- 'IN',
ref <- i
),
__model_OUT : trace!TraceModelRef (
name <- 'OUT',
ref <- o
)

In this case, __model_IN.ref doesn't references to input element 'i', it references to output element 'o' !!!!!!!

If I specify this references in DO section, it works fine, but I don't want use this section !!!
...
do {
__model_IN.ref <- i;
__model_OUT.ref <- o;
}
...

I don't understand... Sad What is wrong ?¿?

Thanks a lot
Re: [ATL] references to input elements doesn't work in output trace model [message #631096 is a reply to message #631090] Wed, 06 October 2010 08:02 Go to previous message
Sylvain EVEILLARD is currently offline Sylvain EVEILLARDFriend
Messages: 556
Registered: July 2009
Senior Member
Nothing is wrong, it's just working with the classical ATL resolve mechanism (i is transformed in o).

One solution would be to use the refining mode. Then you'd have :
rule Sketcher2UserInterfaceModel {
from
i : sketcher!Sketcher
to
k : sketcher!Sketcher(),
o : uim!UserInterfaceModel(
name <- i.id,
description <- i.description
),
__wmodel : trace!TraceModel (
wovenModels <- Sequence {__model_IN, __model_OUT}
),
__model_IN : trace!TraceModelRef (
name <- 'IN',
ref <- k
),
__model_OUT : trace!TraceModelRef (
name <- 'OUT',
ref <- o
)


This may complexify the rest of the transformation though.
Previous Topic:[ATL] Passing a parameter to a transformation
Next Topic:[ATL] How can i use a XML injector in a build in ATL 3.1 ?
Goto Forum:
  


Current Time: Sun Jun 16 07:25:04 GMT 2019

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

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

Back to the top