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.

252 Data Part <strong>of</strong> POOSL<br />

The evaluation <strong>of</strong> an expression as part <strong>of</strong> the execution <strong>of</strong> a method is formalised in rule<br />

(e) above. If rule (e) is successively applied to configuration <br />

¡ ¡<br />

¥ s¡ ¥ ¥ Sys until the<br />

E¥<br />

rule is not applicable anymore, the resulting configuration is either stuck, or it is <strong>of</strong> the<br />

form <br />

¥ Sys . In the latter case, data object ¤ is the result <strong>of</strong> the evaluation<br />

¡ ¡<br />

¥<br />

¡<br />

¡ ¡ ¥ s¡ ¡ ¥<br />

¤ ¡<br />

<strong>of</strong> expression E. By axiom (9) this result is at the same time the result <strong>of</strong> the execution <strong>of</strong><br />

method m. This result is inserted at the place <strong>of</strong> the and the local variable environment<br />

<strong>of</strong> m is popped s¡ ¡ <strong>of</strong>f stack (at least if this stack is not empty).<br />

8.5.4 The Semantic Function<br />

Now that we have defined the £ transition relation , we will specify what we consider to<br />

be the meaning <strong>of</strong> a configuration. We define the semantics <strong>of</strong> a configuration as the set<br />

<strong>of</strong> all terminal configurations <strong>of</strong> all its possible derivation sequences. A configuration is<br />

terminal if it is <strong>of</strong> the form <br />

¡ ¡<br />

¥ s¥ ¥ Sys . Formally, we define a semantic function as<br />

¤ ¥<br />

follows:<br />

where<br />

: Conf £ © (Conf )<br />

( Se £<br />

¡<br />

Sys ¥ ¤ ¥ ¡ ¡<br />

¡ ¥ s¡ ¥ ¡ ¥ Sys ¡ <br />

¥ ¡ ¡ ¡<br />

<br />

¥ ¥ s¥ ¥ Sys £ ¤ ¥ ¡ ¡<br />

¡ ¥ s¡ ¥ ¡ ¥ Sys ¦<br />

s¥ ¥<br />

© £<br />

£<br />

)<br />

e S<br />

Here, (Conf ) denotes the powerset <strong>of</strong> Conf , i.e., the set <strong>of</strong> all subsets <strong>of</strong> Conf . is<br />

the reflexive-transitive closure <strong>of</strong> relation and denotes that a configuration can lead<br />

to another configuration in zero or more computation steps.<br />

8.6 Primitive deepCopy Messages<br />

The transition system defined in Appendix A incorporates the definition <strong>of</strong> so-called<br />

deepCopy messages. A deepCopy <strong>of</strong> a non-primitive object creates a new object <strong>of</strong> the<br />

same class. The objects referred to by the instance variables <strong>of</strong> this newly created object<br />

are again deepCopies <strong>of</strong> the objects referred to by the instance variables <strong>of</strong> the original<br />

object. DeepCopies <strong>of</strong> primitive objects are the primitive objects themselves.<br />

The definition <strong>of</strong> the semantics <strong>of</strong> deepCopy messages requires a function copy and<br />

a collection <strong>of</strong> functions relabel m. Function copy takes a triple ¡<br />

¥ ¤ ¥ ¡<br />

¡ ¤<br />

<strong>of</strong> an object<br />

(identifier) , a variables state and a type ¡ ¤ and delivers a copy <strong>of</strong> object . This<br />

copy is again represented by a triple <strong>of</strong> an object (identifier), a variables state and a type<br />

and is <strong>of</strong> the form <br />

¡ ¡ ¤£¡ . is the set <strong>of</strong> identifiers <strong>of</strong> all objects that are<br />

(indirectly) known to object ¤ . If ¤ denotes a non-primitive object, it is also contained in<br />

¤ ¥ ¡ ¤¢¡ ¥<br />

The collection <strong>of</strong> functions relabel m is used to relabel all object identifiers in some <br />

triple<br />

by increasing them by m.<br />

<br />

¡ . Since primitive objects do not know any other objects, ¡ is empty if ¤ is primitive.<br />

¤ ¥ ¡ ¥<br />

¡<br />

To calculate a proper object-copy, we let the input triple <br />

¤ ¥ ¡ ¥<br />

¡<br />

<strong>of</strong> function copy be

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

Saved successfully!

Ooh no, something went wrong!