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.

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

attributes. They are not found during analysis, but they emerge from the design <strong>of</strong> an<br />

algorithm for the method.<br />

The behaviour <strong>of</strong> a method is described in a user defined expression E. Such an expression<br />

describes a sequential behaviour. Data expressions E are typically elements such<br />

as<br />

E m(E1 ¥¡ ¡ ¡ ¥ En) ’the message-send expression’<br />

x ’instance variables’<br />

u ’local variables or parameters’<br />

self ’the object that is currently evaluating this expression’<br />

¡ ’primitive objects, constants’<br />

new (C) ’new data object <strong>of</strong> class C’<br />

Data statements S are typically statements such as<br />

E ’data expression’<br />

x : E ’assign the value <strong>of</strong> E to x’<br />

S1; S2<br />

’sequential composition <strong>of</strong> statements’<br />

if E then S1 else S2 fi ’if statement’<br />

do E then S od ’do statement’<br />

For examples <strong>of</strong> data class definitions we refer to Subsection 12.3.8.<br />

6.6.5.2 Heuristics for data object modelling<br />

The design <strong>of</strong> data objects requires a continuous awareness for striving for real objectorientedness.<br />

The construction <strong>of</strong> data objects determines a part <strong>of</strong> the modularity in the<br />

system. As long as objects are found in a natural way in the problem domain the word<br />

construction may not feel adequately used. However many products nowadays contain<br />

at least a part that is artificially constructed (designed) instead <strong>of</strong> discovered. Mature<br />

judgement is necessary to make decisions that give an elegant model.<br />

Data objects require special attention. They are not depicted in the Message Flow Diagrams<br />

(see Paragraph 4.4.3.5) that play a dominant role in an analysis process. The need<br />

for data objects in a model comes in general with the modelling <strong>of</strong> the collaborating process<br />

objects. The variables in the process objects refer to data objects. They are private<br />

to process objects. In addition they are used as parameters for the inter-process communication.<br />

Data objects <strong>of</strong>ten model data structures. They can be joined to composites or<br />

aggregates. Although the search for data object classes may be postponed compared to<br />

the study <strong>of</strong> collaborating process objects, there is a point in time where the analysis <strong>of</strong><br />

relations between object classes becomes important.<br />

Object classes are visualised in Object Class Diagrams (see Subsection 4.11.1). The<br />

relations specified in these diagrams must be formalised into the behaviour description<br />

<strong>of</strong> the system. Relations can be implemented as instance variables or as functional<br />

behaviour. Some relations must be emancipated into new object classes. Heuristics for<br />

class modelling are described in a very practical way for OMT in [R 91]. We recommend

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

Saved successfully!

Ooh no, something went wrong!