Philip Langer Messages: 6 Registered: December 2010 Location: Vienna, Austria
Junior Member
I was wondering whether there is an "easy" possibility to programmatically find the metamodel features that are visited/read by an ECL match rule. I'm interested in such a technique to know for any match rule after which changes applied to a model it has to be matched with another model again. Obviously, it only has to be re-matched if a feature value changes, which is visited/read by the corresponding match rule.
Let me give you a short example. I have the following match rule:
rule EClass2EClass
match o : Origin ! EClass
with r : Revised ! EClass {
compare : o.name = r.name
}
Now I have two evolving Ecore models and I would like to determine after which change I have to rerun the comparison for which instances of EClass. In this example, this is obviously only necessary if the name of an instance of an EClass has been changed.
In other words, is there a way to statically parse the abstract syntax of a rule and collect for each rule the metamodel features it reads for matching two objects (e.g., EClass.name)?