23.08.2013 Views

Specification of Reactive Hardware/Software Systems - Electronic ...

Specification of Reactive Hardware/Software Systems - Electronic ...

Specification of Reactive Hardware/Software Systems - Electronic ...

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

178 Modelling <strong>of</strong> Concurrent <strong>Reactive</strong> Behaviour<br />

to send a message to one arbitrary object out <strong>of</strong> a collection <strong>of</strong> objects (see Subsection<br />

6.3.8).<br />

Delay Model<br />

The solution for the problem had to wait until the semantics <strong>of</strong> POOSL was extended<br />

with a delay primitive [Gei96]. The delay operator can define a stop criterion for multicast<br />

behaviour. Until a specified period <strong>of</strong> time is over an arbitrary number <strong>of</strong> send statements<br />

can be performed. Hence, during that period <strong>of</strong> time an arbitrary number <strong>of</strong> rendezvous<br />

with the receivers can be performed.<br />

Weakly Distributed Model<br />

If the receivers can be known or if the number <strong>of</strong> receivers can be known, another way to<br />

construct a multicast is possible. Although this is not a natural multicast we can express<br />

the behaviour <strong>of</strong> the sender as a sequence <strong>of</strong> send statements performing the rendezvous<br />

with all receivers. The messages can be sent with an explicit use <strong>of</strong> the identifiers <strong>of</strong> the<br />

receivers. In this case the sender must know all these names.<br />

Willingness<br />

Our concept <strong>of</strong> multicast is that receivers that do not want to accept, or that are not ready<br />

to accept, do not receive the message. A sender can only continue its behaviour, when<br />

all the message passing with all potential receivers is completed. So we have to make<br />

sure that receivers that are not ready or are not willing to receive do immediately finish<br />

the rendezvous and discard the message. We can force objects to do this by defining<br />

an interrupt message that finishes the rendezvous <strong>of</strong> the multicast. When the object is<br />

willing to receive a multicast message on channel ch, the object is ready for the execution<br />

<strong>of</strong> a receive statement:<br />

ch?multicast message name<br />

When the object is not ready or willing to receive, the actual behaviour must be specified<br />

with an interrupt:<br />

(S1; ¡ ¡ ; Sn) interrupt ch?multicast message name<br />

After the interrupt the behaviour is resumed where it was interrupted. The message<br />

is discarded. It is simply ignored, because there is no additional behaviour for the<br />

interrupt.<br />

A Buffered Model<br />

Another possible way to model multicast communication comes from the recognition<br />

that a multicast is rather asynchronous. We can model a buffered message flow to all<br />

potential receivers, with a one place buffer. Now the sender can finish all the rendezvous<br />

with all potential receivers without waiting. This model, however, allows a receiver to<br />

read its buffer after some time. This does not match to the intuitive notion <strong>of</strong> an<br />

instantaneous character <strong>of</strong> a multicast. We would need some real-time primitive again<br />

to clear the buffer when the receiver does not react immediately.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!