[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[henshin-user] Multi-rules questions


We're trying to make sense of multi-rules in Henshin and what their exact semantics are. We've built some fairly complex rules which are meant to match all occurrences of a particular pattern and make a consistent set of modifications to this set in one go. Below, I list some questions we have come across, but haven't really found any responses to. Is there a more detailed tutorial / documentation document somewhere that we just haven't found yet or could someone help us understand what is going on here?

  1. Multi-nodes seem to be optional. That is, if a multi-node cannot be matched, the rule will still be matched and executed. We need to say that the multi-node needs to be matched at least once. We have tried adding a PAC using a <<requires>> patterns, but that just seems to have stopped the rule from matching at all. We have also tried "loop unwinding" the multi-node once, but that seems to require duplicating all the pattern and all the changes that go with it, which becomes quite cumbersome and creates additional problems (see below). What is the recommended way to go about this?
  2. We are a bit unclear about how multi-nodes connect with simple nodes, especially where <<create>> elements are present. For example, if we want to say that all matches of a particular multi-node need to be connected to the same newly created object vs each one being connected to its own newly created object vs each one being connected to an object to be (possibly uniquely) selected object from the matches of another multi-node. Is there a discussion somewhere, which of these can/cannot be done and how they can be done?

Any pointers would be most useful :-)

Many thanks,

Steffen and Kinga

Dr. rer. nat. Steffen Zschaler AHEA
Senior Lecturer

King's College London
Department of Informatics

Email szschaler@xxxxxxx
Phone +44 (020) 7848 1513
WWW   http://www.steffen-zschaler.de/