Version 1.2 of ais/ai-00393.txt

Unformatted version of ais/ai-00393.txt version 1.2
Other versions for file ais/ai-00393.txt

!standard 3.11(13)          04-12-15 AI95-00393/01
!class binding interpretation 04-12-15
!status No Action (7-0-3) 05-02-13
!status work item 04-12-15
!status received 04-12-15
!qualifier omission
!subject Defaulted generic parameters evaluation and elaboration check
!summary
The defaulted parameters of an instantiation are evaluated. The evaluation of all the parameters and the elaboration check are done in an arbitrary order.
!question
3.11(13) states that:
"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."
This does not mention the defaulted generic parameters. Are they evaluated? (Yes.) Is there any ordering constraint between their evaluation and the elaboration check? (No.)
!recommendation
(See wording.)
!wording
Replace 3.11(13) by:
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 generic actual parameters of the instantiation are done in an arbitrary order.
AARM Note: The evaluation of generic actual parameters are subject to the constraints described in 12.3(20).
!discussion
Although 3.11(13) only mentions explicit_generic_actual_parameters, 12.3(20) makes it clear that, from the perspective of Dynamic Semantics, each defaulted parameter is equivalent to an implicit generic_association. Thus defaulted parameters are definitely evaluated. 12.3(20) also explains that there are ordering constraints amond the defaults: "... the evaluation for a default actual takes place after the evaluation for another actual if the default includes a name that denotes the other one". However, there is no indication of ordering constraints between the parameter evaluations and the elaboration check. Thus, it appears that the mention of explicit_generic_actual_parameter in 3.11(13) is an error, and that "generic actual parameter" is what is meant.
!corrigendum 3.11(13)
Replace the paragraph:
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.
by:
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 generic actual parameters of the instantiation are done in an arbitrary order.
!ACATS Test
Since this specifies "arbitrary order", no reasonable test can be constructed.
!appendix

****************************************************************

Questions? Ask the ACAA Technical Agent