Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [henshin-dev] How to use "Or" nested condition?

Hi Jens,

On 01/11/2013 09:16 PM, Jens Bürger wrote:
Hello everyone,

what I try to do is the following:

there is a rule, and I want to match if there is a "call" OR "send"-Node attached to a (UML-)dependency.

What I understood I can use nested conditions like is the following:

- model the rule
- put the "call" and "send"-nodes into an "Or"-element of the LHS graph

No, only put the dependency node into the LHS. Lets call it "d".

In one of the nested conditions you should have:

- a dependency node "d1"
- a send node
- an edge connecting the two
- a mapping from the "d" to "d1"

in the other nested condition you have:

- a dependency node "d2"
- a call node
- an edge connecting the two
- a mapping from the "d" to "d2"

- create Dependency-Nodes in the nested conditions
- do a mapping between the Dependency-Node of the rule and the ones of the nested
  conditions

See rule.pdf: the rule shall match if there there exists a node of type "call" or of type "send" linked to the node named dep.

So I did the modelling as I thought it is right (see modell.png).
But the model editor doesn't accept any kind of action ("require" would be what I need) and the call/send-nodes don't show up in the graphical editor.

The graphical editor supports currently PACs (positive application conditions) and NACs (negative application conditions). The former are <<require>> the latter are <<forbid>> actions.

Both PACs and NACs are always parts of conjunctions (nested "And"s). What you have is a disjunction -- that is why it is neither a PAC nor a NAC. The graphical editor does not support "Or"-NestedConditions yet (mainly because we haven't found a good syntax yet). So you will not see the send and the call nodes. You can still edit the rest of the rule in the graphical editor, but for this detail you currently have to use the tree-based editor.

Hope that helps.

Cheers,
Christian


So I think I'm making a mistake?

Jens


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


Back to the top