CVS difference for ai05s/ai05-0200-1.txt

Differences between 1.3 and version 1.4
Log of other versions for file ai05s/ai05-0200-1.txt

--- ai05s/ai05-0200-1.txt	2010/10/26 05:39:47	1.3
+++ ai05s/ai05-0200-1.txt	2011/03/17 06:32:31	1.4
@@ -1,4 +1,4 @@
-!standard  12.7(4.1/2)                               10-10-21    AI05-0200-1/01
+!standard  12.7(4.1/2)                               11-03-15    AI05-0200-1/02
 !class binding interpretation 10-02-12
 !status work item 10-02-12
 !status received 09-09-24
@@ -9,7 +9,8 @@
 
 !summary
 
-Legality rules for formal packages with box associations are clarified.
+Legality rules for formal packages with box associations are provided.
+They are similar to legality rules for regular instantiations.
 
 !question
 
@@ -69,11 +70,23 @@
 legal set of actuals for an instantiation of the template.
 
 If a formal_package_association for a formal type T of the template is given by
-<>, then the set of generic_actual_parameters, after replacing the <> with a new
-type derived from T, shall be a legal set of actuals for an instantiation of
-the template.
+<>, then the formal_package_association for any other generic_formal_parameter
+of the template whose declaration mentions T directly or indirectly must be
+given by a box as well.
+
+AARM note:
+
+The above rule is simple to state, though it does not reflect the fact that the
+formal package functions like an instantiation of a special kind, where each
+box association for a generic_formal_parameter F is replaced with a new entity
+F' that has the same characteristics as F: if F is a formal discrete type then
+F' is a discrete type, if F is a formal subprogram then F' is a subprogram
+with a similar signature, etc. In practice this is achieved by making the
+association into a copy of the declaration of the generic formal.
 
+end AARM note.
 
+
 !discussion
 
 We want the generic in the question to be illegal. It serves no purpose to
@@ -200,5 +213,39 @@
 directly.  Therefore,  speaking about a legal set of actuals for a conceptual
 instantiation seems like the simplest way to describe what is going on. I'm sure
 this is just the zeroth approximation to the final wording!
+
+****************************************************************
+
+From: Edmond Schonberg
+Sent: Tuesday, March 15, 2011  1:35 PM
+
+Here is an update of the proposed rules.  [This is version /02 - Editor.]
+The relevant paragraph is as follows:
+
+If all of the formal_package_associations are given by generic associations, the
+set of generic_actual_parameters of the formal_package_associations shall be a
+legal set of actuals for an instantiation of the template.
+
+If a formal_package_association for a formal type T of the template is given by
+<>, then the formal_package_association for any other generic_formal_parameter
+of the template whose declaration mentions T directly or indirectly must be
+given by a box as well.
+
+AARM note:
+
+The above rule is simple to state, though it does not reflect the fact that the
+formal package functions like an instantiation of a special kind, where each box
+association for a generic_formal_parameter F is replaced with a new entity F'
+that has the same characteristics as F: if F is a formal discrete type then F'
+is a discrete type, if F is a formal subprogram then F' is a subprogram with a
+similar signature, etc. In practice this is achieved by making the association
+into a copy of the declaration of the generic formal.
+
+end AARM note.
+
+
+The second paragraph is given as an easy-to-follow rule for the programmer (an
+operational rule so to speak)  while the AARM note provides  an axiomatic rule
+about the legality of some equivalent instantiation.
 
 ****************************************************************

Questions? Ask the ACAA Technical Agent