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

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

--- ai12s/ai12-0262-1.txt	2019/01/13 05:14:33	1.7
+++ ai12s/ai12-0262-1.txt	2019/01/16 03:16:49	1.8
@@ -1,7 +1,10 @@
-!standard 4.1.4(1)                                    19-01-12  AI12-0262-1/05
+!standard 4.1.4(1)                                    19-01-14  AI12-0262-1/06
+!standard 4.1.4(6)
 !standard 4.1.4(11)
 !standard 4.5.9(0)
 !class Amendment 18-03-01
+!status Amendment 1-2012 19-01-15
+!status ARG Approved 9-0-2  19-01-14
 !status work item 18-03-01
 !status received 18-03-01
 !priority Medium
@@ -196,16 +199,16 @@
 Reduction expressions provides a way to map or transform a collection of
 values into a new set of values, and then summarize the values produced by
 applying an operation to reduce the set to a single value result.
+A reduction expression is represented as an attribute_reference using the 
+Reduce attribute.
 
 Syntax
 
-reduction_expression ::= reduction_attribute_reference
-
 reduction_attribute_reference ::= value_sequence'reduction_attribute_designator
 
-value_sequence ::= [ [parallel] iterated_component_association ]
+value_sequence ::= '[' [parallel] iterated_component_association ']'
 
-reduction_attribute_designator ::= identifier(reduction_specification)
+reduction_attribute_designator ::= /reduction_/identifier(reduction_specification)
 
 reduction_specification ::= /reducer_/name, /initial_value_/expression[, /combiner_/name]
 
@@ -241,8 +244,8 @@
 subtype I.
 
 The expected type of the index parameter of a value_sequence is that of the
-discrete_choice. Otherwise, the expected type of the loop parameter of a
-value_sequence is as defined for an iterator_specification (see 5.5.2).
+discrete_choice. The expected type of the loop parameter of a value_sequence 
+is as defined for an iterator_specification (see 5.5.2).
 
 The expected type for a value_sequence shall be a single one-dimensional array
 type. The component type of this array type is the expected type of the index
@@ -265,7 +268,7 @@
 End AARM Reason.
 
 The discrete_choice_list of a value_sequence shall have a single discrete_choice
-and the discrete_choice shall not be the reservered word others.
+and the discrete_choice shall not be the reserved word others.
 
 AARM Ramification: The discrete_choice_list of a value_sequence may have a 
 discrete_choice that is a nonstatic choice_expression or that is a 
@@ -276,7 +279,7 @@
 Static Semantics
 
 The nominal subtype of the index parameter of a value_sequence
-is that of the discrete_choice. Otherwise the nominal subtype of the
+is that of the discrete_choice. The nominal subtype of the
 loop parameter of a value_sequence is as defined for an iterator_specification
 (See 5.5.2).
 
@@ -290,10 +293,11 @@
 
 Dynamic Semantics
 
-For a reduction_attribute_reference, the value_sequence is first evaluated.
+For a reduction_attribute_reference, first the value_sequence is first evaluated.
 For a value_sequence with or without the reserved word parallel, the evaluation
 of a value_sequence is as defined for an array aggregate (see 4.3.3).
-The reduction_attribute_designator is then evaluated.
+The reduction_attribute_designator is then evaluated, and then the reduction is 
+evaluated.
 
 AARM Discussion:
 The presence of the parallel keyword does not effect the evaluation of
@@ -316,25 +320,27 @@
    aggregate produced by the value_sequence is passed in ascending order as the
    second (Value) parameter to execute a call to Reducer, using the result of
    the previous iteration as the first (Accumulator) parameter of the call.
-   Yields the final result of the iteration. If the reserved word parallel is
-   present in a value_sequence (a parallel reduction), then the reduction
-   expression is a parallel construct and the iterations are partitioned into
-   one or more chunks, each with its own separate logical thread of control (see
-   clause 9). Each logical thread of control generates a local copy of the
-   result of its iteration, which is initialized to the value of the expression
-   produced by the first assigned iteration. As each logical thread of control
-   completes its assigned iterations, the Combiner is called using the value of
-   the local result as the second (Value) parameter of the call, and using the
-   previous final result value, as the the first (Accumulator) parameter for the
-   call. Once all logical threads of control have completed, yields the result
+   The result of V'Reduce is the final result of the iteration. If the 
+   reserved word parallel is present in a value_sequence (a parallel 
+   reduction), then the reduction expression is a parallel construct and the 
+   iterations are partitioned into one or more chunks, each with its own 
+   separate logical thread of control (see clause 9). Each logical thread of 
+   control generates a local copy of the result of its iteration, which is 
+   initialized to the value of the expression produced by the first assigned 
+   iteration. As each logical thread of control completes its assigned 
+   iterations, the Combiner is called using the value of the local result as 
+   the second (Value) parameter of the call, and using the previous final 
+   result value, as the the first (Accumulator) parameter for the call. Once 
+   all logical threads of control have completed, V'Reduce yields the result
    of the last call to Combiner. The calls to Combiner are executed in
    increasing iteration order. The Combiner may be omitted if the Reducer is
    also a combiner_subprogram. In that case, the Reducer is implicitly used
    also as the Combiner argument.
+
+   If the value_sequence of the reduction_attribute reference produces an
+   empty sequence, V'Reduce yields the value of the Initial_Value expression 
+
 
-   V'Reduce yields the value of the Initial_Value expression if the
-   value_sequence of the reduction_attribute reference produces an empty
-   sequence.
 
 AARM Implementation Note:
 For a reduction_attribute_reference that has a value_sequence without the 
@@ -406,9 +412,9 @@
 
      My_String : String(1..10);
 
-        [for I in My_String'Range => My_String(I)]'Reduction (Standard."&", "")
+        [for I in My_String'Range => My_String(I)]'Reduce (Standard."&", "")
                -- This is a terrible way to copy a string. :-)
-        String'[for I in My_String'Range => My_String(I)]'Reduction (Standard."&", "")
+        String'[for I in My_String'Range => My_String(I)]'Reduce (Standard."&", "")
 
 The first reduction overall requires a single expected type; it can't be used in a type
 conversion, for instance. The type provided allows the rest of the reduction to resolve.

Questions? Ask the ACAA Technical Agent