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

Differences between 1.13 and version 1.14
Log of other versions for file ai12s/ai12-0127-1.txt

--- ai12s/ai12-0127-1.txt	2017/10/12 04:36:34	1.13
+++ ai12s/ai12-0127-1.txt	2017/11/22 03:49:57	1.14
@@ -1,4 +1,4 @@
-!standard 4.3(2)                                    17-10-11    AI12-0127-1/07
+!standard 4.3(2)                                    17-10-13    AI12-0127-1/08
 !standard 4.3(4)
 !standard 4.3.3(3)
 !standard 4.3.4(0)
@@ -80,22 +80,17 @@
   A record aggregate or extension aggregate shall not be of a class-wide
   type.
 
-[Author's note: We re-factor the definition of named_array_aggregate so we
-can re-use it later.]
-
 Add after 4.3.1(9):
 
   Each selector_name in a record_component_association of a
-  record_delta_aggregate shall denote a non-discriminant component of
+  record_delta_aggregate shall denote a nondiscriminant component of
   the record type.
 
 [Editor's note: We don't use "needed" here so that there is no completeness
 requirement in a delta aggregate. But that means the 2nd half of the first
-sentence of 4.3.1(16) doesn't apply; and that means that there is a rule
-missing that prevents the same component from being given twice, or
-components being given for the wrong variant (and in particular, different
-variants). This was my concern in Pittsburgh - I assumed that Steve would
-immediately see that but of course he only sees unlikely stuff. ;-)]
+sentence of 4.3.1(16) doesn't apply; we have to specifically have Legality
+Rules to prevent giving the same component twice ("distinct" below) and 
+giving components from two variants.]
 
 Replace 4.3.3(3):
   named_array_aggregate ::=
@@ -146,8 +141,8 @@
 
 Name Resolution Rules
 
-The expected type for a record_delta_aggregate shall be a single record type
-or record extension.
+The expected type for a record_delta_aggregate shall be a single descendant
+of a record type.
 
 The expected type for an array_delta_aggregate shall be a single array
 type.
@@ -178,9 +173,12 @@
 use others.
 
 For a record_delta_aggregate, each component_selector_name of each
-component_choice_list shall denote a distinct non discriminant component of
+component_choice_list shall denote a distinct nondiscriminant component of
 the type of the delta aggregate.
 
+No two such component_selectors shall denote components declared
+within different variants of the same variant part.
+
 The types of components in record_component_associations follow the same
 rules as they do for record aggregates (see 4.3.1).
 
@@ -1116,111 +1114,7 @@
 
 ****************************************************************
 
-From: Brad Moore
-Sent: Saturday, June 11, 2016  9:20 PM
-
-> Sure, but it *still* doesn't look like a loop.
-[Editor's note: The above is from a thread filed in AI12-0189-1.]
-
-The last thing I remember Jeff say before we headed back to our rooms after
-dinner last night was something about having pleasant dreams about generators.
-...  Thanks Jeff....
-
-So here it is 3am, my thoughts returned to this email, and I am thinking this
-is related to generators, which might be worth capturing if we are to discuss
-tomorrow.
-
-I think the Java idea could be adapted to syntax that looks more like a loop,
-and it strikes me that the mechanism being used can be considered as a
-generator approach.
-
-Before I describe, first some examples of what it might look like.
-
-The above example
-
-   Total : Integer := 0;
-
-    for I of Iterate(1, N).Parallel.Sum(Total) loop
-       Total := Total + I;
-   end loop;
-
-Iterate(1,N) is a library call to a generator that creates a single "stream"
-value that includes the start, end, and a result value (of type Integer) of
-the iteration
-
-Parallel is another library call that produces a generator and takes a
-"stream" value and splits it into several substream values of "Chunks" of
-iterations. The number of chunks is likely determined based on the number of
-available cores. To get a sequential loop, from the above, you could just
-delete the .Parallel.
-
-Sum is an instantiation of a  "stream" collector library call that calls the
-input generator produced by Parallel, to retrieve chunks, then produces in
-parallel for each generator value, which is an integer. The parameter of Sum
-(ie Total) is a external variable that is updated by the overall result. It
-also happens to be the name of a in out parameter that is passed into a
-callback that is represented by the loop body.
-
-The loop body in fact is updating the local copy of the partial sum, and the
-reduction occurs inside the Sum collector procedure, which updates the real
-result.
-
-The collector generic itself is can be a generic procedure that has two generic
-formals, the identity value for the reduction, and the reducer function.
-
-procedure Add is new Collector(Result_Type => Integer, Reduce => "+",
-Identity => 0); Add could be a set of preinstantiated collectors that are
-available for common use, but the programmer could create user-defined
-collectors as well.
 
-The callback probably takes also as parameters the start and end range of the
-iteration, but the syntactic sugar of this loop syntax, hides that.
-
-Now consider some other examples.
-
-  -- Iterating through a map container by keys.
-  for Pair of Container.Keys  loop
-         Put_Line(Key_Type'Image(Pair.Key) & " => " &
-           Elem_Type'Image(Pair.Elem));
-   end loop;
-
-Keys is a function that produces a generator for the name value pairs of the
-container
-
-
-  -- Iterating through a map container to produce parallel sum of elements.
-
-  Total : Integer := 0;
-
-  for Element of Container.Elements.Parallel.Sum(Total)  loop
-         Total := Total + Element;
-   end loop;
-
-Elements is a function that produces a generator whose value is an element of
-the container, rather than a name value pair.
-
--- s.
-
-    for Pair of Ada.Environment_Variables.Iterate loop
-       Put_Line (Pair.Name & " => " & Pair.Value);
-    end loop;
-
-In this case, we'd probably need to define a Name_Value_Pair_Type and probably
-a new Iterate subprogram that works with this type.
-
-
-Anyway, please keep in mind it is 4am, I should probably know better to
-compose emails at this time, as this might seem like a half-baked mess in the
-morning. But it strikes me that this might be a nice mixture of ideas from
-Tuck's loop body syntax, the generator proposal, and what Ive been thinking
-of lately as an alternative.
-
-The Java stream approach seems to be very flexible and powerful for
-expression, but the Ada take on this would be better for Ada if it can make
-it mechanism look more like a loop. 
-
-****************************************************************
-
 From: Florian Schnada
 Sent: Thursday, September 29, 2016  9:16 AM
 
@@ -1995,6 +1889,68 @@
 Moral: Take care when replying the mail from the ARG list, as the list is set
 up to encourage public replies to the list and not the private replies to the
 author.
+
+****************************************************************
+
+From: Steve Baird
+Sent: Friday, October 13, 2017  9:35 PM
+
+Replace
+   The expected type for a record_delta_aggregate shall be a single
+   record type or record extension.
+
+with
+
+    The expected type for a record_delta_aggregate shall be a single
+    descendant of a record type.
+
+=====
+
+After
+
+   For a record_delta_aggregate, each component_selector_name of each
+   component_choice_list shall denote a distinct non discriminant
+   component of the type of the delta aggregate.
+
+Add
+
+   No two such component_selectors shall denote components declared
+   within different variants of the same variant part.
+
+=====
+
+[Editor's note: These are applied to version /08 of the AI.]
+
+****************************************************************
+
+From: Tucker Taft
+Sent: Saturday, October 14, 2017  7:15 AM
+
+> Replace
+>  The expected type for a record_delta_aggregate shall be a single  
+> record type or record extension.
+> 
+> with
+> 
+>   The expected type for a record_delta_aggregate shall be a single
+>   descendant of a record type.
+
+Why can't it be a single descendant of a record type or a tagged private type?
+ 
+> =====
+> 
+> After
+> 
+>  For a record_delta_aggregate, each component_selector_name of each  
+> component_choice_list shall denote a distinct non discriminant  
+> component of the type of the delta aggregate.
+> 
+> Add
+> 
+>  No two such component_selectors shall denote components declared  
+> within different variants of the same variant part.
+
+Sounds good.
 
 ****************************************************************
 

Questions? Ask the ACAA Technical Agent