CVS difference for ai05s/ai05-0291-1.txt

Differences between 1.3 and version 1.4
Log of other versions for file ai05s/ai05-0291-1.txt

--- ai05s/ai05-0291-1.txt	2012/03/16 06:16:10	1.3
+++ ai05s/ai05-0291-1.txt	2012/03/16 08:11:19	1.4
@@ -1,11 +1,14 @@
-!standard  9.4(11.9/2)                              12-02-25    AI05-0291-1/02
+!standard  9.4(11.9/2)                              12-03-15    AI05-0291-1/03
 !standard  9.5(2)
 !standard  9.5(3)
 !standard  9.5(4)
+!standard  9.5(5)
 !standard  9.5(6)
 !standard  9.5(7.1/2)
+!standard  9.7.2(3.3/2)
 !class binding interpretation 12-02-15
 !status Amendment 2012 12-02-15
+!status ARG Approved 7-0-3  12-02-26
 !status work item 12-02-15
 !status received 12-02-01
 !priority Low
@@ -45,7 +48,7 @@
 an access-to-variable parameter.
 
 [Note: anonymous access parameters are considered of mode *in*, so we have
-disallow access-to-variable rather than allow access-to-constant.]
+to disallow access-to-variable rather than allow access-to-constant.]
 
 Replace 9.5(2/3) with:
 
@@ -54,7 +57,7 @@
   first parameter is a controlling parameter, the name or prefix
   determines a *target object*, as follows:
 
-   AARM To Be Honest: Thie wording above uses "denotes" to mean "denotes a view
+   AARM To Be Honest: This wording above uses "denotes" to mean "denotes a view
    of an entity" (when the term is used in Legality Rules), and
    "denotes an entity" (when the term is used in Dynamic Semantics rules).
    It does not mean "view of a declaration", as that would not include
@@ -63,7 +66,7 @@
 
    [Note: We use "limited" rather than "synchronized" here, so this wording
    identifies a target object for all possible entry and protected calls.
-   Else we have a wording hole. Requeue, timed_entry calls, and
+   Else we have a wording hole. Requeues, timed_entry_calls, and
    conditional_entry_calls all have legality rules to prevent allowing too
    much.]
    
@@ -110,17 +113,23 @@
 variable, unless the prefix is for an attribute_reference to the Count
 attribute (see 9.9).
 
+AARM Ramification: This rule does not apply to calls that are not to a
+prefixed view. Specifically a "normal" call to a primitive operation
+of a limited interface is not covered by this rule. In that case, the
+normal parameter passing mode checks will prevent passing a constant
+protected object.
+
 Delete 9.7.2(3.3/2) [This rule and its AARM note are now given above.]
 
 !discussion
 
-Note that 9.5.4(7.1-9) talk about target tasks and target protected objects.
-These are fine, even for requeues on synchronized interfaces, as these are
-Dynamic Semantic rules. For these, only the underlying entity matters (no
-views are taken into account), and the underlying target object has to be a
-task or protected object - no other sort of concrete object is possible for
-an entry. The fact that the object also has a synchronized interface is
-irrelevant for this use.
+Note that paragraphs 9.5.4(7.1-9) talk about target tasks and target
+protected objects. These are fine, even for requeues on synchronized interfaces,
+as these are Dynamic Semantic rules. For these, only the underlying entity
+matters (no views are taken into account), and the underlying target object
+has to be a task or protected object - no other sort of concrete object is
+possible for an entry. The fact that the object also has a synchronized
+interface is irrelevant for this use.
 
 
 Note that this wording also is needed to define that calls on primitives
@@ -133,20 +142,19 @@
 entry calls, so it is removed.
 
 
-We have to clarify the meaning of "denotes" in the "Target Object" wording.
+The meaning of "denotes" in the "Target Object" wording is confusing.
 This is Static Semantics, and it is used in Legality Rules, so by usual
 definition, "denotes" here means "denotes a view of a declaration". (Views
 matter to Legality Rules.) But in this case, we're interested in the "entity"
 (especially as the Legality Rules mainly refer to the syntactic form of the
 Target Object, not the semantic details); in particular, we need to look through
-renames here. [But I wasn't able to do this, and punted in favor of a TBH.
-The meaning is slightly different when this is used in Legality Rules vs.
-when it is used in Dynamic Semantics.]
+renames here. While it would have been preferable to clarify the wording, that
+didn't seem possible. So a To Be Honest AARM note was added instead.
 
 The Standard is often sloppy about this (one of the worst instances is
 8.6(17/3), which manages to use "denotes" as implicitly denoting a declaration
-AND an entity in the same sentence)! But we're not trying to fix all such cases
-here, just the one we're working on.
+AND an entity in the same sentence)! But we're not going to try to fix this
+Standard in this area, it is just too hard.
 
 
 We simplified the Legality Rule that uses target object in 9.5(7.1/3). This rule
@@ -162,9 +170,13 @@
 of the name of an entity, with no prefixed view), the call is a "normal" call,
 and "denotes the entity" does the right thing (so long as it is only used in Dynamic
 Semantics rules, as is true currently). The same holds for formal subprograms.
+
 
-[Randy: Humm. We don't have a bullet like 9.5(6) for formal subprograms. Should we not
-have one??]
+We now require primitive functions that are implemented by protected functions to
+have an *in* parameter (or access-to-constant parameter). This is essentially the
+same rule that we have for protected procedures, in reverse. However, this causes
+a small incompatibility: "access T" is no longer allowed as the type of such a
+parameter. The parameter needs to be declared as "access constant T".
 
 !corrigendum 9.4(11.9/2)
 
@@ -189,19 +201,24 @@
 is considered an implicit parameter to the operation, and is determined
 by the operation @fa<name> (or @fa<prefix>) used in the call on the operation,
 as follows:
+@dby
+When a @fa<name> or @fa<prefix> denotes an entry, protected subprogram, or a
+prefixed view of a primitive subprogram of a limited interface whose
+first parameter is a controlling parameter, the @fa<name> or @fa<prefix>
+determines a @i<target object>, as follows:
+
+!corrigendum 9.5(3)
+
+@drepl
+@xbullet<If it is a @fa<direct_name> or expanded name that denotes the declaration
+(or body) of the operation, then the target object is implicitly specified to be the
+current instance of the task or protected unit immediately enclosing the operation;
+such a call is defined to be an @i<internal call>;>
 @dby
-Any @fa<name> that denotes an entry or a protected subprogram identifies a
-@i<target object>, which is either a task (for an entry) or a protected
-object (for an entry or a protected subprogram). The target object
-identified by the operation @fa<name> (or @fa<prefix>) used in a call on an
-entry or a protected subprogram is considered an implicit parameter to the call.
-In addition, a primitive subprogram of a limited interface
-can be implemented by an entry or a protected subprogram, and a @fa<name>
-denoting such a subprogram also identifies a target object.
-
-When the name denotes an entry, protected subprogram, or a prefixed
-view of a primitive subprogram of a limited interface whose first parameter
-is a controlling parameter, the target object is determined as follows:
+@xbullet<If it is a @fa<direct_name> or expanded name that denotes the declaration
+(or body) of the operation, then the target object is implicitly specified to be the
+current instance of the task or protected unit immediately enclosing the operation;
+a call using such a name is defined to be an @i<internal call>;>
 
 !corrigendum 9.5(4)
 
@@ -213,7 +230,21 @@
 @dby
 @xbullet<If it is a @fa<selected_component> that is not an expanded name, then
 the target object is explicitly specified to be the object denoted by the
-@fa<prefix> of the @fa<name>; such a call is defined to be an @i<external call>;>
+@fa<prefix> of the @fa<name>; a call using such a name is defined to be
+an @i<external call>;>
+
+!corrigendum 9.5(5)
+
+@drepl
+@xbullet<If the @fa<name> or @fa<prefix> is a dereference (implicit or explicit)
+of an access-to-protected-subprogram value, then the target object is determined by
+the @fa<prefix> of the Access @fa<attribute_reference> that produced the access value
+originally, and the call is defined to be an @i<external call>;>
+@dby
+@xbullet<If the @fa<name> or @fa<prefix> is a dereference (implicit or explicit)
+of an access-to-protected-subprogram value, then the target object is determined by
+the @fa<prefix> of the Access @fa<attribute_reference> that produced the access value
+originally; a call using such a name is defined to be an @i<external call>;>
 
 !corrigendum 9.5(6)
 
@@ -222,14 +253,23 @@
 @fa<subprogram_renaming_declaration>, then the target object is as determined
 by the @fa<name> of the renamed entity.>
 @dinst
-Any call that might be on an entry or protected subprogram and that is
-not included above is an @i<external call>. For a call other than via a prefixed
-view on a primitive subprogram of a limited interface whose first parameter is a
-controlling parameter, the first parameter of the call is the target object of
-the call. For a call on a subprogram rename, the @fa<name> of the renamed item
-and possibly the first parameter determine the target object of the call. For a
-call on a generic formal subprogram, the @fa<name> of the actual callable entity
-and possibly the first parameter determine the target object of the call.
+A call on an entry or a protected subprogram either uses a @fa<name> or
+@fa<prefix> that determines a target object implicitly, as above, or is a
+call on (a non-prefixed view of) a primitive subprogram of a limited
+interface whose first parameter is a controlling parameter, in which
+case the target object is identified explicitly by the first parameter.
+This latter case is an @i<external call>.
+
+!corrigendum 9.5(7.1/2)
+
+@drepl
+The view of the target protected object associated with a call of a
+protected procedure or entry shall be a variable.
+@dby
+If a @fa<name> or @fa<prefix> determines a target object, and the name denotes a
+protected entry or procedure, then the target object shall be a
+variable, unless the @fa<prefix> is for an @fa<attribute_reference> to the Count
+attribute (see 9.9).
 
 !corrigendum 9.7.2(3.3/2)
 

Questions? Ask the ACAA Technical Agent