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.

9.6 Example: A Simple Handshake Protocol 287<br />

Using rule (s’) we then deduce<br />

<br />

¢ ¥ Receiver¥<br />

Sender Sysp Sys £ £<br />

<br />

<br />

¥<br />

proc £ ¤ ¦ ¥ ¥ ¤ ¥ Sys start § ¢ Receiver¥<br />

Sender p Sys ¥<br />

and thus by rule (v’)<br />

£ <br />

x¥ y¦ ¥ ¥ ¢ (Sender Receiver) Sysp <br />

¥ Sys £<br />

¢ (start § Sender Receiver) £ £<br />

<br />

proc £ ¤ ¦ ¥ ¥ ¤ ¥ Sys x¥ y¦ ¥<br />

p Sys ¥<br />

By applying axiom (4’) and rules (s’),(v’) we get<br />

<br />

§ (start ¢ Sender Receiver) £ £<br />

<br />

proc £ ¤ ¦ ¥ ¥ ¤ ¥ Sys x¥ y¦ ¥<br />

p <br />

¥ Sys £<br />

start) ¢ (§<br />

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

£<br />

£ <br />

¥ proc¥<br />

proc £ nil¦ ¥ ¤ ¥ £ ¤ ¦ dS Sysp ¥ Sys<br />

The latter configuration reflects the situation where the receiver is able to receive message<br />

receive and data dS from channel in, and where the receiver is still uninitialised. If we<br />

let the receiver perform its message reception we get, by applying axiom (3’) and rules<br />

(b’),(s’),(v’)<br />

<br />

(§ start) ¢<br />

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

£<br />

£<br />

<br />

¥ proc¥<br />

<br />

proc £ ¤ ¦<br />

¢ (§ start) start (x!transfer(dS); y?ack; Sender Receiver) £<br />

dS £ nil¦ ¥ ¤ ¥ Sys p ¥ Sys<br />

data¤<br />

¤ £<br />

in?receive£<br />

y¦ ¥ x¥<br />

x¥ y¦ ¥<br />

x¥ y¦ ¥<br />

£<br />

£<br />

£ ¥ ¥ proc dS £ ¤ ¦ ¥ proc¥<br />

Sys ¦ ¤ p Sys ¥<br />

<br />

Here, data ¥ for ¤ PDObj. This can be<br />

<br />

¥ ¤ seen as<br />

¡<br />

¡ ¡ 1 ¥ 1¥ ¡ ¤<br />

some primitive data object<br />

follows: According to axiom (3’), data should be <strong>of</strong> the form 1 Struc1 Sys£<br />

<br />

we have by (2) <strong>of</strong> the definition <strong>of</strong> Sys-structures that Dom(<br />

min.<br />

Since Sys ¡ ¤<br />

¤ ¤ Dom(¡<br />

¡<br />

¤ Dom(¡ ¡ Dom(¡<br />

, and<br />

therefore by (1) <strong>of</strong> the same definition that 1 NDObj) =<br />

1)<br />

. By Proposition 1(c) we<br />

know that proc 1) and thus 1) = . Now according to (4) <strong>of</strong> the definition<br />

<strong>of</strong> Sys-structures ¤ 1 ¡ NDObj implies ¤ 1 ¡ Dom(¡ 1). Therefore ¤ 1 ¡ PDObj and thus thus<br />

data is <strong>of</strong> the form ¥ ¤ ¥ ¤ .<br />

If we continue calculating the transitions between the involved configurations we construct<br />

a so-called transition graph, shown in Figure 9.2, representing the behaviour <strong>of</strong> the<br />

protocol. The transition graph consists <strong>of</strong> 18 configurations (represented by the nodes <strong>of</strong><br />

the graph), some <strong>of</strong> which are parameterised. ¡ The mark attached to node conf p<br />

1 denotes<br />

that this is the starting configuration. The § © substitution ¥¡ © S R indicates that parameters<br />

S and R <strong>of</strong> conf p<br />

18( ¥ S R ) have to be replaced by and respectively. Substitution<br />

<br />

has a similar meaning. Further, a? denotes receive action in?receive§ ¥ ¤ ¥ ¤ and<br />

§<br />

©¢ <br />

<br />

a! out!deliver§ ¥ ¤ ¥ ¤ denotes send action .<br />

Note that, although the graph <strong>of</strong> Figure 9.2 has a finite amount <strong>of</strong> nodes, it represents an<br />

infinite transition graph. Node conf p<br />

7 ( ), for example, represents a collection <strong>of</strong> nodes,<br />

one for ¡ each PDObj. The configurations are given by

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

Saved successfully!

Ooh no, something went wrong!