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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

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

ways <strong>of</strong> thinking. Instead <strong>of</strong> functions we must look for autonomous entities that<br />

encapsulate data and operations. It appears to be difficult to see that conceptual things<br />

in the problem domain must be modelled as objects too. We tend to see them as values<br />

<strong>of</strong> data. In fact we have to make this data autonomous, by joining the operations to it,<br />

and by encapsulation <strong>of</strong> the whole.<br />

It will require mature judgement and careful design to separate data and control in<br />

an object-oriented model soundly. Much depends on the specification style used for<br />

the specification model. Clear control design requires explicit determination and clear<br />

naming <strong>of</strong> states. It depends on the level <strong>of</strong> abstraction that is used in the specification<br />

whether this is possible or not. An example can clarify what we mean by specification<br />

style and level <strong>of</strong> abstraction. Consider two behaviour descriptions that seem to perform<br />

the same behaviour:<br />

1. for i:=1 to 3 do a!m 10<br />

2. a!m;a!m;a!m<br />

Case 2 describes very concrete what the sequential steps are in the behaviour. We can<br />

identify in what behaviour state we are. Case 2 is a static description <strong>of</strong> behaviour. There<br />

is a sequence <strong>of</strong> three communication statements. An interpretation <strong>of</strong> this sequence as<br />

three separate behaviour states is possible. We could give these states names such as<br />

sending first packet, sending second packet, etcetera. Case 1 is a powerful abstract and<br />

more flexible mechanism to describe the same behaviour. In case 1 we cannot directly<br />

recognise the sequence. We cannot simply point to a place in the code to demonstrate in<br />

what state we are. The atomicity <strong>of</strong> the statements is different, although the descriptions<br />

perform equivalent behaviour.<br />

An analogous naming problem happens when object identifiers are communicated between<br />

objects. The list <strong>of</strong> acquaintances <strong>of</strong> an object determines the possible communications<br />

with other objects. This leads to complex dynamic behaviour. In general this<br />

behaviour cannot be grasped easily in explicit nameable states. State information is<br />

distributed over the various objects in the form <strong>of</strong> dynamic links. In general dynamic<br />

links must be considered as data. State information that is hidden in data limits the<br />

possibilities for verification <strong>of</strong> a model.<br />

The previous examples show that controllers (supervisors, see Subsection 4.8.8) must<br />

be designed using a relative fine grain <strong>of</strong> behaviour. A supervisor should preferably<br />

have no other task than controlling the servants that perform a part <strong>of</strong> the behaviour <strong>of</strong><br />

a (sub-)system. A controller is an object whose most important property is its state. This<br />

subsection showed that the hardware implementation design heuristic <strong>of</strong> separation <strong>of</strong><br />

data path and controller can be used in an object-oriented approach.<br />

od.<br />

10 POOSL does not have a for statement. The equivalent POOSL construct is i:=1;do i 3 then a!m;i:=i+1

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

Saved successfully!

Ooh no, something went wrong!