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 213<br />

to pay attention to OMTs steps for constructing a class model, the rules for keeping the<br />

right classes and the rules for keeping the right associations.<br />

6.6.5.3 Data Object State<br />

Conform the definition <strong>of</strong> behaviour state for process objects, we interpret this concept<br />

for data objects now. Before a data object can come in a state it must be created. A data<br />

object is either idle or it is executing a method. The state Idle means that the object is<br />

waiting for a message that will start the execution <strong>of</strong> a method. When a data object is<br />

executing a method this can be considered as a behaviour state.<br />

6.6.6 Modelling Behaviour <strong>of</strong> Process Objects<br />

In contrast <strong>of</strong> data objects that follow the object-oriented tradition, process objects <strong>of</strong>fer<br />

an additional modelling power needed for complex reactive hardware/s<strong>of</strong>tware systems.<br />

Process objects <strong>of</strong>fer non-determinism, asynchronous parallel collaboration, sequential<br />

internal behaviour, infinite behaviour, synchronous communication, and static<br />

interconnections. Many <strong>of</strong> these properties have been discussed already. In this subsection<br />

we give an informal description <strong>of</strong> some aspects <strong>of</strong> internal behaviour descriptions<br />

<strong>of</strong> process objects. A precise description <strong>of</strong> the syntax and semantics <strong>of</strong> process objects<br />

can be found in Chapter 9.<br />

6.6.6.1 Process Class <strong>Specification</strong><br />

The behaviour <strong>of</strong> a process object is described in its class. It is described by a collection<br />

<strong>of</strong> instance variables and a collection <strong>of</strong> instance methods. In contrast to data objects,<br />

process objects also need the specification <strong>of</strong> communication channels, <strong>of</strong> a message<br />

interface and <strong>of</strong> an initial method call. A process class definition is typically <strong>of</strong> the form:<br />

process class C p y1 ¥¡ ¡ ¡ ¥ yr ¡<br />

instance variables x1 : C1 ¡ ¡ xn : Cn<br />

communication channels ch1 ¡ ¡ chk<br />

message interface l p<br />

1 ¡ ¡ lp m<br />

initial method call m(E1 ¥¡ ¡ ¡ ¥ Eq)( )<br />

instance methods MD p<br />

1<br />

¡ ¡ MDp<br />

k<br />

¥¡ ¡ ¡ ¥ ¡ ¥¡ ¡ ¡ ¥<br />

¥¡ ¡ ¡ ¥ ¡<br />

The first element is the declaration <strong>of</strong> the process class name C with a list <strong>of</strong> instance<br />

variables y1 yr . This list is the subset <strong>of</strong> the instance variables x1 xn. The<br />

list y1 yr contains the variables that will be initialised upon instantiation <strong>of</strong><br />

the system. In contrast to data objects that are created on run-time, process objects are<br />

created at ’compile-time’. A system model contains a finite stock <strong>of</strong> process objects<br />

connected by channels when it starts running.<br />

The possible communications <strong>of</strong> a process is determined by its message interface l p<br />

1 ¡ ¡ lp m.<br />

The message interface is a list <strong>of</strong> elements l p . The elements l p have typically the form<br />

ch!m(C1 ¥¡ ¡ ¡ ¥ Cn) or ch?m(C1 ¥¡ ¡ ¡ ¥ Cn) denoting that messages can be sent or received on<br />

channel ch. C1 ¥¡ ¡ ¡ ¥ Cn denote the types <strong>of</strong> data objects that are transported with the<br />

message.

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

Saved successfully!

Ooh no, something went wrong!