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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

6.3 Communication 163<br />

Synchronous message passing is a quite primitive concept. We would like to have<br />

primitives that are more expressive. During analysis we must be able to show and<br />

recognise the various forms <strong>of</strong> communication easily. In the next subsections we will<br />

show how we use this concept <strong>of</strong> synchronous message passing to define and build the<br />

various forms <strong>of</strong> communication we need.<br />

6.3.5 Data Object Communication<br />

The communication with a data object is strictly limited to one sort. This sort is synchronous<br />

communication with reply and waiting. The sender may be either a process object<br />

or a data object. POOSL <strong>of</strong>fers a simple way to express this. The sender specification<br />

contains a message-send expression in the form <strong>of</strong>:<br />

destination-expression message-name (parameters)<br />

The destination-expression is evaluated by the object that plays the role <strong>of</strong> sender. The<br />

message-name is the name <strong>of</strong> a service <strong>of</strong>fered by the receiver. The message may contain<br />

parameters in the form <strong>of</strong> expressions that are evaluated before the message is sent.<br />

The sending object suspends its operations and waits until the receiver sends the result<br />

<strong>of</strong> its operations to the sender <strong>of</strong> the message. So the result <strong>of</strong> the evaluation <strong>of</strong> the<br />

message-send expression is that the result from the receiving object is returned to the<br />

sending object. See Figure 6.1. A formal semantics for synchronous communication with<br />

Data object A<br />

(sends and waits<br />

for reply)<br />

Message<br />

Reply<br />

Figure 6.1: Communicating Data Objects<br />

Data object B<br />

(activated after<br />

message<br />

reception)<br />

reply and waiting could be built from two one way message passing primitives. A first<br />

rendezvous is necessary to hand over the message from sender to receiver. A second<br />

rendezvous is necessary to hand over the result from receiver to sender. In reality the<br />

formal semantics is described using another operational model (see Chapter 8).<br />

Users <strong>of</strong> the method do not have to know about the details <strong>of</strong> the formal semantics. A<br />

behaviour specification may be for instance:<br />

bridgeContact areYouOpen<br />

This message-send expression means: send to object bridgeContact, the message

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

Saved successfully!

Ooh no, something went wrong!