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.

266 Process Part <strong>of</strong> POOSL<br />

Sysp p <br />

:: ¡ ¡ CD1 CDp k <br />

Each Sys p is a system <strong>of</strong> process and cluster classes. It is built from a number <strong>of</strong> class<br />

definitions. The collection <strong>of</strong> all class definitions ClassDef p ranges over CD p ¥¡ ¡ ¡ and is<br />

defined as<br />

CDp :: process class Cp yr ¥¡ ¡ ¡ ¥<br />

¡ ¡<br />

¡ ¡<br />

y1<br />

instance variables x1 xn<br />

communication channels ch1 chk<br />

message interface la 1 ¡ ¡ la ¡ ¡ ¥ ¥¡ initial method call<br />

m<br />

m(E1 Eq)()<br />

instance methods MD p<br />

1<br />

¡ ¡ MDp<br />

k<br />

¡ cluster class Cc ¡ ¥ Pr ¥¡ ¡<br />

¡ ¡<br />

P1<br />

communication channels ch1 chk<br />

message interface la 1 ¡ ¡ la behaviour specification<br />

m<br />

BSpecp Within a class definition the functionality <strong>of</strong> the instances <strong>of</strong> the class is specified. We<br />

distinguish two kinds <strong>of</strong> classes, each with its own specification format. The first kind<br />

<strong>of</strong> class is called process class and the second kind is called cluster class.<br />

A specification <strong>of</strong> a process class starts with the name <strong>of</strong> that class together with a<br />

number <strong>of</strong> instance variables between angle brackets. Then the collection <strong>of</strong> all instance<br />

variables <strong>of</strong> the process class is specified. These variables model the private or internal<br />

data <strong>of</strong> each instance <strong>of</strong> the class. Upon initialisation <strong>of</strong> an instance <strong>of</strong> the class, the<br />

instance variables specified between angle brackets are bound to a set <strong>of</strong> externally<br />

supplied data objects. All the other instance variables are initialised to nil. Next, all<br />

communication channels, through which the class’ instances communicate with other<br />

processes, are specified. This channel specification is followed by a description <strong>of</strong> a<br />

message interface. A message interface is a list <strong>of</strong> abstract send or receive actions, also<br />

called abstract communication actions. Such an action states that a process can send a<br />

certain message to a certain channel, or that a process can receive a certain message from<br />

a certain channel. The set a <strong>of</strong> all abstract communication actions, has typical elements<br />

l a ¥¡ ¡ ¡ and is defined as<br />

l a :: ch!m§ n<br />

ch?m§ n ¡<br />

The first clause states that a process or cluster, at some point in time, can send message<br />

m, together with n data objects, to channel ch. The second, complementary, abstract<br />

action states that message m, with n data objects can be received from channel ch. n<br />

denotes the direct naming <strong>of</strong> natural number n. The actions are called abstract because<br />

they contain no information about the precise transferred data objects; only the amount<br />

<strong>of</strong> objects is indicated. A message interface serves as an abstract description, <strong>of</strong>ten called<br />

a signature, <strong>of</strong> the functionality <strong>of</strong> the instances <strong>of</strong> a process class.<br />

The description <strong>of</strong> a message interface is followed by the specification <strong>of</strong> an initial method

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

Saved successfully!

Ooh no, something went wrong!