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.

8.6 Primitive deepCopy Messages 253<br />

¡ a so-called Sys-structure. For Sys <strong>Systems</strong>, a triple <br />

¡ ¡<br />

¥ ¡ DObj Type is a<br />

¤ ¥<br />

Sys-structure if and only if<br />

(1) All data object identifiers ¡ in are also known in ¡ and vice versa. Dom(¡ ¤ So<br />

NDObj) = Dom( ¡ ).<br />

(2) Every class name, which is referred to in ¡ ¡<br />

pressed ¡ formally: ¡ For all Dom(<br />

, is defined in Sys, and the instance<br />

variables <strong>of</strong> all data objects in conform to their respective class definition. Ex-<br />

¡ <br />

£<br />

) : ¡ ¡ CDn £<br />

Sys<br />

¡ ¥ n¦ ¡ ¡ 1¥¡<br />

CD1 and there exists an<br />

i : CDi data class ¡ ¦<br />

¡ ¡ ¡ (¡ ¡<br />

Dom(¡ (¡<br />

) instance variables x1 xp instance methods<br />

such that )) = £<br />

¥¡ xp¦ ¥ ¡ ¡ x1 .<br />

(3) ¡ is closed. This means that every data object, referred to by objects (or<br />

proc) in ¡ , is also in ¡ . Expressed more formally: For all ¢ ¡ Dom(¡ ) and<br />

x ¡ Dom(¡ (¢ )) : ¡ (¢ )(x) ¡ NDObj implies ¡ (¢ )(x) ¡ Dom(¡ ).<br />

(4) If object ¤ is non-primitive, then it is part <strong>of</strong> ¡ . So ¤ ¡ NDObj implies ¤ ¡ Dom(¡ ).<br />

We let StrucSys denote the set <strong>of</strong> all Sys-structures.<br />

To compute identifier ¡ set we introduce a collection <strong>of</strong> ¢¡¤£¥ functions . Let <br />

StrucSys and let ¥ Dom(¡ V ). ¦¡¤£¥ Then © (Dom(¡ : £ © (Dom(¡ )) )) is defined by<br />

§¡¤£¥ (V)<br />

¡<br />

¡ £<br />

¢<br />

¤ ¥ ¡ ¥<br />

¤ ¡ £<br />

¤<br />

¤ ¦ ¦ V ¦<br />

if PDObj<br />

£<br />

For n ¡£ we will write n<br />

¡¤£¥ (V) to denote the n-fold application <strong>of</strong> ¨¡¤£¥ to V, so<br />

¡¤£¥ 0 (V) V<br />

n 1<br />

¡ ¡ NDObj ¡ for some ¢ ¡ V and x ¡ IVar : ¡ ¡ (¢ )(x)¦ if ¤ ¡ NDObj<br />

¡¤£¥ ¡¤£¥ §¡¤£¥<br />

¡¤£¥ ©¡¤£¥<br />

¡<br />

(V) n ( (V))<br />

n<br />

We will now show how functions and can be applied to calculate the required<br />

object identifier set . Let <br />

¤ ¡ be a Sys-structure and assume that NDObj. Then<br />

¨<br />

¨<br />

¨<br />

¨<br />

£<br />

£<br />

£<br />

£<br />

£<br />

n<br />

¤ ¥ ¡ ¥<br />

(¤ ¡ ) § 0 § 0¦ ¤<br />

¡¤£¥ n<br />

(¤ n ¡<br />

£<br />

) § 0 § 1¦ ¤ ¦<br />

¡¤£¥ n<br />

¡¤£¥ (¤ n ¡ ) § 0 § 2¦ n<br />

n<br />

¡¤£¥ (¤ ) ¡ 0 § n § 3¦<br />

n<br />

¡<br />

£<br />

¦ ¦ £ ¤<br />

¦ ¦ ¤<br />

¡ ¡ ¡<br />

£ £<br />

¡<br />

¡¤£¥ ¨ § n¦<br />

¦ ¡ (¤ ¤ ¦<br />

£<br />

¡¤£¥ (¤ ¨ ) ¡ 0 ¤£¡ § n¦ ¤ .<br />

) 0<br />

In case PDObj, n<br />

£<br />

£<br />

£<br />

each object directly known to ¤ ¦ object<br />

each object directly known to ¤ ¦ ¦ object<br />

each object directly known to some<br />

object that is directly known ¤ ¦ by<br />

each object (indirectly) known to object ¤ ¦<br />

£<br />

¨ ¡¤£¥ (¤ ¡ n¦<br />

£ §<br />

¨ ¡ (¤ ¡ § ¤ n¦ ¡¤£¥<br />

So clearly we have that n ) 0 is precisely the set <strong>of</strong> all object (identifiers)<br />

that are (indirectly) known to , that is = n ) 0 .<br />

¡<br />

¡

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

Saved successfully!

Ooh no, something went wrong!