CVS difference for ai22s/ai22-0011-1.txt
--- ai22s/ai22-0011-1.txt 2022/01/08 05:42:34 1.5
+++ ai22s/ai22-0011-1.txt 2022/01/20 02:59:34 1.6
@@ -1,4 +1,4 @@
-!standard 4.5.10(9/5) 22-01-07 AI22-0011-1/04
+!standard 4.5.10(9/5) 22-01-19 AI22-0011-1/05
!standard 4.5.10(10/5)
!standard 4.5.10(12/5)
!standard 4.5.10(13/5)
@@ -14,6 +14,7 @@
!standard 4.5.10(29/5)
!standard 4.5.10(34/5)
!class binding interpretation 21-11-11
+!status Corrigendum 1-2022 22-01-19
!status ARG Approved 11-0-0 21-11-18
!status work item 21-11-11
!status received 21-04-28
@@ -121,8 +122,8 @@
Add after 4.5.10(18/5) [at the end of the Legality Rules section].
- The types of both *Accum_Subtype* and *Value_Subtype* shall not be an anonymous
- access types.
+ Neither the type of @i<Accum_Subtype> nor @i<Value_Subtype> shall be an
+ anonymous access type.
Replace 4.5.10(19/5) with:
@@ -142,7 +143,7 @@
each value conditionally produced by the iteration (see 5.5 and 5.5.2), the
associated expression is evaluated with the loop parameter having this
value, which produces a result that is converted to
- [*Value_Type*]{*Accum_Subtype*} and is used to define the next value in the
+ [*Value_Type*]{*Value_Subtype*} and is used to define the next value in the
sequence.
Modify 4.5.10(24/5):
@@ -189,7 +190,7 @@
For a parallel reduction expression, it is a bounded error if the reducer
subprogram is not associative. That is, for any arbitrary values of
- {*Value_Subtype*}[subtype Value_Type] A, B, C and a reducer function R, the
+ {*Value_Subtype*}[subtype *Value_Type*] A, B, C and a reducer function R, the
result of R (A, R (B, C)) should produce a result equal to
R (R (A, B), C)); it is a bounded error if R does not. The possible
consequences are Program_Error, or a result that does not match the
@@ -234,6 +235,213 @@
And in any case we have to check the value before passing it to a reducer,
so there is no real benefit in waiting.
+
+!corrigendum 4.5.10(9/5)
+
+@drepl
+In the remainder of this subclause,
+we will refer to nonlimited subtypes @i<Value_Type> and @i<Accum_Type> of a
+@fa<reduction_attribute_reference>. These subtypes and interpretations of
+the @fa<name>s and @fa<expression>s of a @fa<reduction_attribute_reference>
+are determined by the following rules:
+@dby
+In the remainder of this subclause, we will refer to nonlimited subtypes
+@i<Value_Subtype> and @i<Accum_Subtype> of a
+@fa<reduction_attribute_reference>. These subtypes and interpretations of
+the @fa<name>s and @fa<expression>s of a @fa<reduction_attribute_reference>
+are determined by the following rules:
+
+!corrigendum 4.5.10(10/5)
+
+@drepl
+@xbullet<@i<Accum_Type> is a subtype of the expected type of
+the @fa<reduction_attribute_reference>.>
+@dby
+@xbullet<@i<Accum_Subtype> is a subtype of the expected type of
+the @fa<reduction_attribute_reference>.>
+
+!corrigendum 4.5.10(12/5)
+
+@drepl
+@xcode< @b<function> Reducer(Accumulator : @i<Accum_Type>;
+ Value : @i<Value_Type>) @b<return> @i<Accum_Type>;>
+@dby
+@xcode< @b<function> Reducer(Accumulator : @i<Accum_Subtype>;
+ Value : @i<Value_Subtype>) @b<return> @i<Accum_Subtype>;>
+
+!corrigendum 4.5.10(13/5)
+
+@drepl
+@xcode< @b<procedure> Reducer(Accumulator : @b<in out> @i<Accum_Type>;
+ Value : @b<in> @i<Value_Type>);>
+@dby
+@xcode< @b<procedure> Reducer(Accumulator : @b<in out> @i<Accum_Subtype>;
+ Value : @b<in> @i<Value_Subtype>);>
+
+!corrigendum 4.5.10(15/5)
+
+@drepl
+@xbullet<The expected type of an @i<initial_value_>@fa<expression> of a
+@fa<reduction_specification> is that of subtype @i<Accum_Type>.>
+@dby
+@xbullet<The expected type of an @i<initial_value_>@fa<expression> of a
+@fa<reduction_specification> is the type of @i<Accum_Subtype>.>
+
+!corrigendum 4.5.10(16/5)
+
+@drepl
+@xbullet<The expected type of the @fa<expression> of the
+@fa<iterated_element_association> of a @fa<value_sequence>
+is that of subtype @i<Value_Type>.>
+@dby
+@xbullet<The expected type of the @fa<expression> of the
+@fa<iterated_element_association> of a @fa<value_sequence>
+is the type of @i<Value_Subtype>.>
+
+!corrigendum 4.5.10(17/5)
+
+@drepl
+If the @fa<reduction_attribute_reference> has a @fa<value_sequence> with the
+reserved word @b<parallel>, the subtypes @i<Accum_Type> and @i<Value_Type>
+shall statically match.
+@dby
+If the @fa<reduction_attribute_reference> has a @fa<value_sequence> with the
+reserved word @b<parallel>, @i<Accum_Subtype> and @i<Value_Subtype>
+shall statically match.
+
+!corrigendum 4.5.10(18/5)
+
+@drepl
+If the @fa<identifier> of a @fa<reduction_attribute_designator> is
+Parallel_Reduce, the subtypes @i<Accum_Type> and @i<Value_Type> shall
+statically match.
+@dby
+If the @fa<identifier> of a @fa<reduction_attribute_designator> is
+Parallel_Reduce, @i<Accum_Subtype> and @i<Value_Subtype> shall
+statically match.
+
+Neither the type of @i<Accum_Subtype> nor @i<Value_Subtype> shall be an
+anonymous access type.
+
+!corrigendum 4.5.10(19/5)
+
+@drepl
+A @fa<reduction_attribute_reference> denotes a value, with its nominal subtype
+being the subtype of the first parameter of the subprogram denoted by the
+@i<reducer_>@fa<name>.
+@dby
+A @fa<reduction_attribute_reference> denotes a value, with its nominal subtype
+being @i<Accum_Subtype> (the subtype of the first parameter of the subprogram
+denoted by the @i<reducer_>@fa<name>).
+
+!corrigendum 4.5.10(20/5)
+
+@drepl
+For the evaluation of a @fa<value_sequence>, the
+@fa<iterated_element_association>, the @fa<chunk_specification>, and the
+@fa<aspect_specification>, if any, are elaborated in an arbitrary order.
+Next an iteration is
+performed, and for each value conditionally produced by the iteration (see
+5.5 and 5.5.2), the associated @fa<expression> is evaluated with the loop
+parameter having this value, which produces a result that is converted to
+Value_Type and is used to define the next value in the sequence.
+@dby
+For the evaluation of a @fa<value_sequence>, the
+@fa<iterated_element_association>, the @fa<chunk_specification>, and the
+@fa<aspect_specification>, if any, are elaborated in an arbitrary order.
+Next an iteration is
+performed, and for each value conditionally produced by the iteration (see
+5.5 and 5.5.2), the associated @fa<expression> is evaluated with the loop
+parameter having this value, which produces a result that is converted to
+Value_Subtype and is used to define the next value in the sequence.
+
+!corrigendum 4.5.10(24/5)
+
+@drepl
+@xindent<The evaluation of a use of this attribute begins by evaluating the
+parts of the @fa<reduction_attribute_designator> (the @i<reducer_>@fa<name>
+Reducer and the @i<initial_value_>@fa<expression> Initial_Value), in an
+arbitrary order. It then
+initializes the @i<accumulator> of the reduction expression to the value
+of the @i<initial_value_>@fa<expression> (the @i<initial value>). The
+@fa<value_sequence> V is then evaluated.>
+@dby
+@xindent<The evaluation of a use of this attribute begins by evaluating the
+parts of the @fa<reduction_attribute_designator> (the @i<reducer_>@fa<name>
+Reducer and the @i<initial_value_>@fa<expression> Initial_Value), in an
+arbitrary order. It then converts the the value of the
+@i<initial_value_>@fa<expression> (the @i<initial value>) to @i<Accum_Subtype>
+and then initializes the @i<accumulator> with the result. The
+@fa<value_sequence> V is then evaluated.>
+
+!corrigendum 4.5.10(25/5)
+
+@drepl
+@xindent<If the @fa<value_sequence> does not have the reserved word
+@b<parallel>, each value of the @fa<value_sequence> is passed, in order,
+as the second (Value) parameter to a call on Reducer, with the first
+(Accumulator) parameter being the prior value of the accumulator,
+saving the result as the new value of the accumulator. The reduction
+expression yields the final value of the accumulator.>
+@dby
+@xindent<If the @fa<value_sequence> does not have the reserved word
+@b<parallel>, each value of the @fa<value_sequence> is converted to
+@i<Value_Subtype> and then passed, in order, as the second (Value) parameter
+to a call on Reducer, with the first
+(Accumulator) parameter being the prior value of the accumulator,
+saving the result as the new value of the accumulator. The reduction
+expression yields the final value of the accumulator.>
+
+!corrigendum 4.5.10(27/5)
+
+@drepl
+@xindent<Each logical thread of control creates a local accumulator for
+processing its subsequence. The accumulator for a subsequence is initialized
+to the first value of the subsequence, and calls on Reducer start with the
+second value of the subsequence (if any). The result for the
+subsequence is the final value of its local accumulator.>
+@dby
+@xindent<Each logical thread of control creates a local accumulator for
+processing its subsequence. The accumulator for a subsequence is initialized
+to the result of converting the first value of the subsequence to
+@i<Accum_Subtype>, and calls on Reducer start with the
+second value of the subsequence (if any). The result for the
+subsequence is the final value of its local accumulator.>
+
+!corrigendum 4.5.10(29/5)
+
+@drepl
+@xindent<If the evaluation of the @fa<value_sequence> yields an empty
+sequence of values, the reduction expression yields the initial value.>
+@dby
+@xindent<If the evaluation of the @fa<value_sequence> yields an empty
+sequence of values, the reduction expression yields the initial value of the
+accumulator.>
+
+!corrigendum 4.5.10(34/5)
+
+@drepl
+For a parallel reduction expression, it is a bounded error if the reducer
+subprogram is not associative. That is, for any arbitrary values of subtype
+@i<Value_Type> @i<A>, @i<B>, @i<C> and a reducer function @i<R>, the result of
+@i<R> (@i<A>, @i<R> (@i<B>, @i<C>)) should produce a result equal to
+@i<R> (@i<R> (@i<A>, @i<B>), @i<C>)); it is a bounded
+error if @i<R> does not. The possible consequences
+are Program_Error, or a result that does not match the equivalent sequential
+reduction expression due to the order of calls on the reducer subprogram being
+unspecified in the overall reduction. Analogous rules apply in the case of a
+reduction procedure.
+@dby
+For a parallel reduction expression, it is a bounded error if the reducer
+subprogram is not associative. That is, for any arbitrary values of
+@i<Value_Subtype> @i<A>, @i<B>, @i<C> and a reducer function @i<R>, the result of
+@i<R> (@i<A>, @i<R> (@i<B>, @i<C>)) should produce a result equal to
+@i<R> (@i<R> (@i<A>, @i<B>), @i<C>)); it is a bounded
+error if @i<R> does not. The possible consequences
+are Program_Error, or a result that does not match the equivalent sequential
+reduction expression due to the order of calls on the reducer subprogram being
+unspecified in the overall reduction. Analogous rules apply in the case of a
+reduction procedure.
!ACATS test
Questions? Ask the ACAA Technical Agent