[ECL] Finding out "visited" features of an ECL rule [message #730189] |
Tue, 27 September 2011 16:19  |
Eclipse User |
|
|
|
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)?
Thank you very much in advance for any advice!
Philip
|
|
|
|
|
Re: [ECL] Finding out "visited" features of an ECL rule [message #734929 is a reply to message #730189] |
Mon, 10 October 2011 09:02  |
Eclipse User |
|
|
|
Hi Horacio, hi Louis,
thanks a lot for your replies!
I already conducted some first tests concerning the approach proposed by Horacio. Accessing the AST works as expected; when knowing what and where to search for, it is possible to collect all metamodel features that are visited by the respective rule. It is not a very convenient way though as you'd have to "know" the feature names and class names of the metamodel that is being matched in advance. There is no explicit link to the respective metamodel.
Thus, I'd be very interested in collaborating regarding this feature with you, Louis.
I'll write you an email with my requirements soon to find out what we both can to do.
Thanks,
Philip
|
|
|
Powered by
FUDForum. Page generated in 0.03045 seconds