Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[henshin-dev] multiRule Interpreter

Hi,

I checked in a beta version of the interpreter under branches/multiRuleInterpreter. Consider this a proposal! I made a change to Match that might be a bit controversial but works just fine. So, here is the outline of what I have done: - private Map<Rule, List<Match>> Match.nestedMatches: A match holds a map that contains a collection of matches for each multiRules. For Rules without multiRules this simply remains empty.
- EmfEngine:
-- findMatch and findAllMatches work recursive to build a Match-tree using an altered version of prepareMatchFinder, that allows injecting usedObjects and prematches. -- executeModelChanges accumulates the changes from a Match-tree into a ModelChange-Object that is passed recursively(much easier that merging two ChangeDescriptors). The traversal yields another Match-tree representing the comatch.

For this to work, there is one important constraint for the transformation model: As we discussed earlier, the kernel must not be mapped entirely into each multiRule. However, if a kernelNode is mapped inside the kernelRule(i.e. the node is preserved), either both or none of the kernelNodes must be mapped into a multiRule. In case both nodes are mapped there also has to be a mapping between the two inside the multiRule.

Regards,
Gregor



Back to the top