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.

10.4 A System <strong>of</strong> Basic Transformations 317<br />

creation <strong>of</strong> a new cluster class. For example, suppose we are given a system<br />

<br />

specification<br />

¢ B(E2)¥ A(E1) Sysp Sys and assume we want to replace A(E1) ¢ B(E2) by some cluster<br />

¥<br />

instance Cc ¥ (E1 E2). Then, according to the condition <strong>of</strong> 13 , the class definition <strong>of</strong> Cc should be <strong>of</strong> the form<br />

cluster class C c P1 ¥ P2<br />

communication channels ch1 ¡ ¡ chk<br />

message interface l a 1 ¡ ¡ la l<br />

behaviour specification BSpec p<br />

where BSpec p is such that BSpec p § § E1© P1 ¥ E2© P2 A b (E1) ¢ B b (E2). We can now distinguish<br />

three cases<br />

(1) Sys p contains a class C c P1 ¥ P2 <strong>of</strong> the above form. In this case we are done, and the<br />

replacement can be performed.<br />

(2) Sys p contains a class with class name C c but is not <strong>of</strong> the required form. In this<br />

case the replacement cannot be performed, unless a class name different from C c<br />

is chosen.<br />

(3) Sys p does not contain a class with class name C c . In this case, the class can be added<br />

to Sys p to obtain a new system <strong>of</strong> process classes, say Sys p ¡ . For BSpec p , behaviour<br />

expression A(P1) ¢ B(P2) can be chosen. Channels ch1 ¡ ¡ chk and abstract actions<br />

l a 1 ¡ ¡ la l are determined by the ChSort respectively the AASort <strong>of</strong> BSpecp . Since Sys p<br />

and Sysp are non-conflicting, we have by 12 that ¡ ¢ B(E2)¥ A(E1) Sysp Sys<br />

¢<br />

¡<br />

<br />

¥<br />

¢ B(E2)¥ A(E1) Sysp ¥ Sys . Since Sys ¡ p then contains class C ¡ c ¥ P2 P1 which is <strong>of</strong> the<br />

correct form, case (i) applies and thus ¢ A(E1) B(E2) can be replaced by Cc ¥ (E1 E2).<br />

If we assume that system A(E1) ¢ B(E2)¥ Sys p ¥ Sys is represented by the left-hand side<br />

<strong>of</strong> the following picture, then an Instance Structure Diagram <strong>of</strong> the transformation<br />

equivalent system C c (E1 ¥ E2)¥ Sys p ¡ ¥ Sys is given by the right-hand side.<br />

c d<br />

A B<br />

a<br />

Transformation 14<br />

(i) Cb 1 (E1<br />

<br />

¡ ¥ Er)§ f1 ¥ ¥ Sys ¥¡ ¡ p ¥ Sys<br />

if<br />

b<br />

¢<br />

¡<br />

¢<br />

¡<br />

C c<br />

c d<br />

A B<br />

a<br />

C b 2 (E1 ¥¡ ¡ ¡ ¥ Er)§ f2 ¥<br />

b<br />

<br />

¥ Sys p Sys ¥<br />

(1) (a) Process class Cb <br />

1 ¥¡ ¡ ¡ ¥ xr x1 contains a message-send statement<br />

ch!m(E¡1<br />

¥¡ ¡ ¡ ¥ E¡n ).

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

Saved successfully!

Ooh no, something went wrong!