3.11 Declarative Parts
Syntax
Static Semantics
Dynamic Semantics
An elaborable construct is in
the
elaborated state after the normal completion of its elaboration.
Prior to that, it is
not yet elaborated.
For a construct
that attempts to use a body, a check (Elaboration_Check) is performed,
as follows:
For a call to a (non-protected) subprogram that
has an explicit body, a check is made that the body is already elaborated.
This check and the evaluations of any actual parameters of the call are
done in an arbitrary order.
For a call to a protected operation of a protected
type (that has a body — no check is performed if a
pragma
Import applies to the protected type), a check is made that the
protected_body
is already elaborated. This check and the evaluations of any actual parameters
of the call are done in an arbitrary order.
For the activation of a task, a check is made by
the activator that the
task_body
is already elaborated. If two or more tasks are being activated together
(see
9.2), as the result of the elaboration
of a
declarative_part
or the initialization for the object created by an allocator, this check
is done for all of them before activating any of them.
For the instantiation of a generic unit that has
a body, a check is made that this body is already elaborated. This check
and the evaluation of any
explicit_generic_actual_parameters
of the instantiation are done in an arbitrary order.
The exception Program_Error is
raised if any of these checks fails.