Skip to main content



      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 03:36 Go to next message
Eclipse UserFriend
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 04:02 Go to previous message
Eclipse UserFriend
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: Sat Jul 05 08:33:09 EDT 2025

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

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

Back to the top