Behavior/InputPinPort [ Rules ]

[ Top ] [ Behavior ] [ Rules ]

SUMMARY

Transform a SysML InputPin into a HiLeS Port. ($Rev: 443 $)

DESCRIPTION

InputPins that belong to CallOperationActions must be transformed to Ports which will be added to the Strucural Block that contains it.

SEE ALSO

DOMAIN

SPECIFICATION

        relation InputPinPort
        {
            checkonly domain SysML pin:InputPin {
                action = a:CallOperationAction{},
                name = nn,
                id = nid,
                type = nt:Type{}},
            }
            enforce domain HiLeS port:Port {
                block = b:Structural,
                name = nn,
                id = pid,
                direction = PointDirection::input,
            }
            when {
                StrcuturalBlockBehavior(a.behavior.getParentBlock(), b, pin, pout);
                CallOperationAction->allInstances()->exists(co |
                        (co.target->notEmpty() and co.target = pin)
                        or co.result->includes(pin) or co.argument->includes(pin)))
                    or CallBehaviorAction->allInstances()->exists(co |
                        co.result->includes(pin) or co.argument->includes(pin))) 
            }
            where {
                if nt->notEmpty() then
                    pid = nt.id;
                else
                    pid = nid;
                endif
            }
 *