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.14 Attributes and Variables 107<br />

characterise the object, but is determined by the implementation <strong>of</strong> the behaviour <strong>of</strong> the<br />

object. This data ’lives’ temporarily during specific activities <strong>of</strong> an object. We will define<br />

(in Subsection 6.6.3) the ’state’ <strong>of</strong> an object based on observable behaviour, instead <strong>of</strong><br />

on data. In contrast to local data, the data that really characterises an object is stored<br />

as variables that can be retrieved and/or transformed via its message interface. In this<br />

sense these variables are indirectly ’available’ or ’exported’. These variables make or<br />

form the object. They are always needed, even when the class would be implemented<br />

afresh, with an alternative behaviour description <strong>of</strong> its internal operations. In an Object<br />

Class<br />

symbol<br />

Class sort<br />

P: Motor<br />

Attributes:<br />

Speed<br />

Messages:<br />

Start<br />

Stop<br />

Class name<br />

Figure 4.30: Class Symbol<br />

Class<br />

attributes<br />

field<br />

Class<br />

messages<br />

field<br />

Class Model attributes can be denoted in the class symbols in a class attributes field,<br />

see Figure 4.2. All objects are instantiated with the attributes <strong>of</strong> its class. Rumbaugh<br />

notices that an attribute should be a pure data value, not an object [R 91]. Analysis is a<br />

continuous process <strong>of</strong> making decisions whether a property <strong>of</strong> an object must become<br />

an attribute, an association or a new class. The task during analysis is defining what<br />

properties <strong>of</strong> a class are necessary for the working <strong>of</strong> the system to be designed. This is<br />

all what abstraction is about. The best model is the most simple one that is appropriate<br />

for the tasks to be performed.<br />

Conceptual modelling, which is performed when creating an Object Class Model, is rather<br />

different from the instance approach we recommend for reactive systems. A clear understanding<br />

<strong>of</strong> the differences lets us decide what form <strong>of</strong> modelling is most appropriate<br />

for the system part to be analysed. For Object Class Modelling it is recommended to<br />

avoid defining attributes that are references to other objects. They should be modelled as<br />

relationships instead. An Instance Approach works in a completely different way. Instead<br />

<strong>of</strong> defining classes, collaborating objects are defined. By determining the message flows,<br />

objects can get ’a network’ <strong>of</strong> acquaintances. When defining classes from this approach

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

Saved successfully!

Ooh no, something went wrong!