Behavior/JoinForkTargetControlFlow [ Rules ]
[ Top ] [ Behavior ] [ Rules ]
SUMMARY
Transform a SysML ControlFlow into its HiLeS Petri Net equivalents. This rule applies for ControlFlows that have a Join or Fork node as target and the source node is diferent a DecisionNode. ($Rev: 457 $)
DESCRIPTION
ControlFlows that have a JoinNode or a ForkNode as the target element and a source node diferent to DecisionNode are transformed into a transition and two arcs (as normal ControlFlows) and an additional place and arc to connect it to the transition to the Join/Fork transformation. NOTE: This can not be done in the Join/Fork rule because the number of ouput arcs and places (A3, P) is unknown at this time.
| Ain T | Aout P | A3 (cf.target)
SEE ALSO
DOMAIN
SPECIFICATION
relation JoinForkTargetControlFlow { checkonly domain SysML cf:ControlFlow { activity = a:Activity{}, name = cfn, source = cfs:ActivityNode{}, target = cft:ActivityNode{}, } enforce domain HiLeS t:Transition { PetriNet = pn:PetriNet{}, name = cfn, } enforce domain HiLeS ain:Arc { PetriNet = pn:PetriNet{}, to_node = t, from_node = ainform:Node{}, } enforce domain HiLeS aout:Arc { PetriNet = pn:PetriNet{}, from_node = t, to_node = p, } enforce domain HiLeS p:Place { PetriNet = pn:PetriNet{}, name = pname, } enforce domain HiLeS a3:Arc { PetriNet = pn:PetriNet{}, to_node = a3to:Node{}, from_node = p, } when { PetriNet(a, pn, arch); cft->isTypeOf(JoinNode) or cft->isTypeOf(ForkNode) and not (cfs->isTypeOf(DecisionNode)) } where { if cfs->isTypeOf(JoinNode) then pname = cfn + "_JoinPlace"; JoinNodePN(node, a3to); else pname = cfn + "_ForkPlace"; ForkNodePN(node, a3to); endif if cfs->isTypeOf(CallBehaviorAction) then CallBehaviorPN(cft, p1t, p2t, ainfrom, t1t, t2t, a1t, a2t, a4t, a6t, a3t, a5t); else if cfs->isTypeOf(CallOperationAction) then CallOperationPN(cft, p1t, p2t, ainfrom, t1t, t2t, a1t, a2t, a4t, a6t, a3t, a5t); else ainfrom ::= cf.target; -- TO-DO: how to specify declarative relations endif endif } *