CVS difference for ai12s/ai12-0191-1.txt

Differences between 1.11 and version 1.12
Log of other versions for file ai12s/ai12-0191-1.txt

--- ai12s/ai12-0191-1.txt	2019/02/26 01:35:02	1.11
+++ ai12s/ai12-0191-1.txt	2019/05/11 00:35:20	1.12
@@ -1,7 +1,9 @@
-!standard 3.9.1(4.1/2)                                      19-02-25  AI12-0191-1/08
+!standard 3.9.1(4.1/2)                                      19-05-10  AI12-0191-1/09
 !standard 7.3.2(10.1/4)
 !standard 7.3.2(15/5)
 !class binding interpretation 16-06-06
+!status Amendment 1-2012 19-05-09
+!status ARG Approved 11-0-0  19-05-09
 !status work item 16-06-06
 !status received 16-05-31
 !priority Low
@@ -10,8 +12,8 @@
 !subject Clarify "part" for type invariants
 !summary
 
-Screened components are not checked even if a type invariant check would
-apply to them.
+Components that are not components of the nominal type are not checked even if 
+a type invariant check would apply to them.
 
 !question
 
@@ -35,6 +37,12 @@
   type of the object (see 3.9.1). Other terms, such as "subcomponent"
   and "part", are interpreted analogously.
 
+Modify 3.3(23/5):
+
+At the place where a view of an object is defined, a *nominal subtype* is 
+associated with the view.{ The *nominal type* of a view is the type of the
+nominal subtype.}   ...
+
 Add after 3.9.1(4.1/2):
 
   In the case where the (compile-time) view of an object X is of a
@@ -134,7 +142,7 @@
 is likely to be unknown at compile-time even if the compiler looks through
 all private types and expands all generic instances (specs and bodies).
 The implementation of any dynamic semantics rule requiring that some action
-needs to be performed for such components (e.g., finalization) will
+needs to be performed for such components (for instance, finalization) will
 typically require dispatching.
 
 !example
@@ -179,13 +187,45 @@
 
 end Derived;
 
+!corrigendum 3.3(23/3)
 
+@drepl
+At the place where a view of an object is defined, a @i<nominal subtype> is 
+associated with the view. The object's @i<actual subtype> (that is, its 
+subtype) can be more restrictive than the nominal subtype of the view; it 
+always is if the nominal subtype is an @i<indefinite subtype>. A subtype is 
+an indefinite subtype if it is an unconstrained array subtype, or if it has 
+unknown discriminants or unconstrained discriminants without defaults (see 
+3.7); otherwise, the subtype is a @i<definite> subtype (all elementary subtypes
+are definite subtypes). A class-wide subtype is defined to have unknown 
+discriminants, and is therefore an indefinite subtype. An indefinite subtype
+does not by itself provide enough information to create an object; an 
+additional @fa<constraint> or explicit initialization @fa<expression> is 
+necessary (see 3.3.1). A component cannot have an indefinite nominal subtype.
+@dby
+At the place where a view of an object is defined, a @i<nominal subtype> is 
+associated with the view. The @i<nominal type> of a view is the type
+of the nominal subtype of the view. The object's @i<actual subtype> (that is, its 
+subtype) can be more restrictive than the nominal subtype of the view; it 
+always is more restrictive if the nominal subtype is an @i<indefinite 
+subtype>. A subtype is an indefinite subtype if it is an unconstrained array 
+subtype, or if it has unknown discriminants or unconstrained discriminants 
+without defaults (see 3.7); otherwise, the subtype is a @i<definite> subtype 
+(all elementary subtypes are definite subtypes). A class-wide subtype is 
+defined to have unknown discriminants, and is therefore an indefinite 
+subtype. An indefinite subtype does not by itself provide enough information 
+to create an object; an additional @fa<constraint> or explicit initialization
+@fa<expression> is necessary (see 3.3.1). A component cannot have an 
+indefinite nominal subtype.
+
 !ASIS
 
 No ASIS effect.
 
 !ACATS test
 
+We could write a test to check that such components aren't checked (as in the
+example), but that doesn't seem to be very valuable.
 
 !appendix
 
@@ -1150,5 +1190,31 @@
 
 Sigh. OK, I've posted an update [/08 of the AI] with this wording for
 discussion tomorrow.
+
+****************************************************************
+
+From: Randy Brukardt
+Sent: Friday, May 10, 2019  7:25 PM
+
+I was asked to research the uses of the term "nominal type" in the RM and 
+AARM, and check that they are compatible with the proposed definition:
+
+    The *nominal type* of a view is the type of the nominal subtype of the 
+    view.
+
+The search engine finds only two uses in AARM notes:
+
+4.3.4(14.b/5):
+   This requires that the underlying tag (if any) associated with the 
+   delta_aggregate is that of the base_expression in the delta_aggregate and 
+   not that of the nominal type of the base_expression in the delta_aggregate.
+
+6.1.1(26.b/4):
+   This means that the underlying tag associated with X'Old is that of X and 
+   not that of the nominal type of X. 
+
+These are compatible with the proposed definition. I note in passing that both 
+of these notes are in areas that Steve Baird was a primary author of, as was 
+the case of this AI. I detect a pattern. :-)
 
 ****************************************************************

Questions? Ask the ACAA Technical Agent