EMFTVM/ATL How to assign the result of a rule matching several elements [message #1053440] |
Sun, 05 May 2013 16:49  |
Eclipse User |
|
|
|
Dear all,
progressing in the implementation of a model transformation with EMFTVM, I am facing a new issue: I wrote a matched rule that matches 2 elements but I didn't find out how to store the result of this rule in my model.
Here is a snippet of code to illustrate what I have in my code (sorry if it is not correct, I wrote it directly on the forum):
rule R1
{
from
c: AADL!ComponentInstance
to
implImg: AADL!ThreadImplementation
(
calls <- c.calls -- list of SubprogramCall
)
}
rule R2
{
from
call: AADL!SubprogramCall
to
callImg: AADL!SubprogramCall
}
rule R3
{
from
c: AADL!ComponentInstance,
call: AADL!SubprogramCall
(c.entryPoint = call)
to
callImg: AADL!SubprogramCall
}
Basically, what I would like is that the element created by R1 (implImg) contains in it attribute "calls" the list of SubprogramCall created by R2 or R3. I tried using inheritence (R3 inherits R2) but it did not work. Maybe a "special" resolveTemp could solve my problem...
Any suggestion?
Thanks a lot,
Etienne.
[Updated on: Mon, 06 May 2013 16:34] by Moderator
|
|
|
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.07158 seconds