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.

8.8 Summary and Concluding Remarks 259<br />

We therefore have<br />

(( <br />

new (Complex) 9))¥ ¥ ¥ ¥ 4)) add( new (Complex) init(8¥ )<br />

¤ ¤ Sys init(3¥<br />

£<br />

( ¢ <br />

¢ ¢ £ ¢ ¢ ¢ ¢<br />

8¥ £ 9¥ £ £ 11¥<br />

£ £ 13¦ ¥ 4¥<br />

¥<br />

3¥ ¢ ¢ £ 3¥<br />

£ £ Complex¥ Complex¦ ¥ Sys )¦<br />

1 re 1 im 2 re 2 im 3 re 3 im<br />

2 3<br />

£ ¢ 1 £ Complex¥<br />

¢<br />

So, the result <strong>of</strong> sum <strong>of</strong> complex number (3 4 ) and (8 9 ) is an object denoted as 3.<br />

This object is <strong>of</strong> class Complex and represents value (11 13i) (instance variable re refers<br />

to 11 and im refers to 13), precisely as we would expect.<br />

In this case the set <strong>of</strong> terminal configurations is singleton. Note that in general this<br />

in not necessarily true. If the execution <strong>of</strong> a statement loops or blocks, for example,<br />

the set <strong>of</strong> terminal configurations may be empty. Further, if the execution involves<br />

non-deterministic bunk objects, the set may contain more than one element.<br />

8.8 Summary and Concluding Remarks<br />

In this chapter the data part <strong>of</strong> the POOSL language, concerning data objects, is described<br />

and a formal operational semantics has been developed. The operational semantics is<br />

a computational semantics. It emphasises the individual steps needed to evaluate or<br />

execute data expressions respectively data statements. The semantics is specified by<br />

means <strong>of</strong> a transition system. We have clarified the formal description by an example in<br />

which we calculate the semantics <strong>of</strong> a complex-number expression.<br />

An important part <strong>of</strong> the semantics is formed by the formal definition <strong>of</strong> deepCopy<br />

messages. This definition will appear to be very important to introduce concurrency in<br />

the language.<br />

The data part <strong>of</strong> the POOSL language is not complete yet. In the future it will have to be<br />

extended with the concepts <strong>of</strong> inheritance, typing and subtyping. Further, the theories<br />

<strong>of</strong> , ¡ , ¢ and Char, that were assumed to be parameters <strong>of</strong> the semantics, will have to<br />

be made explicit.

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

Saved successfully!

Ooh no, something went wrong!