|
|
Re: In-place refining mode is now available for EMFTVM [message #1005820 is a reply to message #1005705] |
Mon, 28 January 2013 15:32   |
Eclipse User |
|
|
|
Op 28-01-13 12:00, Skander Mising name schreef:
> Hi Dennis,
> Is it possible, using this new in-place refining mode to implement models'
> synchronization? I suppose we would need two transformations, one for each
Yes, indeed. In the EMFTVM launch dialog as well as the Ant tasks, you can
specify IN/OUT models. These IN/OUT models can either be new or existing models.
> direction. And also two higher-order transformations to reduce (comment out)
> the rules that should not participate in the update transformation each time a
> synchronization is needed.
> Does it seem to be a good approach for you?
>
> Thanks in advance.
Hmm, an update transformation should rather test for the existence of target
model contents. Something like this:
rule MyRule {
from s : SMM!Source (TMM!Target.allInstance()->forAll(t | t.name <> s.name))
to t : TMM!Target (...)
}
rule MyRuleExisting {
from t : TMM!Target,
s : SMM!Source (s.name = t.name)
to t1 : TMM!Target mapsTo t (...)
}
Perhaps you can write a HOT to generate the MyRule/MyRuleExisting rule pair
out of regular transformation rules. See what works for you...
Regards,
Dennis
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03368 seconds