Skip to main content

[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 Felix and everybody else,

I really encourage you all to make suggestions for changes in the API. On the other hand, I also expect that all of you take an active part in the discussions we have here. I did my latest changes to the model API silently because I didn't get any real feedback from you guys before. So please be more active on the mailing list.

On a related subject: it would be also nice if you could make your own developments more visible to us, i.e., to commit your code to the SVN frequently (into branches if they are new developments). This way we all get aware of the others' work.

Felix: pls revert the change.

Cheers,
Christian

On 10/04/2012 09:45 PM, Riegerf@xxxxxxxxxxxxxxxxxxxxxxx wrote:
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

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



Back to the top