Understanding ATL rule inheritance [message #530694] |
Fri, 30 April 2010 14:47 |
Federico Messages: 1 Registered: April 2010 |
Junior Member |
|
|
Hello,
I have the following matched rules:
rule A {
from
s : MM1!A
to
t : MM2!B (
a <- a
)
}
rule B extends A {
from
s : MM1!AA
to
t : MM2!BB (
b <- b
)
}
where the entity MM1!AA inherits from the entity MM1!A in the source metamodel.
After the transformation, I was expecting to obtain MM2!B as well as MM2!BB, however I only obtain MM2!B. In other words, when an instance of MM1!AA is matched I would like to get two instances in the target MM: one of type MM2!B and one of type MM1!BB and that both are created in this order.
My question is: Is it possible to do this implicitly or I have to do it explicitly (for example by creating a sequence in a container attribute of a class that references to both classes) ?
I was also trying to do the same but in this way
rule B extends A {
from
s : MM1!AA
to
t 1: MM2!B (
a <- a
),
t2: MM2!BB (
b <- b
)
}
Since there is no relation between t1 and t2 then only t1 is being created, but this is not what I want.
Thank you very much in advance for any help !
Federico .-
|
|
|
Powered by
FUDForum. Page generated in 0.03434 seconds