[ATL] references to input elements doesn't work in output trace model [message #631090] |
Wed, 06 October 2010 07:36 |
Miguel Llàcer San Fernando 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... 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 |
Sylvain EVEILLARD 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.
|
|
|
Powered by
FUDForum. Page generated in 0.01384 seconds