Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [henshin-dev] API: how to use findMatches?

Hi Jens,

Am 18.07.2012 17:24, schrieb Jens Bürger:
Hello everyone,

I'm interested in using the Henshin API. Thus I am playing around with some code working on the "Bank"-example.

I read
<http://wiki.eclipse.org/Henshin_Interpreter> and I want do print all matches for the rule "createAccount" on the console.
I wonder

What is the precise meaning of the "partialMatch"-parameter?


If set, the partial match restricts the set of "full" matches computed by the engine. You can use partial matches to specify that (some of the) parameters should take specific values (since Match inherits from Assignment) or you can specify that some of the nodes in the LHS should be mapped to some given EObjects.


How can I make use of parameters? As far as I see, parameters are applied to (in this case) a RuleApplication-object, but findMatches() works directly on the engine?

Since Match extends Assignment you can use the methods in Assignment to set parameter values. The methods in RuleApplication are just convinience methods which delegate to the corresponding methods in Assignment / Match.

Cheers,
Christian



Jens
_______________________________________________
henshin-dev mailing list
henshin-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/henshin-dev



Back to the top