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.

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

sensor A temperature process B<br />

Figure 6.6: A Continuous Flow<br />

Mapping on Synchronous Message Passing<br />

Message based communication does not model time-continuous flows straightforwardly.<br />

A message is a typically time discrete way <strong>of</strong> communication. When we<br />

observe a time discrete flow (on a channel) we see no activity on the flow in the time<br />

intervals between the messages. The moments <strong>of</strong> activity are the instants that a rendezvous<br />

(message passing) occurs. However, as stated before we decided to try to<br />

express the various sorts <strong>of</strong> communication with the one way synchronous message<br />

passing primitive. There is a specific behaviour at the side <strong>of</strong> the producer that we need<br />

to model the continuous flow with message passing. A normal rendezvous expresses<br />

the synchronisation <strong>of</strong> two independent partners that must both be willing to communicate.<br />

In the continuous flow case the producer <strong>of</strong> the flow is specified to be ready<br />

continuously to do a rendezvous. An initiative <strong>of</strong> a consumer (e.g. process B in Figure<br />

6.6) to do a rendezvous must be granted instantly by the producer (e.g. sensor A in<br />

Figure 6.6), during the time interval that the flow is produced.<br />

We specified a continuous flow with the restriction <strong>of</strong> a time interval where the flow is<br />

actively produced. Consequently this <strong>of</strong>fers the possibility to model that a continuous<br />

source is not available outside the interval. It must be possible to switch <strong>of</strong>f a continuous<br />

source (sending process). In general, we do not want the process, receiving the<br />

continuous flow, to get blocked because the rendezvous with a disabled continuous source<br />

cannot be finished. An elegant solution for this problem is to let the sender produce unk<br />

messages. (Unk is derived from the word unknown.) This solution makes that a receiver<br />

can always finish the rendezvous. The reception <strong>of</strong> an unk message enables detection<br />

that the source is not available. According behaviour can be specified.<br />

Examples <strong>of</strong> send statements that can be used to model continuous communication are:<br />

1. channel!temperature(real)<br />

2. channel!temperature(runk)<br />

The most simple POOSL description that produces messages continuously is a loop with<br />

statement 1 inside. Alternatively statement 2 can be used to send unknown values. In<br />

practice however a process must be able to handle operations other than the continuously<br />

sending <strong>of</strong> a message. The following construct enables to perform other operations while<br />

continuous communication is modelled as well:

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

Saved successfully!

Ooh no, something went wrong!