Expand single transition - sjdayday/xschema GitHub Wiki

home or [back](Expand ongoing process as an x-schema )

In addition to expanding the ongoing process, any other single transition can be expanded. In the case of Grasp, before we are ready to Close_hand, we must pre-shape the hand while approaching the object. We model this as the Prepare transition, beginning with Pre-shape:

images/transition1.png

Initially, Pre-shape is just the basic control flow. As it replaces the Prepare transition, we add a transition to either end of the basic control flow, and connect the arcs from the Enabled state and to the Ready state, to the corresponding transitions.

images/transition2.png

Next, we repeat the expand process for the Approach x-schema, with one difference. The default semantics of a single transition is that the x-schema(s) that replace the transition must all complete before the transition marks the outbound place. Instead of adding a new transition at the beginning and end of Approach, we add arcs to the same transitions that were added for Pre-shape, so both x-schemas begin from the same transition and end at the same transition. This implements "and" logic; the Prepare transition is complete when both Pre-shape and Approach are complete.

images/transition3.png

The implementation of expanding a single transition uses merge places to link the parent Petri net to each of the child Petri nets, just as was done for Grasp and Close_hand.

images/transition4.png

Add optional standard semantics