Information Technology Reference
In-Depth Information
Literal Expression
e LITERAL
σ
σ
if e = Vo i d
σ . add obj ( p , e . obj ) otherwise
de f
=
void if e = Vo i d
σ . ref ( σ . last added obj ) otherwise
Γ p :: eval ( a , e )
r de f
=
; s p , σ
; s p , σ p :: result ( a , r )
Feature calls. A feature call can occur in two ways. First, a feature call can be a call to
a command in a command instruction. Second, a feature call can be a call to a query in
an expression. This section studies both variants. A processor p that executes a feature
call e 0
.
(
,...,
)
f
e 1
e n
goes through the following steps:
1. Target evaluation. Evaluate the target expression e 0 and let q denote the handler of
the target.
2. Argument passing. Evaluate the actual arguments expressions
(
e 1 ,...,
e n )
.
3. Lock passing. Determine which locks to pass to q .
- Take all request queue locks and call stack locks if a controlled actual argument
gets attached to an attached formal argument of reference type.
- Take all request queue locks and call stack locks if the feature call is a separate
callback, i.e., q has a lock on p .
- Otherwise, take no locks.
4. Feature request.
- Ask q to apply f to the target immediately and wait until the execution termi-
nates if any of the following conditions holds:
The feature call is non-separate, i.e., p
=
q .
The feature call is a separate callback, i.e., q has a lock on p .
- Otherwise, ask q to apply f to the target after the previous feature requests.
5. Wait by necessity. If f is a query, then wait for the result.
6. Lock revocation. If lock passing happened, then wait for the locks to come back.
A command instruction is a statement in the action queue. A query is an expression on
the right hand side of an assignment, a condition in a flow control instruction, or an
actual argument in a feature call. Whenever a query occurs in one of these constructs,
the inference rule of the construct encloses the query in an eval operation. To handle
feature calls, there is an inference rule for command instructions and a variant of the
eval operation for query calls.
In each case, the statement first evaluates the target expression and all actual argument
expressions. For each of these expressions e i , it uses one eval (
a e i ,
e i )
operation and a
corresponding wait (
operation with a fresh channel a e i . Each of the channel values
gets used in the subsequent call operation. With this, the statement handled the target
evaluation and the argument passing step. It defers the attachment of the actual arguments
to the formal arguments to the point where the called feature gets applied. The reason for
this is simple: at this point the context for the feature application does not exist yet.
The call operation takes care of the remaining steps. The operation exists in two vari-
ants, one for command instructions and one for queries. The variant for queries takes a
a e i )
Search WWH ::




Custom Search