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.

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

rency instead <strong>of</strong> asynchronous concurrency is Statemate [Har92]. Dynamic behaviour<br />

in Statemate is described in the Statecharts formalism. Statecharts are based on the socalled<br />

synchrony hypothesis. Models in Statecharts run in so-called lockstep, which means<br />

that they all synchronise after each computation step. The approach is based on the<br />

assumption that the system is much faster than its environment. The results <strong>of</strong> all operations<br />

in all modules that start on the reception <strong>of</strong> events or messages are supposed to<br />

be ready before a new synchronous step <strong>of</strong> all operations is started. The execution-time<br />

<strong>of</strong> the services is abstracted from and therefore put to zero. These assumptions make<br />

this method less suitable for complex reactive distributed systems.<br />

In general s<strong>of</strong>tware modules do not run in lockstep. The relative speeds <strong>of</strong> operations<br />

may differ substantially. Many s<strong>of</strong>tware systems are implemented as pseudo concurrent<br />

systems by using multiprogramming. A model based on the synchrony hypothesis is<br />

inadequate to model this type <strong>of</strong> behaviour.<br />

The object-oriented method OMT [R 91] bases its dynamic model on the Statecharts<br />

formalism from Statemate [Har92]. In our point <strong>of</strong> view this formalism is not suitable<br />

for straightforward implementation in an object-oriented method. We come back to this<br />

subject in Paragraph 6.3.3.4 about messages, sharing and distribution.<br />

6.2.2.7 Design Decisions for Concurrency<br />

We defined process objects as asynchronous concurrent entities. Process objects have<br />

sequential internal behaviour. An alternative would have been to make their internal<br />

behaviour concurrent too. In Subsection 9.7.1, (The Grain <strong>of</strong> Concurrency) this decision<br />

is motivated from a semantical point <strong>of</strong> view. From an analysis point <strong>of</strong> view we<br />

also prefer asynchronous concurrency and internal sequential behaviour. It enables an<br />

elegant coupling <strong>of</strong> the grain <strong>of</strong> concurrency, the grain <strong>of</strong> abstraction (the shell <strong>of</strong> process<br />

objects), and the grain <strong>of</strong> modules (process objects or clusters). Internal parallelism can<br />

be modelled by clusters. Their internal behaviour is in this case modelled by a parallel<br />

composition <strong>of</strong> process objects and/or other clusters.<br />

Besides concurrency we must be able to express sequential behaviour. We can express<br />

this straightforwardly because process objects are internally sequential. In addition we<br />

want to be able to describe that a collection <strong>of</strong> collaborating objects behaves sequentially<br />

as a whole. This can be specified by drawing a concurrency boundary (see Paragraph<br />

5.8.2.4). Another very important reason to make processes the grain <strong>of</strong> concurrency is<br />

that it constrains coding <strong>of</strong> classes to sequential programming. Humans think preferably<br />

in terms <strong>of</strong> sequences <strong>of</strong> actions. Of course, the problem <strong>of</strong> designing a system with<br />

multiple threads that must synchronise remains. However, it is limited to the communication<br />

and synchronisation <strong>of</strong> single threaded processes instead <strong>of</strong> multiple threaded<br />

processes. In the latter case we would require communication and synchronisation<br />

between threads in the processes as well.<br />

The implementations we aim at are implementations in synchronous digital circuits<br />

and/or s<strong>of</strong>tware. <strong>Hardware</strong> can consist <strong>of</strong> various concurrent processes which can be

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

Saved successfully!

Ooh no, something went wrong!