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.

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

areYouOpen. The result <strong>of</strong> the operation is returned to the sending object. This example,<br />

extracted from our case study, concerns a data object that models a mechanical<br />

safety bridge that must be closed before the machine is allowed to run. Another example<br />

concerns a data object that represents personalised product information. Such an object<br />

can be requested whether some service, such as the feeding <strong>of</strong> a particular magazine,<br />

must be performed. A feeder could need the send expression:<br />

productInformation doYouNeedService(actualServiceOffered)<br />

This expression means: Send to object productInformation, the message doYouNeedService 2 ,<br />

with the parameter actualServiceOffered. The result <strong>of</strong> the operation is returned to the<br />

sending object.<br />

Recall that data objects do not communicate via channels, and that data objects are not<br />

visualised in Message Flow Diagrams or Instance Structure Diagrams. Their communication<br />

is modelled by a formal behaviour description in the language POOSL. Data<br />

objects are generally used to model relatively simple and dynamic items in the problem<br />

domain. They behave sequentially and can only be used in a sequential behaviour<br />

description. In a system specification they are used within the behaviour description<br />

<strong>of</strong> the process objects. This is consistent with the fact that process objects are internally<br />

sequential.<br />

6.3.6 Graphical Communication Primitives for Process Objects<br />

This subsection describes the graphical primitives that enable visualisation <strong>of</strong> communication<br />

between process objects in Message Flow Diagrams. Process objects are<br />

independent concurrent entities that can choose whether they want to communicate or<br />

not. They always perform their communication via channels. Synchronous communication<br />

is a transport between objects via a channel, based on the coinciding readiness to<br />

execute individually specified communication actions. In contrast to data objects whose<br />

message passing is expressed in a single message-send expression, process objects need<br />

two independent descriptions. The one way synchronous message passing primitive is expressed<br />

in terms <strong>of</strong> two separate statements, one in each process object. There is a<br />

message-send and a message-receive statement. A simultaneous instantaneous execution<br />

<strong>of</strong> corresponding message-send and the message-receive statements results in a<br />

rendezvous. The statements correspond if they refer to the same channel and the same<br />

message. POOSL <strong>of</strong>fers a clear way to express synchronous message passing. The<br />

sender specification contains a message-send statement <strong>of</strong> the form:<br />

channel-name ! message-name (parameters)<br />

The receiver specification contains a message-receive statement <strong>of</strong> the form:<br />

2 We recommend to begin message names and variable names with a lowercase character, and class<br />

names with an uppercase character.

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

Saved successfully!

Ooh no, something went wrong!