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.

9.3 Formal Syntax 267<br />

call <strong>of</strong> the form m(E1 ¥¡ ¡ ¡ ¥ Eq)(). After initialising its instance variables, a process object<br />

always starts its activities by calling its initial method. This method does not contain<br />

any output parameters.<br />

The last part <strong>of</strong> a process class definition consists <strong>of</strong> a number <strong>of</strong> method definitions. A<br />

method definition specifies the behaviour <strong>of</strong> its corresponding method. The set MethDef p<br />

<strong>of</strong> all method definitions, with typical elements MD p ¥¡ ¡ ¡ , is defined as<br />

MD p :: m(u1¥¡ ¡ ¡ ¥ um)(v1 ¥¡ ¡ ¡ ¥ vn)<br />

¡ w1 ¡ ¡ wk ¡ S p<br />

A method definition contains a header with name m, input parameters u1¥¡ ¡ ¡ ¥ um and<br />

output parameters v1¥¡ ¡ ¡ ¥ vn. The method header is followed by a declaration ¡ w1 ¡ ¡ wk ¡<br />

<strong>of</strong> local variables. Then the message body, which is a statement S p , is defined. Method m is<br />

invoked through an m(E1 ¥¡ ¡ ¡ ¥ Em)(p1¥¡ ¡ ¡ ¥ pn) statement. Such a statement is executed by<br />

first evaluating E1 ¥¡ ¡ ¡ ¥ Em from left to right and by binding the results to input parameters<br />

u1 ¥¡ ¡ ¡ ¥ um. The output parameters v1 ¥¡ ¡ ¡ ¥ vn and local variables w1 ¥¡ ¡ ¡ ¥ wk are initialised<br />

to nil. Then statement S p is executed. If this statement terminates successfully, the<br />

output parameters v1 ¥¡ ¡ ¡ ¥ vn are bound to variables p1 ¥¡ ¡ ¡ ¥ pn and the method execution<br />

terminates.<br />

The second kind <strong>of</strong> classes are called cluster classes. A cluster class is built from other<br />

classes, which are either process classes or cluster classes themselves. A class definition<br />

<strong>of</strong> a cluster class consists <strong>of</strong> a cluster class name with a number <strong>of</strong> expression parameters<br />

P1 ¥¡ ¡ ¡ ¥ Pr between angle brackets, a number <strong>of</strong> communication channels, and a message<br />

interface. The behaviour <strong>of</strong> a cluster class is specified by means <strong>of</strong> a parameterised behaviour<br />

specification. The set B<strong>Specification</strong>s p <strong>of</strong> all parameterised behaviour specifications<br />

has typical elements BSpec p and is defined as follows:<br />

BSpec p :: C p (PE1 ¥¡ ¡ ¡ ¥ PEr)<br />

¡ C c (PE1 ¥¡ ¡ ¡ ¥ PEr)<br />

BSpec ¡ p<br />

¡<br />

1<br />

BSpecp BSpecp2<br />

¢<br />

L<br />

BSpec ¡ p f §<br />

Here each PEi denotes a parameterised data expression. The set <strong>of</strong> all parameterised data<br />

expressions is ParExp and ranges PE¥¡ ¡ ¡ over . ParExp is defined as<br />

PE :: P<br />

E ¡<br />

PE m(PE1 ¥¡ ¡ ¡ ¥ PEn) ¡<br />

PS;PE<br />

¡

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

Saved successfully!

Ooh no, something went wrong!