CVS difference for ais/ai-00195.txt

Differences between 1.17 and version 1.18
Log of other versions for file ais/ai-00195.txt

--- ais/ai-00195.txt	2001/09/08 03:35:05	1.17
+++ ais/ai-00195.txt	2001/09/13 01:59:47	1.18
@@ -1,4 +1,8 @@
-!standard 13.13.1 (00)                                01-08-31  AI95-00195/08
+!standard 13.13.1 (09)                                01-09-10  AI95-00195/09
+!standard 13.13.1 (27)
+!standard 13.13.1 (35)
+!standard 13.13.1 (36)
+!standard 13.13.1 (36.1)
 !class binding interpretation 98-03-27
 !status work item 98-04-04
 !status received 98-03-27
@@ -15,13 +19,15 @@
 
 2 - For the purposes of checking legality rules, it is necessary to determine
 whether a stream-oriented attribute has been specified for a limited type
-(13.13.2(36)). This is done by applying the normal visibility rules to the
-attribute_definition_clause.
+(13.13.2(9/1) and 13.13.2(36/1)). This is done by applying the normal
+visibility rules to the attribute_definition_clause.
 
 3 - For a limited tagged type T, if Read is available then T'Input is
 available, even if it is not specified. Similarly, if Write is available then
 T'Output is available. T'Class'Read, T'Class'Write, T'Class'Input and
-T'Class'Output are not available unless they are specified.
+T'Class'Output are available only if they are specified or the corresponding
+specific attribute is available everywhere within the immediate
+scope of T.
 
 4 - In the profiles of the stream-oriented attributes, the notation
 "italicized T" refers to the base subtype for a scalar type, and to the first
@@ -73,8 +79,8 @@
 are at a point that doesn't have visibility over that private part, is a
 reference to the attribute legal? (No.)
 
-3 - Let T be a limited type with an attribute_definition_clause for attribute
-Read. Is a usage of T'Class'Read legal? (Yes.)
+3 - Let T be a limited type with a visible attribute_definition_clause for
+attribute Read. Is a usage of T'Class'Read legal? (Yes.)
 
 4 - The definition of the profiles of S'Read, S'Write, S'Input
 and S'Output given in 13.13.2 uses the notation "italicized T" for the
@@ -217,18 +223,21 @@
 come to the declaration of NNT, we want to ensure that NNT is not callable,
 because we have no mechanism for reading the component C. Instead of depending
 on whether the attribute has been specified for some ancestor type,
-13.13.2(36/1) must depend on whether the attribute is available for the parent
-type (and for the types of the extension components).
+13.13.2(9/1 and 36/1) must depend on whether the attribute is available for the
+parent type (and for the types of the extension components).
 
-Moreover, dispatching to the Read attribute does not work: there is no
-guarantee that all the types derived from T will have an available Read
-attribute. So the attribute Read is not available for T'Class.
+Moreover, dispatching to the Read attribute does not work in the above case:
+there is no guarantee that all the types derived from T will have an available
+Read attribute. So the attribute Read is not available for T'Class. The only
+case where NT'Read is guaranteed to be available for every NT descended from
+T is if T'Read is available in the visible part of P. In this case,
+T'Class'Read is available everywhere.
 
 The default implementation of T'Input is defined in terms of T'Read. If T'Read
 is available, then the implementation of T'Input is well-defined as well, and
 there is no reason to prohibit calls. A similar argument applies to T'Output
-when T'Write is available. But T'Class'Input and T'Class'Output are both
-unavailable.
+when T'Write is available. But T'Class'Input and T'Class'Output are only
+available if T'Read and T'Write are available in the visible part of P.
 
 The above model is unfortunately not what is stated by the rules in
 13.13.2(36/1). These rules seem to imply that a reference to Input (resp.
@@ -239,10 +248,6 @@
 is legal for the type extension if Read (resp. Write) is available for that
 type.
 
-Given that the class-wide stream attributes cannot be available for limited
-tagged types, the last sentence of 13.13.2(9/1) becomes useless, and might
-as well be removed.
-
 
 4 - AI95-00145 specifies the meaning of the notation "italicized T" for
 operators as follows:
@@ -360,16 +365,6 @@
 consecutive calls to Write into a single one, provided these calls all
 pertain to a single top-level call to the attribute Write (or Output).
 
-!corrigendum 13.13.2(1/1)
-
-@dinsa
-The operational attributes Write, Read, Output, and Input convert values to a
-stream of elements and reconstruct values from a stream.
-@dinst
-The subtype of the Item parameter of the stream-oriented attributes is the base
-subtype of @i<T> if @i<T> is a scalar type, and the first subtype otherwise.
-The same rule applies to the result of the Input attribute.
-
 !corrigendum 13.13.2(9/1)
 
 @drepl
@@ -396,6 +391,12 @@
 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 of @i<T>
+is available anywhere within the immediate scope of @i<T>, and the attribute
+of the type of any of the extension components which are of a limited type,
+@i<L>, is not available everywhere within the part of the immediate scope of
+@i<L> where @i<L> is frozen, then the attribute of @i<T> shall be directly
+specified.
 
 !corrigendum 13.13.2(27)
 
@@ -407,7 +408,7 @@
 S'Output then calls S'Write to write the value of Item to the stream. S'Input
 then creates an object (with the bounds or discriminants, if any, taken from
 the stream), initializes it with S'Read, and returns the value of the object.
-The normal initialization and finalization take place for this object (see
+Normal initialization and finalization take place for this object (see
 3.3.1, 7.6, 7.6.1).
 
 !corrigendum 13.13.2(35)
@@ -468,8 +469,8 @@
 is nonlimited.>
 @xbullet<The attribute_designator is Input, and @i<T> is nonlimited
 and not abstract.>
-@xbullet<The attribute_designator is Read (resp. Write), and @i<T> is
-a limited type extension, and the attribute Read (resp Write) is
+@xbullet<The attribute_designator is Read (resp. Write) and @i<T> is
+a limited type extension, and the attribute Read (resp. Write) is
 available for the parent type of @i<T> and for the types of all of the
 extension components.>
 @xbullet<The attribute_designator is Input (resp. Output), and @i<T> is
@@ -481,12 +482,20 @@
 A stream-oriented attribute for a subtype of a class-wide type T'Class is
 available at places where one of the following conditions is true:
 @xbullet<@i<T> is nonlimited.>
+@xbullet<The attribute is available everywhere within the part of the immediate
+scope of @i<T> where @i<T> is frozen.>
 @xbullet<The attribute has been specified via an
 @fa<attribute_definition_clause>, and the @fa<attribute_definition_clause>
 is visible.>
 
-An @fa<attribute_reference> for one of the stream attributes is illegal
-unless the attribute is available at the place of the @fa<attribute_reference>.
+An @fa<attribute_reference> for one of the stream-oriented attributes is
+illegal unless the attribute is available at the place of the
+@fa<attribute_reference>.
+
+In the @fa<parameter_and_result_profile>s for the stream-oriented attributes,
+the subtype of the Item parameter is the base subtype of @i<T> if @i<T> is a
+scalar type, and the first subtype otherwise. The same rule applies to the
+result of the Input attribute.
 
 For an @fa<attribute_definition_clause> specifying one of these attributes,
 the subtype of the Item parameter shall be the base subtype if scalar, and

Questions? Ask the ACAA Technical Agent