[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [henshin-dev] henshin-commits Digest, Vol 17, Issue 1
|
Hi Christian,
Quoting Christian Krause <henshin.ck@xxxxxxxxx>:
please explain your latest commit. I told you how you can find all
matches using the InterpreterUtil class.
I added the functionality to the RuleApplication for three reasons.
First, RuleApplications already implement a lot of method to retreive
Matches of all kinds. Putting a method to find all matches makes sense
semantically. Second, RuleApplications previously supported
findAllMatches(). Third, a RuleApplication bundles the Rule, a
prematch, the Engine and the Graph in a convenient object; these are
exactly the arguments InterpreterUtil.findAllMatches needs. Since it
is not reimplemented in RuleApplication, but merely calls
InterpreterUtil.findAllMatches, it makes sense to provide programmers
with a convenient way to find all matches for a given RuleApplication.
Why do you change the interpreter API without discussing it with us???
1) I didn't remove functionality or change implementations of existing
methods. No existing code is affected.
2) The change is quite trivial.
When I was working on the new API, I explicitly asked you guys for
comments. Nobody had even a single comment on the API.
The API looks generally fine, but I am currently porting some code
that relied on older versions of Henshin to the new API. In doing so,
I found some possibilities for slight adaptations.
I really put a lot of thought into the API. I explicitly removed
RuleApplication.findMatches() because the match finding is the job
of the engine. I do not want to have duplicate functionality in
RuleApplication and Engine!!!
The RuleApplication interface contains the following methods:
Rule getRule();
void setRule(Rule rule);
Match getPartialMatch();
void setPartialMatch(Match partialMatch);
Match getCompleteMatch();
void setCompleteMatch(Match completeMatch);
Match getResultMatch();
[ List<Match> findAllMatches(); ]
almost all of these methods deal with Matches.
I believe this API is enough for finding matches. Please revert the change.
I agree with you that this API is enough for finding matches. However,
we might want to think of making it more accessible to programmers,
e.g. by the addition I introduced. If you do not see the point in
doing so, please drop me a line and I will revert my change.
Greetings,
Felix