Next: , Up: Well-formedness -- Reply   [Contents][Index]


11.7.1 Cannot use requires port in reply

A reply which is issued to release a blocking trigger refers to the trigger’s port. Since blocking is effective on provides ports only, a well-formedness error is issued when a requires port is used. An example:

interface ihello
{
  in void hello ();
  out void world ();
  behavior
  {
    on hello:;
    on inevitable: world;
  }
}

component requires_port_repyl
{
  provides ihello p;
  requires ihello r;
  behavior
  {
    blocking
    {
      on p.hello (): p.reply ();
      on r.world (): r.reply ();
    }
  }
}

This results in the following error message:

requires-port-reply.dzn:21:22: error: cannot use requires port `r'
    in reply
requires-port-reply.dzn:15:3: info: port defined here