CVS difference for ais/ai-00252.txt

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

--- ais/ai-00252.txt	2003/09/27 23:07:03	1.7
+++ ais/ai-00252.txt	2003/10/29 00:41:41	1.8
@@ -1,5 +1,9 @@
-!standard 04.01.03 (05)                               03-09-27  AI95-00252/05
+!standard 04.01.03 (09)                               03-10-23  AI95-00252/06
+!standard 04.01.03 (15)
+!standard 06.03.01 (10)
 !class amendment 00-12-04
+!status Amendment 200Y 03-10-23
+!status ARG Approved 9-0-1  03-10-04
 !status work item 00-12-04
 !status received 00-12-04
 !priority High
@@ -88,25 +92,25 @@
 
 Add the following after paragraph 4.1.3(9):
 
-  * A subprogram whose first formal parameter is of a tagged type
+  * A view of a subprogram whose first formal parameter is of a tagged type
     or is an access parameter designating a tagged type.
 
     The prefix (after any implicit dereference) shall resolve to denote an
     object or value of a specific tagged type T or class-wide type T'Class. The
-    selector_name shall resolve to denote a subprogram declared immediately
-    within the region in which an ancestor of the type T is declared. The first
-    formal parameter of the subprogram shall be of type T, or a class-wide type
-    that covers T, or an access parameter designating one of these types. The
-    designator of the subprogram shall not be the same as that of a component
-    of the tagged type visible at the point of the selected_component. The
-    selected_component denotes a view of this subprogram that omits the first
-    formal parameter, and has convention Intrinsic.
+    selector_name shall resolve to denote a view of a subprogram declared
+    immediately within the region in which an ancestor of the type T is
+    declared. The first formal parameter of the subprogram shall be of type T,
+    or a class-wide type that covers T, or an access parameter designating one
+    of these types. The designator of the subprogram shall not be the same as
+    that of a component of the tagged type visible at the point of the
+    selected_component. The selected_component denotes a view of this
+    subprogram that omits the first formal paramete.
 
 Add the following after para 4.1.3(15) of dynamic semantics:
 
     For a selected_component with a tagged prefix and selector that denotes a
-    subprogram, a call on the view denoted by the selected_component is
-    equivalent to a call on the underlying subprogram with the first actual
+    view of a subprogram, a call on the view denoted by the selected_component
+    is equivalent to a call on the underlying subprogram with the first actual
     parameter being provided by the object or value denoted by the prefix (or
     the Access attribute of this object or value if the first formal is an
     access parameter), and the remaining actual parameters given by the
@@ -118,9 +122,6 @@
     denotes an object or value of a tagged type, and whose selector_name
     denotes a subprogram operating on the type (see 4.1.3).
 
-  [NOTE: This paragraph is officially redundant with 4.1.3(9) and so
-   could be in brackets in the AARM.]
-
 !discussion
 
 This AI grew out of an issue identified by Erhard Ploedereder and his graduate
@@ -141,10 +142,9 @@
 used to effectively provide a "read only" component, with the familiar "."
 syntax. Also, using the "." notation allows primitives defined outside a
 protected or a task type to be called in the same "obj.operation" notation
-used for entries and protected subprograms. This unifies these two kinds of
-operations, which from a user perspective are both "fundamental" operations
-of the synchronizing types. [However, this unification is now irrelevant
-since the proposal is restricted to tagged types.]
+used for entries and protected subprograms. This allows tagged primitive
+operations to be called with the same style, potentially making programs more
+consistent.
 
 We considered only making primitive operations visible, but there are
 situations where an abstraction uses a classwide operation very much like a
@@ -157,6 +157,15 @@
 any guess of implementation burden is hard to make, since compilers have so
 many different strategies.
 
+When using this notation, class-wide operations can be used which are declared
+in any package which declares an ancestor of the type of the object. We
+considered only allowing class-wide operations declared in the same package
+as the specific type of the object. However, this would mean that a different
+set of operations would be visible for the calls Op (Obj, ...) and Obj.Op(...)
+when all of the ancestor packages have use clauses (a common situation). That
+means that changing from one form of the call to the other could potentially
+change the operation called.
+
 Adding the implicit .all and "'Access" seem like
 useful capabilities, without significantly complicating the proposal.
 
@@ -239,8 +248,59 @@
 
 end AccMain;
 
+!corrigendum 4.1.3(9)
+
+@dinsa
+@xbullet<The @fa<prefix> shall resolve to denote an object or value of some
+task or protected type (after any implicit dereference). The @fa<selector_name>
+shall resolve to denote an @fa<entry_declaration> or
+@fa<subprogram_declaration> occurring (implicitly or explicitly) within the
+visible part of that type. The @fa<selected_component> denotes the
+corresponding entry, entry family, or protected subprogram.>
+@dinst
+@xbullet<A view of a subprogram whose first formal parameter is of a tagged
+type or is an access parameter designating a tagged type.
+
+The @fa<prefix> (after any implicit dereference) shall resolve to denote an
+object or value of a specific tagged type @i<T> or class-wide type @i<T>'Class.
+The @fa<selector_name> shall resolve to denote a view of a subprogram declared
+immediately within the region in which an ancestor of the type @i<T> is
+declared. The first formal parameter of the subprogram shall be of type @i<T>,
+or a class-wide type that covers @i<T>, or an access parameter designating one
+of these types. The designator of the subprogram shall not be the same as
+that of a component of the tagged type visible at the point of the
+@fa<selected_component>. The @fa<selected_component> denotes a view of this
+subprogram that omits the first formal paramete.>
+
+!corrigendum 4.1.3(15)
+
+@dinsa
+For a @fa<selected_component> that denotes a component of a @fa<variant>, a
+check is made that the values of the discriminants are such that the value or
+object denoted by the @fa<prefix> has this component. The exception
+Constraint_Error is raised if this check fails.
+@dinst
+For a @fa<selected_component> with a tagged prefix and selector that denotes a
+view of a subprogram, a call on the view denoted by the selected_component
+is equivalent to a call on the underlying subprogram with the first actual
+parameter being provided by the object or value denoted by the prefix (or
+the Access attribute of this object or value if the first formal is an
+access parameter), and the remaining actual parameters given by the
+@fa<actual_parameter_part>, if any.
+
+!corrigendum 6.3.1(10)
+
+@drepl
+@xbullet<a subprogram declared immediately within a @fa<protected_body>.>
+@dby
+@xbullet<a subprogram declared immediately within a @fa<protected_body>;>
+@xbullet<the view of a subprogram denoted by a selected_component whose prefix
+denotes an object or value of a tagged type, and whose selector_name
+denotes a subprogram operating on the type (see 4.1.3).>
+
 !ACATS test
 
+Create ACATS tests for this notation.
 
 !appendix
 

Questions? Ask the ACAA Technical Agent