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

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

--- ai12s/ai12-0242-1.txt	2019/01/18 06:25:07	1.17
+++ ai12s/ai12-0242-1.txt	2019/01/28 04:47:36	1.18
@@ -1,4 +1,5 @@
 !standard 4.5.10 (0)                                19-01-17    AI12-0242-1/11
+!standard 4.1.4(6)
 !class Amendment 14-06-20
 !status Amendment 1-2012 19-01-15
 !status ARG Approved 12-0-0  19-01-14
@@ -11,7 +12,7 @@
 
 The 'Reduce and 'Parallel_Reduce are defined to allow Reduction Expressions
 to be applied to array objects and iterable container objects without needing
-to write a value_generator.
+to write a value_sequence.
 
 !problem
 
@@ -29,7 +30,7 @@
 Since applying reduction expressions to summarize the components of an
 array or the elements of a containers is expected to be a common
 usage for reduction expression, it would be convenient if there were a
-shorthand form where the value_generator syntax could be replaced with a
+shorthand form where the value_sequence syntax could be replaced with a
 simple prefix that is a name denoting an array or iterable container object.
 
 For example, the above statement could be rewritten as:
@@ -38,7 +39,7 @@
 
 Also, one of the goals of the Reduction Expression syntax in AI12-0262-1 is
 to provide explicit parallelism. Using the syntax of that AI, that
-can be accomplished by inserting the parallel keyword in the value_generator
+can be accomplished by inserting the parallel keyword in the value_sequence
 specification. For example, the original statement above could be written
 as:
     Sum : constant Integer := [parallel for Value of A => Value]'Reduce("+", 0);
@@ -54,11 +55,11 @@
 reduction expressions.
 
 The proposal is to extend the syntax for reduction expressions to allow
-the value_generator to be replaced with a prefix that denotes an array
+the value_sequence to be replaced with a prefix that denotes an array
 object or iterable container object. To allow parallelism to be explicitly
 requested for this shorthand form, a new attribute, 'Parallel_Reduce is
 defined. The 'Reduce shorthand form is syntactically equivalent to writing
-a value_generator that produces values for all array components or container
+a value_sequence that produces values for all array components or container
 elements without the parallel keyword specified, and the 'Parallel_Reduce
 is syntactically equivalent to the same but with the parallel keyword specified.
 
@@ -90,10 +91,11 @@
 A reduction expression is represented as an attribute_reference of the 
 reduction attribute{s} Reduce {or Parallel_Reduce}.
 
-Modify Syntax of 4.5.10:
+Replace first Syntax production of 4.5.10:
 
-reduction_attribute_reference ::= value_generator'reduction_attribute_designator
-                                {| prefix'reduction_attribute_designator}
+reduction_attribute_reference ::= 
+    value_sequence'reduction_attribute_designator
+  | prefix'reduction_attribute_designator
 
 Modify AARM Reason in Legality Rules of 4.5.10:
 
@@ -122,22 +124,22 @@
 
 Add the following to the Dynamic Semantics of subclause 4.5.10:
 
-The following attributes are defined for a prefix X that is of an
-array type (after any implicit dereference), or denotes an /iterable container
-object/:
+For a prefix X that is of an array type (after any implicit dereference), 
+or denotes an iterable container object (see 5.5.1), the following 
+attributes are defined:
 
 X'Reduce(Reducer, Initial_Value[, Combiner])
 
    X'Reduce is a reduction expression that yields a result equivalent to
-   replacing the prefix of the attribute with the value_generator:
+   replacing the prefix of the attribute with the value_sequence:
    [for Item of X => Item]
 
 
 X'Parallel_Reduce(Reducer, Initial_Value[, Combiner])
 
    X'Parallel_Reduce is a reduction expression that yields a result
-   equivalent to replacing the prefix of the attribute with the 
-   value_generator:
+   equivalent to replacing replacing the attribute identifier with Reduce 
+   and the prefix of the attribute with the value_sequence:
    [parallel for Item of X => Item]
 
 Modify the second AARM Implementation Note in Dynamic Semantics of 4.5.10:
@@ -156,12 +158,12 @@
 
   --  Calculate the sum of elements of an array of integers
 
-  A'Reduce("+",0)  -- See 4.3.3(43)
+  A'Reduce("+",0)  -- See 4.3.3.
 
   --  Determine if all elements in a two dimensional array of booleans
   --  are set to true
 
-  Grid'Reduce("and", true)  -- See 3.6(30)
+  Grid'Reduce("and", true)  -- See 3.6.
 
   --  Calculate the minimum value of an array of integers in parallel
 
@@ -173,12 +175,49 @@
 This would provide the benefit of there being only a single attribute
 reference needed for reduction, Reduce. Furthermore, explicit parallelism for
 reduction expressions would still be possible, because one could always replace
-the prefix of the attribute reference with the equivalent value_generator,
+the prefix of the attribute reference with the equivalent value_sequence,
 [parallel for Item of X => Item], which does not seem to be too much of a
 hardship. In the end, we decided to provide Parallel_Reduce for the same reason
 that we provide the short form for the Reduce attribute. As a convenience for
 the programmer, and to make it easier to switch back and forth between a
 parallel and a sequential implementation by making minimal changes to the code.
+
+!corrigendum 4.1.4(6)
+
+@drepl
+In an @fa<attribute_reference>, if the @fa<attribute_designator> is for an 
+attribute defined for (at least some) objects of an access type, then the 
+@fa<prefix> is never interpreted as an @fa<implicit_dereference>; otherwise 
+(and for all @fa<range_attribute_reference>s), if the type of the @fa<name>
+within the @fa<prefix> is of an access type, the @fa<prefix> is interpreted 
+as an @fa<implicit_dereference>. Similarly, if the @fa<attribute_designator>
+is for an attribute defined for (at least some) functions, then the 
+@fa<prefix> is never interpreted as a parameterless @fa<function_call>;
+otherwise (and for all @fa<range_attribute_reference>s), if the @fa<prefix>
+consists of a @fa<name> that denotes a function, it is interpreted as a 
+parameterless @fa<function_call>. 
+@dby
+In an @fa<attribute_reference> that is not a 
+@fa<reduction_attribute_reference>, if the @fa<attribute_designator> is for an 
+attribute defined for (at least some) objects of an access type, then the 
+@fa<prefix> is never interpreted as an @fa<implicit_dereference>; otherwise 
+(and for all @fa<range_attribute_reference>s and 
+@fa<reduction_attribute_reference>s), if there is a @fa<prefix> and the type 
+of the @fa<name>
+within the @fa<prefix> is of an access type, the @fa<prefix> is interpreted 
+as an @fa<implicit_dereference>. Similarly, if the @fa<attribute_designator>
+is for an attribute defined for (at least some) functions, then the 
+@fa<prefix> is never interpreted as a parameterless @fa<function_call>;
+otherwise (and for all @fa<range_attribute_reference>s and 
+@fa<reduction_attribute_reference>s), if there is a @fa<prefix> and the 
+@fa<prefix> consists of a @fa<name> that denotes a function, it is 
+interpreted as a parameterless @fa<function_call>. 
+
+
+!corrigendum 4.5.10(0)
+
+@dinsc
+A fake to cause a conflict; the real text is found in the conflict file.
 
 !ASIS
 

Questions? Ask the ACAA Technical Agent