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.

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

These new rules are not adequate though. Consider process configuration<br />

<br />

§ m() ( n() Sp ) i(x)() interrupt Cp ¡ ¡ ¡£ Er¢ ¥ ¡ ¥ ps¥ ¥ Sys E1£ p Sys ¥<br />

where Sp denotes the statement that still has to executed by method n, where o denotes a<br />

method and where x denotes a local variable declared in method m. Now suppose that<br />

the configuration performs a transition step as dictated by rules ¡ ¡ (o”) (r”) and assume<br />

that in this step method i with input parameter x is invoked. The calculation <strong>of</strong> the<br />

transition step requires axiom (4’). In the application <strong>of</strong> this axiom, an attempt is made<br />

to bind the input parameter <strong>of</strong> method i to some local variable x in the environment <strong>of</strong><br />

method n which is located on top <strong>of</strong> process stack ps. Variable x, however, belongs to<br />

the environment <strong>of</strong> method m located just beneath the top <strong>of</strong> ps!<br />

It is not hard to see that the problem is caused by the fact that the configuration to which<br />

axiom (4’) was applied carried process stack ps in stead <strong>of</strong> pop(ps). This, on its turn,<br />

is caused by the fact that in rule (o”) the complete process stack <strong>of</strong> the left-hand side<br />

configuration <strong>of</strong> the rule’s conclusion is passed to the left-hand side configuration <strong>of</strong> the<br />

rule’s premise. In the above example the top should first be popped before the stack is<br />

passed. In general, as many elements as there are invoked methods in the interrupted<br />

statement have to be popped. In rule (o’) the interrupted statement is S p£ e<br />

1 . The number<br />

<strong>of</strong> invoked methods equals the amount <strong>of</strong> m(p1£ ¡ ¡ ¡£ pk) symbols contained in S p£ e<br />

1 . If we<br />

call this amount n, the stack ps¡ ¡ ¡ that is passed to the left-hand side configuration <strong>of</strong> the<br />

rule’s premise is given by pop n (ps). To make sure that the popped elements e1 ¥¡ ¡ ¡ ¥ en are<br />

not "lost", they have to be pushed onto the process stack ps¡ ¡ <strong>of</strong> the premise’s right-hand<br />

side configuration before this stack is passed to the right-hand side configuration <strong>of</strong><br />

the conclusion. So ps¡ push(en ¥ push(en 1 ¥¡ ¡ ¡ push(e2 ¥ push(e1 ¥ ps¡ ¡ )) ¡ ¡ )). Using similar<br />

arguments it can be shown that each <strong>of</strong> the rules (p”) ¡ ¡ (r”) has to be modified in an<br />

analogous way.<br />

In Figure 9.6 the difference between the application <strong>of</strong> rule (o”) and the application <strong>of</strong><br />

rule (o’) is clarified. The figure shows process stack ps <strong>of</strong> the example configuration as<br />

well as the process stacks that are obtained after the application <strong>of</strong> rules (o”) and (o’). In<br />

case <strong>of</strong> rule (o”) the new local environment <strong>of</strong> method i is pushed on top <strong>of</strong> the stack. In<br />

case <strong>of</strong> rule (o’) the environment is put just above the environment from which method<br />

i is called, that is just above the environment <strong>of</strong> m.<br />

9.8 Summary<br />

In this chapter the process part <strong>of</strong> the POOSL language as well as the design <strong>of</strong> the<br />

language is explained in detail. The emphasis in this chapter is on the development<br />

<strong>of</strong> a Plotkin-style structural operational semantics. This semantics is a computational<br />

interleaving semantics based on the communication model <strong>of</strong> CCS. The execution <strong>of</strong> a<br />

system <strong>of</strong> parallel objects is modelled as the interleaving <strong>of</strong> all atomic actions, i.e., as<br />

a sequential execution <strong>of</strong> these actions. The semantics is defined in terms <strong>of</strong> a labeled<br />

transition system.<br />

<br />

¡

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

Saved successfully!

Ooh no, something went wrong!