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

Differences between 1.9 and version 1.10
Log of other versions for file ai12s/ai12-0042-1.txt

--- ai12s/ai12-0042-1.txt	2013/12/11 23:43:32	1.9
+++ ai12s/ai12-0042-1.txt	2013/12/12 02:17:33	1.10
@@ -1,5 +1,9 @@
-!standard 7.3.2(6/3)                                 13-11-17    AI12-0042-1/07
+!standard 7.3.2(6/3)                                 13-12-11    AI12-0042-1/08
+!standard 7.3.2(18/3)
+!standard 7.3.2(19/3)
 !class binding interpretation 12-11-29
+!status Corrigendum 2014 13-12-11
+!status ARG Approved 6-0-2  13-11-17
 !status work item 12-11-29
 !status received 12-04-09
 !priority Medium
@@ -11,7 +15,7 @@
 any private operation of the ancestor type that is visible at the point of the
 extension shall be overridden. In addition, if a type invariant is inherited
 by a record extension, the type invariant is checked after any operation that
-corresponds to a visible operation of an ancestor to which the same invariant
+corresponds to a visible operation of an ancestor to which this invariant
 applies.
 
 !question
@@ -69,7 +73,7 @@
        Type_Invariant'Class and a private operation, then we've
        added a rule that the operation must be either overridden or
        abstract. The point is that the class-wide Type_Invariant of
-       the ancestor didn't apply to the  original operation (because
+       the ancestor didn't apply to the original operation (because
        it was a private operation) but it applies to the inherited
        operation.
 
@@ -82,7 +86,7 @@
        subprogram.
 
        This is just to avoid surprising behavior, not because of any
-       real definitional problem. IT also spares implementations from
+       real definitional problem. It also spares implementations from
        having to generate wrapper routines.
 
    2)  In 7.3.2(18/3), the existing wording:
@@ -100,9 +104,63 @@
        of its parent type - instead, it may override implicitly-declared
        operations that were inherited from the parent type.
 
+We considered the more general issue of invariants that apply to record
+extensions. This can happen two ways. One is a Type_Invariant'Class inherited
+into a record extension. Similarly, invariants can be added to private
+extensions of record types that have visible components. In each of these
+cases, the visible components can be modified independent of the package
+boundaries, which could make the invariant False. The checking for type
+invariants was designed to catch virtually all cases where the objects
+cross the package boundaries. When there are visible components, this model
+breaks down as the visible components can be modified independent of the
+package boundaries, which could make the invariant False without detection.
+Both cases could be prevented with Legality Rules (as we do not allow
+class-wide invariants to be hidden). We decided its not worth preventing such
+things, even with the possibility of misuse.
+
+!corrigendum 7.3.2(6/3)
+
+@dinsa
+The Type_Invariant'Class aspect shall not be specified for an untagged type.
+The Type_Invariant aspect shall not be specified for an abstract type.
+@dinst
+If a private extension occurs at a point where a private operation of
+some ancestor is visible and inherited, and a Type_Invariant'Class expression
+applies to that ancestor, then the inherited operation shall be
+abstract or shall be overridden.
+
+!corrigendum 7.3.2(18/3)
+
+@ddel
+@xinbull<is visible outside the immediate scope of type @i<T> or overrides
+an operation that is visible outside the immediate scope of @i<T>, and>
+
+!corrigendum 7.3.2(19/3)
+
+@drepl
+@xinbull<has a result with a part of type @i<T>, or one or more
+parameters with a part of type @i<T>, or an access to variable
+parameter whose designated type has a part of type @i<T>.>
+@dby
+@xinbull<has a result with a part of type @i<T>, or one or more
+parameters with a part of type @i<T>, or an access to variable
+parameter whose designated type has a part of type @i<T>;>
+
+@xinbull<and either:>
+
+@xi2bull<@i<T> is a private type or a private extension and the subprogram
+or entry is visible outside the immediate scope of type @i<T> or
+overrides an inherited operation that is visible outside the
+immediate scope of @i<T>, or>
+
+@xi2bull<@i<T> is a record extension and the subprogram or entry is a
+primitive operation that corresponds to a visible operation of a private
+or private extension ancestor to which the same (class-wide)
+invariant applies.>
+
 !ACATS test
 
-An ACATS B-Test should be created to test these rules.
+ACATS B-Tests and C-Tests should be created to test these rules.
 
 !appendix
 

Questions? Ask the ACAA Technical Agent