CVS difference for ais/ai-00407.txt

Differences between 1.6 and version 1.7
Log of other versions for file ais/ai-00407.txt

--- ais/ai-00407.txt	2005/06/16 23:47:40	1.6
+++ ais/ai-00407.txt	2005/10/31 05:18:42	1.7
@@ -185,4 +185,124 @@
 
 !appendix
 
+From: Pascal Leroy
+Sent: Saturday, February 12, 2005  3:03 PM
+
+Attached is my update of AI 407 following today's discussion.
+
+[This is version /03 of the AI - ED]
+
 *************************************************************
+
+From: Bob Duff
+Sent: Saturday, February 12, 2005  4:28 PM
+
+...
+> The description of the Obj.Op notation in 4.1.3 is quite confused
+
+What a tangled web we weave, when first we practise to deceive
+people into thinking Ada is C++ or Java.  ;-)
+
+> !proposal
+>
+> We introduce *prefixed view* to denote the view of a subprogram denoted by the
+> Obj.Op notation and use this technical term when appropriate.
+>
+> We add a rule to disallow use of a prefixed view if the prefix is constant and
+> the first parameter is of mode *out*, *in out*, or of an access-to-variable
+> type.  This rule should be a legality rule, not a name resolution rule, for
+> consistency with what we do for normal calls.
+
+See below about the acc-to-var case.
+
+> Wording in added in 6.4(10) to explain the dynamic semantics of calls to
+> prefixed views, including calls that go through renamings.
+>
+> !wording
+>
+> Change the last sentence of 4.1.3(9.2/2) to read:
+
+The "/2" notation refers to the Ada 2005 version of the RM, right?  So
+it seems confusing to write an AI that refers to "/2" paragraphs, since
+they're going to change without getting a new version number.  It seems
+like AIs ought to refer to other AIs, or to words in the "/1" version of
+the RM.
+
+In other words, if somebody looks at this AI after it has been
+incorporated into the RM, will it still make sense, given that
+it refers to words that have disappeared from the face of the Earth?
+
+> The selected_component denotes a view of this subprogram that omits the first
+> formal parameter.  This view is called a *prefixed view* of the subprogram, and
+> the prefix of the selected_component (after any implicit dereference) is called
+> the prefix of the prefixed view.
+>
+> Change 4.1.3(13.1/2) to read:
+>
+> For a subprogram whose first parameter is an access parameter, the prefix of any
+> prefixed view shall denote an aliased view of an object.
+
+Is that correct?
+
+    procedure P(X: access Integer);
+    type A is access all Integer;
+    Y: constant A := ...;
+    Y.P; -- legal?
+
+Is Y.P legal?  Is there an implicit dereference here?
+If not, then Y is the prefix, and it's not aliased.
+
+> Add after 4.1.3(13.1/2):
+>
+> For a subprogram whose first parameter is of mode *in out* or *out*, or of an
+> anonymous access-to-variable type, the prefix of any prefixed view shall denote
+> a variable.
+
+Same question here.  Y is constant, but that's OK.
+
+Maybe I'm confused...
+
+*************************************************************
+
+From: Tucker Taft
+Sent: Sunday, February 13, 2005  2:30 AM
+
+...
+> In other words, if somebody looks at this AI after it has been
+> incorporated into the RM, will it still make sense, given that
+> it refers to words that have disappeared from the face of the Earth?
+
+Good point.  Unfortunately, these AIs are referring
+to the RM under review, and it would be inefficient
+to refer to the original RM wording.  We will somehow
+need to preserve the state of the RM that the AI is
+based on.
+
+...
+> Is that correct?
+>
+>     procedure P(X: access Integer);
+>     type A is access all Integer;
+>     Y: constant A := ...;
+>     Y.P; -- legal?
+>
+> Is Y.P legal?  Is there an implicit dereference here?
+
+An implicit dereference always occurs when you use
+a prefix that is an access value, and then we turn
+around and add the "'Access" back in if the first
+parameter is an access parameter.
+
+> If not, then Y is the prefix, and it's not aliased.
+
+"Y.all" is the prefix (semantically).
+
+...
+> Same question here.  Y is constant, but that's OK.
+>
+> Maybe I'm confused...
+
+You're confused.  See the definition of "prefix".
+
+****************************************************************
+

Questions? Ask the ACAA Technical Agent