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

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

--- ai12s/ai12-0127-1.txt	2017/10/06 06:01:28	1.12
+++ ai12s/ai12-0127-1.txt	2017/10/12 04:36:34	1.13
@@ -1,4 +1,4 @@
-!standard 4.3(2)                                    16-10-06    AI12-0127-1/06
+!standard 4.3(2)                                    17-10-11    AI12-0127-1/07
 !standard 4.3(4)
 !standard 4.3.3(3)
 !standard 4.3.4(0)
@@ -44,9 +44,9 @@
 subprogram only to change a small part of a large composite type.
 
    procedure Foo (Fighters : in out Rec)
-      with Post => (Fighters.Colour = Black and
-                    Fighters = (X => Fighters'Old.X, Y => Fighters'Old.Y, ...
-                       Shape => Trapazoid));
+      with Post => (Fighters = (X => Fighters'Old.X, Y => Fighters'Old.Y, ...
+                       Colour => Black,
+                       Shape  => Trapezoid));
 
 This is cumbersome enough that the Postcondition author might check the changed
 component and not even mention that the other components are unchanged.
@@ -83,6 +83,20 @@
 [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
+  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. ;-)]
+
 Replace 4.3.3(3):
   named_array_aggregate ::=
     (array_component_association {, array_component_association})
@@ -93,13 +107,31 @@
   array_component_association_list ::=
     array_component_association {, array_component_association}
 
+Replace 4.3.3(17/5):
+
+In 4.3.3(17/5) replace
+   ... only if it is the single discrete_choice of its
+   discrete_choice_list, and there is only one
+   array_component_association in the array_aggregate.
+with
+   ...  only if it is the single discrete_choice of its
+   discrete_choice_list, and either there is only one
+   array_component_association in the
+   enclosing array_component_association_list or the enclosing
+   aggregate is an array_delta_aggregate
+   REDUNDANT:[, not an array_aggregate].
+
+AARM Ramification: We allow multiple dynamic choices in array delta
+aggregates, but only one dynamic choice per association even in that
+case.
+
 Add a new subclause:
 
 4.3.4 Delta Aggregates
 
 A (record or array) delta aggregate yields a composite value resulting from
-starting with another value of the same type and then subsequently assigning
-to some (but typically not all) components of the copy.
+starting with a copy of another value of the same type and then subsequently
+assigning to some (but typically not all) components of the copy.
 
 Syntax
 
@@ -128,9 +160,9 @@
 defined as for a record_component_association occurring within a
 record aggregate.
 
-For an array_delta_aggregates, the expected type for each
+For an array_delta_aggregate, the expected type for each
 discrete_choice in an array_component_association is the index type of
-type of the delta aggregate.
+the type of the delta aggregate.
 
 The expected type and applicable index constraint of the expression in
 array_component_association is defined as for an
@@ -139,9 +171,11 @@
 
 Legality Rules
 
-For a record_delta_aggregate, the record_component_association_list shall
-not be null record, the record_component_association shall not use the box
-symbol <>, and the component_choice_list shall not use others.
+For a record_delta_aggregate, a record_component_association_list
+shall not be null record. A record_component_association of the
+record_component_association_list of a record_delta_aggregate
+shall not use the box symbol <>, nor shall its component_choice_list
+use others.
 
 For a record_delta_aggregate, each component_selector_name of each
 component_choice_list shall denote a distinct non discriminant component of
@@ -220,10 +254,10 @@
 
 The base expression can be non-trivial:
 
-  New_Cell : Cell := Min_Cell (Link) with delta Value => 42);
+  New_Cell : Cell := (Min_Cell (Link) with delta Value => 42);
      -- see 3.10.1 for Cell and Link; 6.1 for Min_Cell
 
-  A1 : Vector := ((1, 2, 3) with delta Integer (Random * 3.0) => 14.2);
+  A1 : Vector := ((1.0, 2.0, 3.0) with delta Integer (Random * 3.0) => 14.2);
   --  see 3.6 for declaration of type Vector
   --  see 6.1 for declaration of Random
 
@@ -275,8 +309,9 @@
 The postcondition example can be written as:
 
    procedure Foo (Fighters : in out Rec)
-      with Post => (Fighters.Colour = Black and
-                    Fighters = (Fighters'Old with delta Shape => Trapazoid));
+      with Post => (Fighters = (Fighters'Old with delta
+                                   Colour => Black,
+                                   Shape  => Trapazoid));
 
 Also see the examples in the !wording section.
 
@@ -1963,7 +1998,3 @@
 
 ****************************************************************
 
-From: Steve Baird
-Sent: Thursday, October 5, 2017  7:12 PM
-
-****************************************************************

Questions? Ask the ACAA Technical Agent