CVS difference for ais/ai-00251.txt

Differences between 1.33 and version 1.34
Log of other versions for file ais/ai-00251.txt

--- ais/ai-00251.txt	2005/07/28 02:30:07	1.33
+++ ais/ai-00251.txt	2005/08/21 06:00:19	1.34
@@ -1,4 +1,4 @@
-!standard 03.04    (02)                            05-06-04   AI95-00251/21
+!standard 03.04    (02)                            05-07-27   AI95-00251/22
 !standard 02.09    (02)
 !standard 03.02    (04)
 !standard 03.02.01 (02)
@@ -21,7 +21,6 @@
 !standard 04.06 (13-24)
 !standard 07.03 (02)
 !standard 08.03 (12)
-!standard 08.03 (26/1)
 !standard 12.05 (03)
 !standard 12.05.01 (03)
 !standard 12.05.01 (15)
@@ -369,9 +368,6 @@
         This would be bad.
 	End AARM Note
 
-        For an interface type declared in a visible part, a primitive
-        subprogram shall not be declared in the private part.
-
         In addition to the places where Legality Rules normally apply
         (see 12.3), these rules apply also in the private part of an instance
         of a generic unit.
@@ -461,14 +457,20 @@
         previous implicit declaration of an inherited subprogram.
 
       * If two or more homographs are implicitly declared at the same place:
-
-        - If one is a non-null non-abstract subprogram, then it overrides
-          those that are null or abstract subprograms.
 
-        - If all are null procedures or abstract subprograms, then any null
-          procedure overrides all abstract subprograms; if more than one
-          such homograph remains that is not thus overridden, then one is
-          chosen arbitrarily to override the others.
+        - If at least one is a subprogram that is neither a null procedure nor
+          an abstract subprogram, and does not require overriding (see 3.9.3),
+          then they override those that are null procedures, abstract
+          subprograms, or require overriding. If more than one such homograph
+          remains that is not thus overridden, then they are all hidden from
+          all visibility.
+
+        - Otherwise (all are null procedures, abstract subprograms, or require
+	  overriding), then any null procedure overrides all abstract
+	  subprograms and all subprograms that require overriding; if more than
+	  one such homograph remains that is not thus overridden, then if they
+	  are all fully conformant with one another, one is chosen arbitarily;
+	  if not, they are all hidden from all visibility.
 
 
 	AARM Note: Discussion: It is intended that in the case where the
@@ -494,6 +496,26 @@
 
 	    without requiring that T explicitly override any of its inherited
 	    operations.
+
+            When the subprograms do not conform, we chose not to adopt the
+	    "use clause" rule which would make them all visible
+	    resulting in likely ambiguity. If we had used such a rule, any
+	    successful calls would be confusing; and the fact that there are no
+	    Beaujolais-like effect to worry about means we can consider other
+	    rules. The hidden-from-all-visibility homographs are still
+	    inherited by further derivations, which avoids order-of-declaration
+	    dependencies and other anomolies.
+
+            We have to be careful to not include arbitrary selection if the
+            routines have real bodies. (This can happen in generics, see
+            the example in the incompatibilies section below.) We don't
+            want the ability to sucessfully call routines where the body
+            executed depends on the compiler or a phase of the moon.
+
+	    Note that if the type is concrete, abstract subprograms are
+            inherited as subprograms that require overriding.
+            We include functions that require overriding as well; these
+            don't have real bodies, so they can use the more liberal rules.
         End AARM Note
 
       * For an implicit declaration of a primitive subprogram in a generic unit,
@@ -506,33 +528,6 @@
         tagged types, the body of a new one can be executed by a call to an
         old one.
 
-Replace 26/1 with:
-
-    A non-overridable declaration is illegal if there is a homograph occurring
-    immediately within the same declarative region that is visible at the place
-    of the declaration, and is not hidden from all visibility by the
-    non-overridable declaration. In addition, a type extension is illegal if
-    somewhere within its immediate scope it has two visible components with the
-    same name. Similarly, the context_clause for a subunit is illegal if it
-    mentions (in a with_clause) some library unit, and there is a homograph of
-    the library unit that is visible at the place of the corresponding stub, and
-    the homograph and the mentioned library unit are both declared immediately
-    within the same declarative region.
-
-    If two or more homographs are implicitly declared at the same place (and
-    not overridden by a non-overridable declaration) then at most one shall be
-    a non-null non-abstract subprogram. If all are null procedures or abstract
-    subprograms, then all of the null procedures shall be fully conformant
-    with one another. If all are abstract subprograms, then all of the
-    subprograms shall be fully conformant with one another.
-
-    All of the above Legality Rules also apply to dispatching operations
-    declared in the visible part of an instance of a generic unit. However,
-    they do not apply to other overloadable declarations in an instance; such
-    declarations may have type conformant profiles in the instance, so long as
-    the corresponding declarations in the generic were not type conformant.
-
-
 12.5 Formal Types
 
     Add to syntax
@@ -583,12 +578,25 @@
         The actual type shall be limited if and only if the formal type is
         limited.
 
+13.13.2 Stream-Oriented Attributes
+
+   Change the last sentence of paragraph 9 (as modified by AI-195) to:
+
+      For a limited type extension, if the attribute of the parent type
+      or any progenitor type of T is available anywhere within the immediate
+      scope of T, and the attribute of the parent type or the type of any of
+      the extension components is not available at the freezing point of T,
+      then the attribute of T shall be directly specified.
+
+
+
 13.14 Freezing Rules
 
     Add a further bullet after paragraph 7:
 
-        The declaration of a specific descendant of an interface type freezes
-        the interface type.
+      The declaration of a record extension, interface type,
+      task unit, or protected unit causes freezing of any
+      progenitor types specified in the declaration.
 
 !discussion
 
@@ -1179,9 +1187,6 @@
 the corresponding partial view (if any) is also a descendant of the
 interface type.
 
-For an interface type declared in a visible part, a primitive
-subprogram shall not be declared in the private part.
-
 In addition to the places where Legality Rules normally apply
 (see 12.3), these rules apply also in the private part of an instance
 of a generic unit.
@@ -1392,54 +1397,17 @@
 previous implicit declaration of an inherited subprogram.>
 @dinss
 @xbullet<If two or more homographs are implicitly declared at the same place:>
-@xinbull<If one is a non-null non-abstract subprogram, then it overrides
-those that are null or abstract subprograms.>
-@xinbull<If all are null procedures or abstract subprograms, then any null
-procedure overrides all abstract subprograms; if more than one such homograph
-remains that is not thus overridden, then one is chosen arbitrarily to override
-the others.>
-
-!corrigendum 8.3(26/1)
-
-@drepl
-A non-overridable declaration is illegal if there is a homograph occurring
-immediately within the same declarative region that is visible at the place of
-the declaration, and is not hidden from all visibility by the non-overridable
-declaration. In addition, a type extension is illegal if somewhere within its
-immediate scope it has two visible components with the same name. Similarly,
-the @fa<context_clause> for a @fa<subunit> is illegal if it mentions (in a
-@fa<with_clause>) some library unit, and there is a homograph of the library
-unit that is visible at the place of the corresponding stub, and the homograph
-and the mentioned library unit are both declared immediately within the same
-declarative region. These rules also apply to dispatching operations declared
-in the visible part of an instance of a generic unit. However, they do not
-apply to other overloadable declarations in an instance; such declarations may
-have type conformant profiles in the instance, so long as the corresponding
-declarations in the generic were not type conformant.
-@dby
-A non-overridable declaration is illegal if there is a homograph occurring
-immediately within the same declarative region that is visible at the place of
-the declaration, and is not hidden from all visibility by the non-overridable
-declaration. In addition, a type extension is illegal if somewhere within its
-immediate scope it has two visible components with the same name. Similarly,
-the @fa<context_clause> for a @fa<subunit> is illegal if it mentions (in a
-@fa<with_clause>) some library unit, and there is a homograph of the library
-unit that is visible at the place of the corresponding stub, and the homograph
-and the mentioned library unit are both declared immediately within the same
-declarative region.
-
-If two or more homographs are implicitly declared at the same place (and not
-overridden by a non-overridable declaration) then at most one shall be a
-non-null non-abstract subprogram. If all are null procedures or abstract
-subprograms, then all of the null procedures shall be fully conformant with
-one another. If all are abstract subprograms, then all of the subprograms
-shall be fully conformant with one another.
-
-All of the above Legality Rules also apply to dispatching operations declared
-in the visible part of an instance of a generic unit. However, they do not
-apply to other overloadable declarations in an instance; such declarations may
-have type conformant profiles in the instance, so long as the corresponding
-declarations in the generic were not type conformant.
+@xinbull<If at least one is a subprogram that is neither a null procedure not
+an abstract subprogram, and does not require overriding (see 3.9.3), then
+they override those that are null procedures, abstract subprograms, or
+require overriding. If more than one such homograph remains that is not thus
+overridden, then they are all hidden from all visibility.>
+@xinbull<Otherwise (all are null procedures, abstract subprograms, or require
+overriding), then any null procedure overrides all abstract subprograms and all
+subprograms that require overriding; if more than one such homograph remains
+that is not thus overridden, then if they are all fully conformant with one
+another, one is chosen arbitarily; if not, they are all hidden from all
+visibility.>
 
 !corrigendum 12.5(03)
 
@@ -1509,14 +1477,47 @@
 
 The actual type shall be limited if and only if the formal type is limited.
 
+!corrigendum 13.13.2(9/1)
+
+@drepl
+For elementary types, the representation in terms of stream elements is
+implementation defined. For composite types, the Write or Read attribute for
+each component is called in canonical order, which is last dimension varying
+fastest for an array, and positional aggregate order for a record. Bounds are
+not included in the stream if @i<T> is an array type. If @i<T> is a
+discriminated type, discriminants are included only if they have defaults.
+If @i<T> is a tagged type, the tag is not included. For type extensions, the
+Write or Read attribute for the parent type is called, followed by the
+Write or Read attribute of each component of the extension part, in canonical
+order. For a limited type extension, if the attribute of any ancestor type of
+@i<T> has been directly specified and the attribute of any ancestor type of
+the type of any of the extension components which are of a limited type has
+not been specified, the attribute of @i<T> shall be directly specified.
+@dby
+For elementary types, the representation in terms of stream elements is
+implementation defined. For composite types, the Write or Read attribute for
+each component is called in canonical order, which is last dimension varying
+fastest for an array, and positional aggregate order for a record. Bounds are
+not included in the stream if @i<T> is an array type. If @i<T> is a
+discriminated type, discriminants are included only if they have defaults.
+If @i<T> is a tagged type, the tag is not included. For type extensions, the
+Write or Read attribute for the parent type is called, followed by the Write
+or Read attribute of each component of the extension part, in canonical order.
+For a limited type extension, if the attribute of the parent type or any
+progenitor type of @i<T> is available anywhere within the immediate scope of
+@i<T>, and the attribute of the parent type or the type of any of the extension
+components is not available at the freezing point of @i<T>, then the attribute
+of @i<T> shall be directly specified.
+
 !corrigendum 13.14(7)
 
 @dinsa
 @xbullet<The declaration of a record extension causes freezing of the parent
 subtype.>
 @dinst
-@xbullet<The declaration of a specific descendant of an interface type freezes
-the interface type.>
+@xbullet<The declaration of a record extension, interface type,
+task unit, or protected unit causes freezing of any
+progenitor types specified in the declaration.>
 
 
 !ACATS test

Questions? Ask the ACAA Technical Agent