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.

4.15 Operations, Services, Methods 113<br />

This expression creates a new object <strong>of</strong> class C. All instance variables are nil after creation.<br />

Initialisation <strong>of</strong> instance variables must be performed by a transformer that is defined<br />

by the designer, with for example name initialise. This service can be denoted by the<br />

(equivalent) message name in the class <strong>of</strong> the Object Class Model.<br />

Transformers and accessors are denoted in graphical schemes: they are denoted as<br />

message names in class symbols in Object Class Models. Not all services are denoted<br />

graphically. User defined data objects in POOSL have two predefined services viz. the<br />

primitive methods ’deepCopy’ and ’equality’.<br />

4.15.4.2 Process Object Methods<br />

Process objects can be visualised during analysis in Object Class Models as well as<br />

in Instance Models. Messages are denoted in the classes in the Object Model. These<br />

messages should correspond to messages defined in the Message Flow Diagrams. Notice<br />

that process objects decide for themselves whether they want to accept a message in a<br />

given state. Messages between process objects are communicated via channels. Which<br />

messages are communicated on specific channels is specified in the message interface <strong>of</strong><br />

the class. Two process objects that exchange messages have at least one channel to do<br />

this. Architecture design determines the channel topology.<br />

The behaviour <strong>of</strong> a process is specified in terms <strong>of</strong> methods. Transformers and accessors<br />

can be modelled straightforward by using the same name for messages and methods.<br />

Many processes will however have the character <strong>of</strong> a controller. In this case the same<br />

message may evoke different responses at different times, depending on the state <strong>of</strong><br />

the process. The object has an autonomous character. Its behaviour may be defined<br />

to be infinite. The branching through various sequences and loops <strong>of</strong> methods defines<br />

the process behaviour. This behaviour is not defined by the messages, channels, and<br />

attributes solely. In Section 6.5 we will present scenarios as a means to informally<br />

describe the behaviour <strong>of</strong> a process, as a preparation for the formal definition <strong>of</strong> the<br />

methods in a class. In general a process will take part in several scenarios. Therefore<br />

the definition <strong>of</strong> the methods must be postponed until we can join the information <strong>of</strong> all<br />

scenarios to define the behaviour <strong>of</strong> a class.<br />

4.15.4.3 Methods, Messages and Events<br />

The description <strong>of</strong> analysis so far was mainly based on traditional object- oriented<br />

viewpoints. However SHE <strong>of</strong>fers a lot more. For a full understanding <strong>of</strong> what is<br />

necessary to analyse such complex things as processes, we need to explain various<br />

message flows. For a full description we refer to Section 6.3. Here is a brief overview <strong>of</strong><br />

the message flows (see also Figure 3.8):<br />

a single message flow between process objects represents events, commands, requests<br />

without reply, or requests with delayed reply on initiative <strong>of</strong> the receiver;<br />

a message with reply flow represents a request with waiting for reply, or a client server<br />

communication with waiting for reply;

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

Saved successfully!

Ooh no, something went wrong!