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

Differences between 1.6 and version 1.7
Log of other versions for file ai12s/ai12-0242-1.txt

--- ai12s/ai12-0242-1.txt	2018/03/01 07:24:04	1.6
+++ ai12s/ai12-0242-1.txt	2018/03/02 06:46:45	1.7
@@ -1,4 +1,4 @@
-!standard 4.5.9 (0)                                18-01-24    AI12-0242-1/02
+!standard 4.5.9 (0)                                18-03-01    AI12-0242-1/03
 !class Amendment 14-06-20
 !status work item 14-06-20
 !status received 14-06-17
@@ -232,6 +232,11 @@
    procedure Combiner(L : in out S; R : S);
+[RLB: Examples have shown that an asymetric combiner is very useful. The second
+operand should be allowed to be any type, and that matches the element type
+of the iterator of the prefix type; the other operand specifies the type
+of the result of the attribute.]
 O'Reduce(Combiner, Initial_Value)
    For a prefix denoting an object of an array or container, O'Reduce is an
@@ -239,6 +244,14 @@
    named Combiner_Subprogram and initial value to all the values associated with
    the attribute prefix.
+[RLB: A "container" is not a technical term, and even if it was, it's the wrong
+thing. What we need here is a full object iterator, essentially an "of" form. The
+resolution requirement should probably be an object of any composite type, and
+then have a Legality Rule of the form that the attribute is illegal if
+the type of the prefix does not have an "of" iterator (need technical terms, of
+course). The element type involved comes from that iterator, so this has an
+effect on the resolution of the combiner.]
 O'Parallel_Reduce(Combiner, Initial_Value)
    For a prefix denoting an object of an array or container, O'Reduce is an
@@ -257,8 +270,8 @@
 nonlimited type.
 AARM Note
-The prefix can be an array or container aggregate. The prefix can denote an
-object of a multi-dimensional array.
+The prefix can be a (qualified) array or container aggregate. The prefix can
+denote an object of a multi-dimensional array.
    Dynamic Semantics
@@ -275,6 +288,10 @@
 of the expression. If the prefix of the attribute reference denotes a null range
 of values, then the Initial_Value is the result of the expression.
+[RLB: "repeatedly" doesn't explain what really happens. This needs to be worded
+in terms of the "of" iterator for the type of the prefix (especially important
+for the container case).]
 For a Parallel_Reduce attribute reference, each component or element of the
 prefix is assigned to an executor. (See 9.12). The executor associated with the
 first value of the prefix calls the Combiner_Subprogram using the Initial_Value
@@ -360,6 +377,11 @@
 of the aggregate object that would have been created is iteratively applied to
 the Combiner_Suprogram of the attribute reference.
+[RLB: We need more than this; we also need a permission to interleave the
+evaluation of the aggregate choices and the reduction. That has to be
+normative as it overrides the canonical semantics. That probably ought to
+be a "Notwithstanding" rule.
 Wording Changes from Ada 2012
 Reduce attribute is new.
 Parallel_Reduce attribute is new.
@@ -429,6 +451,10 @@
  start with something that already has pretty good wording, rather than try to
  invent new wording]
+[RLB: There's much more wording here than needed, since Associative doesn't
+have any Legality Rules on the contents of the subprogram (it's more of an
+assertion). As such, most the generic rules are unneeded.]
 For a noninstance subprogram, predefined operator, generic subprogram, formal
 subprogram, formal object of a named or anonymous access-to-subprogram type
 (including a formal type) the following language-defined operational aspect is
@@ -7895,6 +7921,26 @@
 course assumes that we define the concept.) So if you really think you can get 
 it right on your own, feel free to do so. I just hope no one does that in any 
 auto or aircraft software...
+From: Jean-Pierre Rosen
+Sent: Thursday, March  1, 2018  3:54 AM
+My proposal of having 'Reduce applied to the function didn't get much support.
+Thinking about it, what worries me is that 'Reduce is a verb, while the name
+of an entity designating a value should be a name (or adjective, or is_a...)
+appropriate to the value.
+I think that <expr>'Reduction(F,...) would be more palatable. What do others
+From: Tucker Taft
+Sent: Thursday, March  1, 2018  6:35 AM
+Either is fine by me.

Questions? Ask the ACAA Technical Agent