Information Technology Reference
In-Depth Information
9. Result returning. If
f
is a query, then return the result to
q
. If the result is of ex-
panded type and
p
q
, then the result must be deep imported by
q
.
10. Lock revocation. Return the passed locks from
p
to
q
.
=
Each feature application starts with an operation
apply
(
in the
action queue of processor
p
. The channel
a
is used to communicate with the client
processor
q
. If the called feature
f
is a procedure and the caller processor
q
passed
some locks, then
a
is used to signal that the locks returned. If
f
is query, then
a
is
used to return the value. The reference
r
0
points to the target of the call. The references
(
a
,
r
0
,
f
,
(
r
1
,...,
r
n
)
,
q
,
l
)
point to the actual arguments. The tuple
l
contains the locks to be passed
from
q
to
p
.
If one takes a look at the execution step, one can differentiate three cases:
r
1
,...,
r
n
)
-
The feature
f
is a non-once routine or a fresh once routine.
-
The feature
f
is a non-fresh once routine.
-
The feature
f
is an attribute.
For each of these cases, there is one inference rule. Each inference rule covers one
variant of the
apply
operation. The discussion continues with the most involved case:
the feature
f
is a non-once routine or a fresh once routine.
The condition of the inference rule states that each processor can only apply a feature
on one of its own objects. The condition also states the
p
must not have passed its locks.
This part of the condition is always given because
p
waits whenever it passes its locks.
In a first step, the operation defines an updated state
σ
to set
f
's once status to non-
fresh, in case
f
is a once routine. The operation does this before deep importing the
actual arguments to avoid the following contradiction.
Clarification 4 (When to change the status of a fresh once routine).
Assume
f
is either
a once procedure or a non-separate once routine. The feature
f
was fresh at the begin-
ning of the
apply
operation. Assume that the caller passed an expanded actual argu-
ment that is handled by a processor
g
p
. Therefore
p
has to deep import the actual
argument. Assume furthermore that the class type of the actual argument has the once
routine
f
and that
f
is non-fresh on
g
. If the operation would deep import before setting
f
as non-fresh on
p
, then the deep import operation would take over the once status of
f
from processor
g
to processor
p
. But then the
apply
operation on
p
would not make
much sense anymore because
f
would now be non-fresh on
p
. If the operation sets
f
as
non-fresh at the beginning of the
apply
operation, then the deep import operation does
not take over the once status from
g
because
f
is already non-fresh on
p
.
=
σ
in which the locks are passed from
q
to
p
and
in which there is a new environment with the actual arguments
The operation defines an updated state
. The call to
the
push env with feature
feature takes care of copying and deep importing actual ar-
guments of expanded type. The caller processor
q
can also pass an empty tuple
(
r
1
,...,
r
n
)
(
{}, {}
)
which simply means that
q
did not pass any locks.
Search WWH ::
Custom Search