CVS difference for ai12s/ai12-0164-1.txt

Differences between 1.4 and version 1.5
Log of other versions for file ai12s/ai12-0164-1.txt

--- ai12s/ai12-0164-1.txt	2015/11/18 01:23:01	1.4
+++ ai12s/ai12-0164-1.txt	2015/11/24 03:26:50	1.5
@@ -1,4 +1,4 @@
-!standard D.4(16)                                  15-10-13  AI12-0164-1/02
+!standard D.4(16)                                  15-10-17  AI12-0164-1/03
 !class Amendment 15-06-04
 !status work item 15-06-04
 !status received 15-04-24
@@ -20,10 +20,10 @@
 Max_Entry_Queue_Length for a entry declaration specifies the maximum
 number of callers allowed on that entry. Violation of this restriction results
 in the raising of Program_Error at the point of the call or requeue.
-A check is made that the expression specified in the Max_Entry_Queue_Length
+The value specified for the Max_Entry_Queue_Length
 aspect for an entry is no higher than any specified for the corresponding type,
 and both are no higher than the Max_Entry_Queue_Length partition-wide
-restriction. If either check fails, Program_Error is raised.
+restriction.
 
 !wording
 
@@ -43,66 +43,70 @@
 
 The type of aspect Max_Entry_Queue_Length is Integer. 
 
-If directly specified, the aspect_definition shall be a static expression. If
-not specified, the aspect has value Integer'Last (representing an unbounded
-queue).
+If directly specified, the aspect_definition shall be a static expression. If 
+not specified, the aspect has value -1 (representing an unspecified queue
+length). 
 
 For an entry_declaration, the following language-defined representation aspect
 may be specified:
 
 The type of aspect Max_Entry_Queue_Length is Integer. 
 
-If directly specified, the aspect_definition shall be a static expression. If
-not specified, the aspect has value Integer'Last (representing an unbounded
-queue).
+If directly specified, the aspect_definition shall be a static expression. If 
+not specified, the aspect has value -1 (representing an unspecified queue
+length). 
 
 Legality Rules
 
-If a restriction Max_Entry_Queue_Length applies to the partition, the value of
-an aspect Max_Entry_Queue_Length (for a type or individual entry) shall be
-either Integer'Last or less than or equal to the value of the restriction.
-
-[13.12 says that the restriction value has to be static, so this is a Legality
-check - Editor.]
-
-If aspect Max_Entry_Queue_Length for a type has a value other than Integer'Last,
-aspect Max_Entry_Queue_Length for an individual entry shall be either
-Integer'Last or less than or equal to the value of the aspect for the type.
+If aspect Max_Entry_Queue_Length for a type has a nonconfirming value, 
+aspect Max_Entry_Queue_Length for an individual entry of that type shall be
+less than or equal to the value of the aspect for the type. 
 
 AARM Ramification: Aspect Max_Entry_Queue_Length can specify less than the
 partition-wide or type-wide default, but it can't expand the length of a queue.
 
+Post-Compilation Rules
+
+If a restriction Max_Entry_Queue_Length applies to the partition, a
+nonconfirming value of an aspect Max_Entry_Queue_Length (for a type or
+individual entry) shall be less than or equal to the value of the
+restriction.  
+
+AARM Ramification: 13.12(6) says that the restriction value has to be static,
+so this is statically checkable. But the restriction does not have to be in the
+same compilation as the aspect, so the check cannot, in general, be done
+until link time.
+
 Dynamic Semantics
 
-If an entry call or requeue would cause the queue for any entry of a type to
-become longer than the value specified for Max_Entry_Queue_Length for the type,
-then Program_Error is raised at the point of the call or requeue.
+If a nonconfirming value is specified for Max_Entry_Queue_Length for a type, and
+an entry call or requeue would cause the queue for any entry of a type to 
+become longer than the specified value, then Program_Error is raised at the
+point of the call or requeue. 
 
 [Editor's note: I tried to borrow the wording of D.7(19.1/2), but it is worded
 in terms of "violation of this restriction", which doesn't work for an aspect.
 I'm not excited about "would cause", but I can't find better wording. And this
 isn't my AI anyway, I'm just trying to help out Alan. :-)]
 
-If an entry call or requeue would cause the queue for an entry to become longer
-than the value specified for Max_Entry_Queue_Length for the entry,
-then Program_Error is raised at the point of the call or requeue.
+If a nonconfirming value is specified for Max_Entry_Queue_Length for an entry,
+and an entry call or requeue would cause the queue for an entry to become longer 
+than the specified value, then Program_Error is raised at the point of the call
+or requeue. 
 
 !discussion
 
-Aspect should apply to all entries not just protected ones.
+We originally considered just having this aspect apply to protected entries,
+but there seems to be no reason to make such a limitation.
 
-Seems only reasonable to have an aspect for a specific entry or for the object's
-type. Aspects should only be able to tighten any more global restriction.
+Aspects should only be able to tighten any more global restriction. It would be
+a problem for analysis if the entire source code of the program had to be
+inspected to see if there is any extension of the global restriction. We note
+that the name of the restriction is also Max_Entry_Queue_Length which implies
+that it is the maximum length; it's not named Default_Entry_Queue_Length.
 
 It did not seem useful to have an attribute that can be used to query the aspect;
 use of such an attribute could lead to race conditions.
-
-As implementations are allowed (and encouraged) to use a single queue for each
-object (all entries of a PO are serviced together), having different lengths for
-the queue complicates (rather than simplifies) the implementation. Thus it's
-unclear if allowing specification for individual entries is a good idea. A
-limit for an individual entry might be more appropriately given as a
-precondition or assertion (using 'Count).
 
 !ASIS
 

Questions? Ask the ACAA Technical Agent