Next: , Previous: , Up: Specifying Behaviour   [Contents][Index]


3.6.11 Restrictions Multiple Provides

For a component with a behaviour and with multiple provides ports, two restrictions hold. These restrictions relate to the fact that activity cannot be forked. These are the restrictions:

1) Within the handling of an in-event of a provides port, it is not allowed to post an out-event on another provides port.

2) Within the handling of an out-event of a requires port, it is not allowed to post an out-event to more than one provides port.

The violation of any of these restrictions will be reported as a compliance error.

These are examples of the two types of violations:

interface Intf
{
    in void e();
    out void c();
    behaviour
    {
        on e: {}
        on optional: c;
    }
}
component ViolationType1
{
    provides Intf p0;
    provides Intf p1;
    behaviour
    {
        on p0.e(): p1.c(); // compliance error: p1.c not allowed by port p1
        on p1.e(): {}
    }
}
component ViolationType2
{
    provides Intf p0;
    provides Intf p1;
    requires Intf r;
    behaviour
    {
        on p0.e(), p1.e(): {}
        on r.c(): { p0.c(); p1.c(); } // compliance error: p1.c not allowed by port p1
    }
}

See also: