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.

6.6 Dynamic Behaviour 209<br />

6.6.4 Separation <strong>of</strong> Data and Control<br />

Traditionally the world <strong>of</strong> hardware analysis and design strongly emphasises dividing a<br />

system into a data path part and a control part . The data path performs transformations<br />

<strong>of</strong> data or the transformation <strong>of</strong> physical objects. The control part switches channels and<br />

controls the activation and deactivation <strong>of</strong> modules. Channels and controlled modules<br />

form a so-called data path. Traditional methods such as [HP88], [WM85] and Statemate<br />

[Har87] use this approach <strong>of</strong> separation <strong>of</strong> data transformation and control. Data is<br />

modelled in stores. Data in stores is shared among data transformations. Sharing<br />

requires accurate modelling <strong>of</strong> arbitration or protection using semaphores.<br />

Theoretically the state <strong>of</strong> a system is determined by data in the stores and the state <strong>of</strong><br />

the control processes. In practice state is interpreted in these methods as control state.<br />

This state is only determined by the state <strong>of</strong> the controllers. Controllers (sometimes<br />

called control transformations, control processes or control activities) are modelled using<br />

a finite state machine model. Because controllers do not store any data except the<br />

state variable, state becomes a simple and nameable notion. Complex systems can be<br />

modelled transparently by creating a hierarchy <strong>of</strong> controllers. The upper level controllers<br />

control the system behaviour mode, lower level controllers enable and disable various data<br />

transforming processes 9 .<br />

This approach makes the methods described above very different from traditional objectoriented<br />

methods. Wegner words this observation (with the focus on languages) as<br />

follows: ’In contrast to the shared-memory model <strong>of</strong> procedure-oriented programming, objectoriented<br />

programming partitions the state into encapsulated pieces each associated with an<br />

autonomous, potentially concurrent machine’ [Weg90]. This means that the object-oriented<br />

approach distributes system state over many (possibly dynamically created) parallel<br />

objects. This makes the object-oriented concept <strong>of</strong> state opaque. An implementation in<br />

an object-oriented way makes the system state dispersed. Many autonomous objects<br />

perform a lot <strong>of</strong> communication, with dynamic creation <strong>of</strong> objects. Some objects can be<br />

processing while others are waiting for results. The collective state <strong>of</strong> all the actively operating<br />

objects represents the state <strong>of</strong> the system. In contrast the traditional control/data<br />

partitioning together with the concept <strong>of</strong> hierarchical controllers enabled a clear vision<br />

on what a system is actually doing during system operation. We want to keep the merits<br />

<strong>of</strong> this approach without violation <strong>of</strong> the essence <strong>of</strong> object-orientedness.<br />

Named states implemented as (named) behaviour state or variables partial state enable<br />

system design with various views in mind, such as design for testability. Clear models<br />

can be achieved by careful design <strong>of</strong> the role <strong>of</strong> objects. Some can play the role <strong>of</strong><br />

controllers. <strong>Reactive</strong> systems tend to have a substantial control part. However, an<br />

emphasis on control leads quickly to a traditional functional mental model <strong>of</strong> the design.<br />

We must be aware that this is dangerous. Object-oriented methods are not yet accepted<br />

in the main stream <strong>of</strong> product development laboratories. The step from the functional to<br />

object-oriented approach is recognised as quite difficult, mainly because <strong>of</strong> the different<br />

9Such structures are described in Subsection 4.8.8 about collaborating supervisors and servants and<br />

hierarchically supervised composites.

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

Saved successfully!

Ooh no, something went wrong!