CVS difference for ais/ai-00195.txt

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

--- ais/ai-00195.txt	2001/05/26 02:55:11	1.15
+++ ais/ai-00195.txt	2001/09/08 01:42:47	1.16
@@ -709,3 +709,75 @@
 
 ****************************************************************
 
+From: Pascal Leory
+Sent: Friday, August  3, 2001 3:47 AM
+
+I am looking at the rules for streaming of limited types in TC1 (specifically in
+DR 0040), and it seems to me that they are not quite correct.  (We never seem to
+get streams right, no matter how hard or how often we try.)
+
+In 13.13.2(9/1), a section pertaining to Read and Write, we have:
+
+"For a limited type extension, if the attribute of any ancestor type of 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 T shall be directly specified."
+
+In 13.13.2(36/1), a section pertaining to all stream attributes:
+
+"An attribute_reference for one of these attributes is illegal if the type is
+limited, unless the attribute has been specified by an
+attribute_definition_clause or [(for a type extension)] the attribute has been
+specified for an ancestor type."
+
+I understand that for Read and Write, these rules ensure that the attribute is
+either (1) not callable or (2) complete in the sense that it deals with all the
+components, including the limited ones.  However, the rules don't seem to work
+well for Input and Output.
+
+Consider the following example:
+
+    type T1 is tagged limited record ... end record;
+    for T1'Output use ... -- Note: no user-defined T1'Write
+
+    protected type P is ... end P;
+
+    type T2 is new T1 with
+        record
+            C : P;
+        end record;
+
+    T2'Output (...); -- Legal?
+
+13.13.2(36/1) seems to say that the reference to T2'Output is legal because
+T1'Output was specified.  13.13.2(9/1) is not applicable because the attribute
+in question is not Read or Write, so apparently the type extension is legal.
+
+One is left wondering what T2'Output does at execution.  Its default
+implementation is supposed to write the discriminants and then call T2'Write and
+P'Write.  But in this instance there is no T2'Write and no P'Write, so we have a
+problem.  At any rate, the existence of T1'Output is totally irrelevant, since
+T2'Output is never defined in terms of T1'Output.
+
+It seems that 13.13.2(36/1) needs revision.  For Input and Output, a reference
+should be legal iff Read or Write, resp., have been specified for some ancestor.
+
+****************************************************************
+
+From: Randy Brukardt
+Sent: Thursday, August 16, 2001 4:09 PM
+
+Tucker had proposed such a rule only a few days before the Potsdam meeting to
+finalize the Corrigendum. I made an executive decision to postpone that (lest we
+introduce still more errors), in part because I was not aware of a technical
+problem with the proposed rules. (Tuck's proposal was to increase consistency,
+not to fix a bug.)
+
+Anyway, I put this proposal as question 3 in the giant stream AI-195. So I think
+we can handle the correction there. Conveniently, Pascal is the author of that
+AI (now that the stream size stuff is out of it, we might even be able to finish
+it). So I recommend that he add this problem to the AI, then put it on the
+agenda for the meeting. (How's that for passing the buck? :-)
+
+****************************************************************
+

Questions? Ask the ACAA Technical Agent