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.

9.3 Formal Syntax 265<br />

The fourth statement is a method call. By means <strong>of</strong> such a method-call statement a process<br />

object can call one <strong>of</strong> its methods. A method call m(E1 ¥¡ ¡ ¡ ¥ En)(p1¥¡ ¡ ¡ ¥ pm) is executed in<br />

the following way: First, expressions E1 ¥¡ ¡ ¡ ¥ En are evaluated from left to right. Next,<br />

the values <strong>of</strong> these expressions are bound to the input parameters <strong>of</strong> the method m and<br />

the local variables and output parameters are initialised to nil. Then the method body is<br />

executed. If this execution successfully terminates, the output parameters <strong>of</strong> the method<br />

are bound to variables p1 ¥¡ ¡ ¡ ¥ pm.<br />

The fifth sort <strong>of</strong> statement is sequential composition, which is indicated with a semicolon.<br />

Sequential composition has its usual meaning.<br />

Next we have the choice statement S p<br />

1<br />

or Sp2<br />

, indicating that a process can choose between<br />

two alternatives. A process always leaves both alternatives open, at least until one <strong>of</strong> the<br />

alternatives can actually be executed. So, a choice is never made a priori. As soon as one<br />

<strong>of</strong> the statements has performed an execution step, the other is discarded. In general,<br />

the process environment will permit only one <strong>of</strong> the alternatives. If both alternatives<br />

are open, the choice is made non-deterministically. The choice statement has the same<br />

meaning as the summation combinator (+) <strong>of</strong> CCS.<br />

§ E S p is a guarded command. E is a boolean expression, called the guard <strong>of</strong> statement S p . A<br />

guarded command is executed as follows: First, expression E is evaluated. If it evaluates<br />

to true or bunk, an attempt is made to perform an execution step <strong>of</strong> rest statement S p .<br />

If this attempt succeeds this execution step actually takes place and the execution <strong>of</strong><br />

S p is continued. Otherwise, the state <strong>of</strong> the executing process object is restored to the<br />

state just before the expression was evaluated, and the guarded command blocks, i.e.,<br />

is not executed. In general, guarded commands are used in combination with a choice<br />

statement. If a blocking guarded command is used in isolation, the executing process<br />

runs the risk <strong>of</strong> blocking completely.<br />

The if-statement and the do-statement have their usual meaning.<br />

Next we have the abort statement. S p<br />

1<br />

abort Sp2<br />

denotes that statement Sp1<br />

is executed until<br />

it is aborted by statement S p<br />

2. Upon successful termination <strong>of</strong> S p<br />

1, the complete abort<br />

statement terminates successfully. If an execution step <strong>of</strong> S p<br />

2 can be performed, this<br />

step actually takes place and the execution continues with S p<br />

2. Statement S p<br />

1 is thereby<br />

completely discarded.<br />

interrupt Sp2<br />

indicating that Sp1<br />

is executed<br />

until it is interrupted by statement S p<br />

2. If statement S p<br />

1 terminates successfully, the<br />

The last statement is the interrupt statement S p<br />

1<br />

complete interrupt statement terminates successfully. If an execution step <strong>of</strong> S p<br />

2 can be<br />

performed it actually takes place and the execution control switches from S p<br />

1 to S p<br />

successful termination <strong>of</strong> S p<br />

2<br />

this statement is again interruptable by S p<br />

2 .<br />

2. Upon<br />

, the execution control is returned to Sp.<br />

The execution <strong>of</strong><br />

Next, we define a set <strong>Systems</strong> p with typical elements Sys p ¥¡ ¡ ¡ .<br />

1

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

Saved successfully!

Ooh no, something went wrong!