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.

318 Behaviour-Preserving Transformations<br />

(b) Cb <br />

x1¥¡ ¡ ¡ xr 2 is a process class which is derived from<br />

Cb <br />

x1¥¡ ¡ ¡ ¥ xr 1<br />

by replacing (in one or more <strong>of</strong> the method bodies) one or more<br />

occurrences <strong>of</strong> ch!m(E¡1 ¥¡ ¡ ¡ ¥ E¡r) ch¡ by !m(E¡1 ¥¡ ¡ ¡ ¥ E¡r) ch¡ (where is some arbitrary<br />

channel), and by adjusting the set <strong>of</strong> channels and the message interface.<br />

¡ ¥¡ ¡ ¡ ¥ Er)¥ (2) for all ch b ChSort(C1(E1 Sysp § ) ChSort(Cb ¥¡ ¡ ¡ ¥ Er)¥ 2(E1 Sysp f2(ch¡<br />

)<br />

f1( ch) f2( ch) and f1(ch) ).<br />

¢<br />

(ii) <br />

if (1) and (2) <strong>of</strong> (i) hold and if<br />

¢<br />

S § p£ e<br />

1 Cb E1£ ¡ ¡ ¡£ Er¢ § f1 ¥ env¥ Sys<br />

1 p Sys ¥<br />

¢<br />

(3) S p£ e<br />

2 (S p£ e<br />

2 ) where is defined as<br />

¢<br />

¡<br />

<br />

S § p£ e<br />

2 Cb E1£ ¡ ¡ ¡£ Er¢ § f2 ¥ env¥ Sys<br />

2 p Sys ¥<br />

(ch!m(E¡1 ¥¡ ¡ ¡ ¥ E¡r)) ¥¡ ¡ ¡ ¥ ch¡<br />

(S)<br />

!m(E¡1 E¡r)<br />

S<br />

¡ !m¡ ¡ (E1¡ ¡ ¥¡ ¡ ¡ ¥ Er¡ ¡ ) ch¡ ¡ !m¡ ¡ (E1¡ ¡ ¥¡ ¡ ¡ ¥ Er¡ ¡<br />

(ch¡<br />

¡ ?m¡ ¡ (p1¡ ¡ ¥¡ ¡ ¡ ¥ pr¡ ¡ ) ch¡ ¡ ?m¡ ¡ (p1¡ ¡ ¥¡ ¡ ¡ ¥ pr¡ ¡<br />

(ch¡<br />

¡ ¥¡ ¡ ¡ ¥ Em¡ ¡ )(p1¡ ¡ ¥¡ ¡ ¡ ¥ pn¡ ¡ (E1 m¡ ¡ )) ¥¡ ¡ ¡ ¥ Em¡ ¡ )(p1¡ ¡ ¥¡ ¡ ¡ ¥ pn¡ ¡ (E1 (m¡ )<br />

( )<br />

(compound(S p£ e<br />

1 ¥¡ ¡ ¡ ¥ Sp£ e<br />

i )) compound( (S p£<br />

)¥¡ ¡ ¡ ¥<br />

e<br />

1 (S p£ e<br />

i ))<br />

Here compound(S p£ e<br />

1 ¥¡ ¡ ¡ ¥ Sp£ e<br />

i ) denotes any one <strong>of</strong> the compound statements <strong>of</strong> Stat p£ e .<br />

The message-send statement printed in bold-face denotes that it is one <strong>of</strong> the replaced<br />

occurrences. So it is assumed that different occurrences <strong>of</strong> the same message-send<br />

statement can be told apart.<br />

(iii) (i) and (ii) also hold if message-receive statements in stead <strong>of</strong> message-send statements are<br />

replaced. ¨<br />

By transformation 14 is justified to replace a process object, on which some channel<br />

renaming is applied, by another (derived) process object, on which some different channel<br />

renaming is applied. For example, consider a© b ¥ Sys A()§ p Sys , where A() is an<br />

¥<br />

instance <strong>of</strong> process class A <br />

defined in Sys p . Assume that A() has two channels, a and<br />

b, and suppose it can send a message m on channel a and a message n on channel b.<br />

By Transformation 14 the specification is equivalent to ()§ Id ¥ Sys A¡ p Sys , where A¡ ()<br />

<br />

¥<br />

which is defined in Sys p . This class is derived from A <br />

is an instance <strong>of</strong> class A¡<br />

replacing each occurrence <strong>of</strong> b!n by a!n, by changing the communication channel clause<br />

to a, and by changing the message interface to a!n. The transformation is visualised by<br />

the following Instance Structure Diagrams:<br />

A<br />

a<br />

b<br />

a<br />

¢<br />

¡<br />

A'<br />

a<br />

by

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

Saved successfully!

Ooh no, something went wrong!