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.

6.6 Dynamic Behaviour 215<br />

A method definition MD p <strong>of</strong> a process class is typically <strong>of</strong> the form:<br />

m(u1 : C1 ¥¡ ¡ ¡ ¥ um : Cm)(v1 : C¡1 ¡ ¡ vn : C¡n )<br />

¡ w1 : C1" ¡ ¡ wk : Ck" ¡ S p<br />

in which m is the method name, u1 ¥¡ ¡ ¡ ¥ um are input parameters, v1 ¥¡ ¡ ¡ ¥ vn are output<br />

parameters, w1 ¡ ¡ wk are local variables and S p represents the statement(s) for the<br />

behaviour operation.<br />

6.6.6.5 Statements<br />

POOSL enables an imperative programming style for specifying behaviour. A method<br />

is typically composed from process statements <strong>of</strong> the form:<br />

1 S<br />

2 S p<br />

1; S p<br />

2<br />

3 if E then S p<br />

1<br />

4 do E then S p od<br />

5 S p<br />

1<br />

or Sp<br />

2<br />

else Sp<br />

2 fi<br />

6 § E S p<br />

7 m(E1 ¥¡ ¡ ¡ ¥ En)(p1 ¥¡ ¡ ¡ ¥ pm)<br />

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

9 ch?m(p1 ¥¡ ¡ ¡ ¥ pm ¡ E)<br />

10 S p<br />

1<br />

11 S p<br />

1<br />

abort Sp<br />

2<br />

interrupt Sp<br />

2<br />

1. A process statement can be a data statement S as described in the previous subsection.<br />

2. Statement S p<br />

1; S p<br />

2 shows that a statement can be a sequential composition <strong>of</strong> statements.<br />

3. There are various ways to create branching in the sequences <strong>of</strong> statements. The if<br />

statement has its usual meaning.<br />

4. The do statement has also the usual meaning, which is the same as the meaning <strong>of</strong><br />

a traditional while statement.<br />

5. The choice statement S p<br />

1 or S p<br />

2 defines a non-deterministic selection. One <strong>of</strong> the<br />

alternative behaviours S p<br />

1 or S p<br />

2 is chosen. Non-determinism11 is a powerful feature<br />

for the description <strong>of</strong> abstract behaviour. It <strong>of</strong>fers a mechanism for the description<br />

<strong>of</strong> possible alternative forms <strong>of</strong> behaviour in an early phase <strong>of</strong> the system analysis.<br />

Non-deterministic changes <strong>of</strong> behaviour typically happen in complex concurrent<br />

systems. An or statement is appropriate to describe the selection <strong>of</strong> behaviour<br />

11 In automaton theory non-determinism is the ability to change state in a way that is only partially<br />

determined by a current state and an input symbol. It permits several possible next states for a given<br />

combination <strong>of</strong> current state and input symbol [LEWI81].

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

Saved successfully!

Ooh no, something went wrong!