Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [henshin-dev] Injective Matching & Multi Nodes

Hi Sebastian,

2014-10-14 18:47 GMT+02:00 Gabmeyer Sebastian <gabmeyer@xxxxxxxxxxxxxxxx>:
Sorry last mail went off too fast... Here the complete one.
... 
So this essentially means that any node of the host graph matched by the LHS graph cannot be matched again by a NAC/PAC node, right?


Well, it is implicitly matched already by the LHS and, yes, it won't be matched again to any other node.

 
I see, I think the way I'm using multi nodes would probably qualify as abuse ;)  since we only use simple rules in our application scenario, that is, no units and no control flow, we add multi-nodes to rules to match zero or more nodes. Since we do not have a kernel rule, only deletion nodes seem to make sense in our context... Is there any problem using multi nodes as described here?

Using multi-rules for applying a rule to all possible matches is a very common use case. Technically, you still have a kernel rule, but it is empty. The interpreter actually works in the same way as in the non-empty case. It first tries to find a match for the kernel rule and then matches the multi-rules as often as possible. The match of the kernel-rule in this case is the empty match.

Cheers,
Christian

Back to the top