Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [henshin-dev] AND-split transition

Hello Amalia,

I suggest using an amalgamation unit for that case.
An amalgamation unit constructs a rule with some fixed part (kernel rule) and an arbitrary number of additional rules (multi rules) that have the fixed part in common.

In your case you need a kernel rule that matches a single transition that can fire (a rule with one transition and application conditions that ensure that all pre places have a token and depending on your Petri net type all post places are empty)

You also need 2 multi rules, one that removes a token from a pre place connected to the transition and another one that puts a token on a post place.

When applying the amalgamation unit, the transition is matched once and the multi rules are matched as often as possible. After no more matches are found, the amalgamated rule (constructed from all matches) is applied once.

If you want to use other transformation unit types, you have to somehow mark the transition you are currently firing until you are finished (for example with an attribute or a loop edge which must exist before token can be removed from pre places or put on post places.

Regards,
Enrico

On 20.04.2011 01:43, Amalia Sanusi wrote:

Hello,

 

I’m trying to create a rule for PetriNet’s AND-split firing transition. Please see the attachment for the example. Basically, when the AND-split transition fires, it “moves” the token from the initial place to the other 3 post-places. How can I achieve that iteration in Henshin? I’ve tried using the counted rule, but it can always fire other transitions before it finishes with the AND-split.

 

Any help is appreciated. Thank you.

 

---

Kind regards,

 

Amalia Sanusi

 

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

Back to the top