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

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

--- ai12s/ai12-0164-1.txt	2015/10/09 00:12:24	1.2
+++ ai12s/ai12-0164-1.txt	2015/10/13 22:40:19	1.3
@@ -1,15 +1,13 @@
-!standard 5.5.2(2/3)                                  15-09-14  AI05-0164-1/01
-!standard 5.5.2(5/4)
-!standard 5.5.2(7/3)
+!standard D.4(16)                                  15-10-13  AI05-0164-1/02
 !class Amendment 15-06-04
 !status work item 15-06-04
 !status received 15-04-24
 !priority Low
 !difficulty Easy
-!subject Max Queue Length aspect for entries
+!subject Max_Entry_Queue_Length aspect for entries
 !summary
 
-* TBD
+Aspect Max_Entry_Queue_Length is introduced.
 
 !problem
 
@@ -29,20 +27,68 @@
 
 !wording
 
-** TBD.
+[Editor's note: I believe this is intended to be an Annex D capability, so I
+put it there. I put it under D.4 as that's the closest match for it, but
+perhaps it should have its own clause somewhere??]
 
-!discussion
+Add after D.4(16):
+
+Static Semantics
+
+For a task type (including the anonymous type of a single_task_declaration) or
+protected type (including the anonymous type of a single_protected_declaration),
+the following language-defined representation aspect may be specified:
+
+Max_Entry_Queue_Length
+
+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).
+
+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).
+
+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.]
 
-It has been suggested that such a queue length should be global to a protected
-type, not an individual entry. Since 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 would just complicate
-(rather than simplify) the implementation. One would hope that a super-Ravenscar
-would still allow simplifying the runtime.
+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 a limit for an individual entry is needed, that seems more appropriate for a
-precondition or assertion.
+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.
 
+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.
+
+[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.
+
+!discussion
+
 Aspect should apply to all entries not just protected ones.
 
 Seems only reasonable to have an aspect for a specific entry or for the object's
@@ -51,6 +97,13 @@
 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
 
 ?? How are aspects handled??
@@ -147,6 +200,17 @@
 
 By the way, there's always a worst-case bound on queue length: the number of
 tasks (which in many real-time systems is a statically-known number).
+
+****************************************************************
+
+From: Alan Burns
+Sent: Monday, September 14, 2015  5:01 AM
+
+I had some edits to do on AI-0164 (Max Queue Length for entries). I enclose an
+updated AI [this is version /01 of the AI] - BUT I have not done the !wording
+- I am not sufficiently familiar with aspects to get this right, so rather
+than get it wrong can I leave it to the meeting to actually do this - I am
+sure it is straightforward if you know what you are doing!!
 
 ****************************************************************
 

Questions? Ask the ACAA Technical Agent