[ATL] Why is the containment hierarchy of a target ecore model ignored? [message #491380] |
Wed, 14 October 2009 12:06 |
Philipp Simon Messages: 26 Registered: July 2009 |
Junior Member |
|
|
Hi,
imagine two simple models:
m1:
ClassA<>--ClassB
m2:
ClassX<>--ClassY
we also have two rules stating that A maps to Y and B to X like:
rule AtoY{
from a: AB!A
to y: XY!Y ()
}
rule BtoX{
from b : AB!B
to x : XY!X ()
}
Then the output from the transformation is not compliant to the target metamodel since this will create Y elements not contained by corresponding X's.
Of course it is possible to specify a rule that respects the target model ( e.g. introducing dummies or multiple target patterns and setting the references along the way). Though to me this seems like something that should be resolved automatically. Is there a theoretical/design reason why ATL would not take care of this automatically?
Thanks,
Philipp
|
|
|
Powered by
FUDForum. Page generated in 0.01880 seconds