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.

286 Process Part <strong>of</strong> POOSL<br />

in<br />

x<br />

Sender Receiver<br />

y<br />

Figure 9.1: A Simple Handshake Protocol<br />

will demonstrate that the protocol behaves as a 1-place buffer. The protocol, consisting<br />

<strong>of</strong> a Sender process and a Receiver process, is visualised in figure 9.1.<br />

The Sender can receive some data from channel in and this data is delivered by the<br />

Receiver at channel out. Externally the protocol behaves as a 1-place buffer. The protocol<br />

is specified as follows:<br />

(Sender ¢ Receiver) £<br />

x¥ y¦ ¥<br />

<br />

¥ Sys p Sys ¥<br />

<br />

<br />

For reasons <strong>of</strong> simplicity we assume that there are no non-primitive data classes, so<br />

Sys . Sysp consists <strong>of</strong> process classes Sender and Receiver. It is defined as Sysp <br />

7<br />

process class Sender<br />

instance variables<br />

communication channels in x y<br />

message interface in?receive(dS) x!transfer(dS) y?ack<br />

initial method call start<br />

instance methods start ¡ dS ¡<br />

in?receive(dS); x!transfer(dS); y?ack; start<br />

¡ ¡<br />

<br />

process class<br />

instance variables<br />

Receiver<br />

communication channels x y out<br />

message interface x?transfer(dR) out!deliver(dR) y!ack<br />

initial method call start<br />

instance methods start dR<br />

x?transfer(dR); out!deliver(dR); y!ack; start<br />

Configuration ¢ (Sender Receiver) £ <br />

¥ x¥ y¦ ¥ Sysp ¥ Sys reflects the state <strong>of</strong> the protocol<br />

where both the sender and the receiver are not initialised yet. The actual computation<br />

starts by initialising either the sender or the receiver. By axiom (8’) we have<br />

<br />

Sys ¥ Sender¥ p ¥<br />

Sys £ £<br />

<br />

<br />

Sender £ ¤ ¦ ¥<br />

¥ proc start §<br />

¥ ¤ ¥ Sys p ¥ Sys<br />

7 The specifications and configurations use some obvious syntactic simplifications.<br />

ou t

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

Saved successfully!

Ooh no, something went wrong!