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.

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

We define a set <strong>of</strong> variables states 5 ranging over ¡ ¥¡ ¡ ¡ as follows:<br />

£<br />

£<br />

¡ ¦ ¡ ¦£ ¡ proc¦ ¦£ Dom(¡ (NDObj finite¦<br />

¦£ Dom(¡ £<br />

proc¦ ¦ ¢¨¥¡ ¡ ¡ ¡<br />

£ ¡ ¦£ ¡ ¥¡<br />

) (IVar DObj) ) is<br />

Here, we use to indicate that a variables state is a partial function. ) denotes the<br />

domain <strong>of</strong> function . We will denote elements <strong>of</strong> NDObj by and elements<br />

<strong>of</strong> set IVar DObj by .<br />

Later in Chapter 9 we will see that every data expression or data statement is executed<br />

within the context <strong>of</strong> a single process object. Such a process has instance variables, which<br />

refer to data objects known to that process object. A variables state ¡ ¡ stores the<br />

values <strong>of</strong> all these instance variables as well as <strong>of</strong> those <strong>of</strong> all non-primitive data objects<br />

(indirectly) known to the process. Domain element proc is an identifier <strong>of</strong> the process<br />

itself. The other domain elements refer to the non-primitive data objects.<br />

We define a function MaxId which retrieves the greatest object identifier contained in a<br />

variables state. MaxId is needed to describe the creation <strong>of</strong> data objects. If a state does<br />

not contain any object identifiers, the function returns 0. Let ¡¢¡ . Then<br />

Max £<br />

n ¡<br />

¢ n ¡ Dom(¡ )¦ if Dom(¡ ¤ NDObj) ¡<br />

) MaxId(¡ ¥ 0 if Dom(¡ ¤ NDObj) ¤<br />

¡ ¤ Here NDObj denotes ¡ function restricted to set NDObj.<br />

Next, we define a set Stack <strong>of</strong> local variable stacks, with typical elements s¥¡ ¡ ¡ ,<br />

Stack ( £<br />

(LVar ¦£ DObj)) (NDObj (LVar ¦£ DObj))<br />

proc¦<br />

A stack is a (possibly empty) list <strong>of</strong> stack elements. An element <strong>of</strong> a stack denotes<br />

a local variables environment. Such an element consists <strong>of</strong> two components. The first<br />

component denotes the owner <strong>of</strong> the environment, which is either the involved process<br />

object or some non-primitive data object. The second component stores the values <strong>of</strong><br />

the local variables <strong>of</strong> the owner. The first component <strong>of</strong> the top <strong>of</strong> a stack denotes the<br />

object which is currently executing one <strong>of</strong> its methods. Note that the bottom (left-side)<br />

elements <strong>of</strong> each stack are owned by the involved process object, whereas the top (right-<br />

side) elements are owned by non-primitive data-objects. We e¥¡ ¡ ¡ let range over the £<br />

set<br />

<strong>of</strong> local variables environments ¦ (NDObj<br />

range over ¦£ Lvar DObj.<br />

proc¦ ) (LVar ¦£ DObj). We further let ¤ ¥¡ ¡ ¡<br />

We shall need the following operations upon stacks: For stack elements<br />

and stack<br />

e1 ¥¡ ¡ ¡ ¥ en ¥ e ¡ ((NDObj ¦<br />

e1 ¥¡ ¡ ¡ ¥ en ¡ Stack<br />

5 See also Paragraph 6.6.3.4<br />

£<br />

proc¦ ) (LVar ¦£ DObj))<br />

¤

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

Saved successfully!

Ooh no, something went wrong!