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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

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

where PS is a typical element <strong>of</strong> the set ParStat <strong>of</strong> parameterised data statements.<br />

PS :: E<br />

¡<br />

¡<br />

¡<br />

x : PE<br />

u : PE<br />

PS1;PS2<br />

if PE then PS1 else PS2 fi<br />

¡<br />

do PE then PS od ¡<br />

¥ L Chan denotes a collection <strong>of</strong> channels and f is a so-called channel renaming function.<br />

The collection <strong>of</strong> all channel renaming functions is denoted ChanRen and ranges over<br />

¥¡ ¡ ¡ f .<br />

ChanRen Chan £ Chan<br />

The first two parameterised behaviour specifications C p (PE1 ¥¡ ¡ ¡ ¥ PEr) and C c (PE1 , ¡ ¡<br />

, PEr) denote a single (parameterised) instance <strong>of</strong> some process class C p y1 ¥¡ ¡ ¡ ¥ yr and<br />

some cluster class C c P1 ¥¡ ¡ ¡ ¥ Pr respectively.<br />

The next kind <strong>of</strong> specifications BSpec p<br />

1<br />

fications BSpec p<br />

1 and BSpec p<br />

BSpecp2<br />

expresses the parallel composition <strong>of</strong> speci-<br />

¢<br />

2. Assume, for example, that the class definition <strong>of</strong> a class, say<br />

Cc ¥ P2 P1 , contains behaviour specification C p<br />

1 (P1) C ¢ p<br />

2 (P2). This specification expresses<br />

the behaviour <strong>of</strong> two (parameterised) instances, one <strong>of</strong> some process class C p <br />

y1 1 and<br />

the other <strong>of</strong> some process class Cp , which execute in parallel and which (perhaps)<br />

y2<br />

communicate through their common channels. The channel set <strong>of</strong> class Cc ¥ P2 P1 is the<br />

union <strong>of</strong> the channel sets <strong>of</strong> classes Cp and C y1 p . An instance <strong>of</strong> class C y2 c ¥ P2 P1<br />

can send and receive any message which can be sent and received by instances <strong>of</strong> either<br />

C p <br />

y1 1 or C p <br />

y2 2 . The parallel composition combinator is comparable with the<br />

composition combinator <strong>of</strong> CCS.<br />

The fourth kind <strong>of</strong> behaviour specification is called channel hiding. A channel hiding<br />

BSpecp L expresses a specification BSpecp from which the channels in L are made<br />

unobservable. This means that other (external) instances cannot communicate through<br />

channels in L with instances contained in specification BSpecp . Assume, for example, that<br />

the method definition <strong>of</strong> a class Cc ¥ P2 P1 contains a behaviour specification (C p<br />

¢ 1(P1)<br />

C p<br />

2(P2))<br />

£<br />

. This means that, even though classes C ch¦ p <br />

y1 1 and C p <br />

y2 2 may contain<br />

channel ch, class Cc ¥ P2 P1 may not. Channel ch may only be used for the communication<br />

between (parameterised) instances C p<br />

1 (P1) and C p<br />

2 (P2). The channel hiding constructor is<br />

similar to the restriction combinator <strong>of</strong> CCS.<br />

The last sort <strong>of</strong> specification expresses a channel renaming. The channel renaming BSpec p<br />

§ f denotes a specification BSpec p from which the channels are renamed as dictated<br />

by f . We shall <strong>of</strong>ten write ch¡1 © ch1 ¥¡ ¡ ¡ ¥ ch¡n © chn for the renaming function f for which<br />

f (chi) ch¡i for i 1¥¡ ¡ ¡ ¥ n and f (ch) ch otherwise. Channel renaming can be very<br />

useful if several instances <strong>of</strong> the same class are used within different environments and<br />

have to communicate through different channels.

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

Saved successfully!

Ooh no, something went wrong!