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

Differences between 1.3 and version 1.4
Log of other versions for file ai12s/ai12-0445-1.txt

--- ai12s/ai12-0445-1.txt	2022/05/07 06:14:18	1.3
+++ ai12s/ai12-0445-1.txt	2022/06/14 23:39:33	1.4
@@ -1,9 +1,11 @@
-!standard 3.2(8)                                       22-05-05  AI12-0445-1/03
+!standard 3.2(8)                                       22-05-25  AI12-0445-1/05
+!standard 3.4.1(6/2)
 !standard 3.10.2(20)
 !standard 5.5.3(21/5)
 !standard 5.5.3(27/5)
 !standard 5.5.3(28/5)
 !standard 5.5.3(29/5)
+!standard 6.1.2(18/5)
 !standard 7.6.1(16/2)
 !standard 9.6.1(82/2)
 !standard 9.8(20/3)
@@ -35,7 +37,10 @@
 !standard A.10.4(1)
 !standard A.10.6(7)
 !standard A.13(1)
-!standard A.18.31(16/5)
+!standard A.18.9(74.2/5)
+!standard A.18.9(74.8/5)
+!standard A.18.9(74.9/5)
+!standard A.18.32(16/5)
 !standard B.1(3)
 !standard B.3.2(2)
 !standard C.3(9)
@@ -87,10 +92,28 @@
     and any exclusion of the null value. Such values /belong/ to the subtype.
     {The other values of the type are /outside/ the subtype.}
 
-    [We use "outside" in various notes (see AI12-0422-1), and it is already
+    [We use "outside" in various notes (see AI12-0442-1), and it is already
     (dubiously) used in some Implementation Permissions (3.5.4(24) and
     3.5.6(7/5)) - Editor.]
 
+Modify 3.4.1(6/2):
+
+    Universal types are defined for (and belong to) the integer, real, fixed
+    point, and access classes, and are referred to in this {document}[standard] as 
+    respectively, universal_integer, universal_real, universal_fixed, and
+    universal_access. These are analogous to class-wide types for these
+    language-defined elementary classes. As with class-wide types, if a formal
+    parameter is of a universal type, then an actual parameter of any type in
+    the corresponding class is acceptable. In addition, a value of a universal
+    type (including an integer or real numeric_literal, or the literal null)
+    is “universal” in that it is acceptable where some particular type in the
+    class is expected (see 8.6).
+
+    [This is not the correct form for a self-reference to the RM. Prior to 2018,
+     it should have been "this International Standard", but now "this document"
+     is sufficient. Use the macro @intlstdname here so we don't have to change
+     it next time they change their mind on this.- Editor.]
+
 Modify 3.10.2(20):
 
    * For determining whether one level is statically deeper than another
@@ -157,6 +180,18 @@
 
 [See previous paragraph for comments - Editor.]
 
+Modify 6.1.2(18/5):
+
+   The Global aspect for a callable entity defines the global variables that
+   {can}[might] be referenced as part of a call on the entity, including any
+   assertion expressions that apply to the call (even if not enabled),
+   {such as}[including] preconditions, postconditions, predicates, and type
+   invariants.
+
+["including" is used twice here, I recommend changing the second one as
+marked. It's annoying to re-read wording 'cause one sees mistakes never
+before seen. - Editor.]
+
 Modify 7.6.1(16/2):
 
    * For an Adjust invoked as part of assignment operations other than those
@@ -204,9 +239,9 @@
 
 Modify 10.1.1(24):
 
-  * The semantic dependences (see below) are the ones needed to check the
-    compile-time rules across compilation unit boundaries; a compilation
-    unit depends semantically on the other compilation units
+  * The semantic dependences (see below) are the ones {necessary}[needed]
+    to check the compile-time rules across compilation unit boundaries; a
+    compilation unit depends semantically on the other compilation units
     {necessary}[needed] to determine its legality. The visibility rules are
     based on the semantic dependences.
 
@@ -415,7 +450,7 @@
    required to create an anonymous object of type T: If the discriminant
    values that are read in are equal to the corresponding discriminant values
    of Item, then {creation of a new} [no] object of type T [need be created]
-   {can be bypassed} and Item may be used instead. If they are not equal and
+   {may be bypassed} and Item may be used instead. If they are not equal and
    Item is a constrained variable, then Constraint_Error may be raised at that
    point, before any further values are read from the stream and before the
    object of type T is created.
@@ -536,9 +571,41 @@
 
     The package IO_Exceptions defines the exceptions [needed]{used} by the
     predefined input-output packages.
+
+Modify A.18.9(74.2/5):
+
+       type Set (Base : not null access {Ordered}[Hashed]_Sets.Set) is
+          tagged limited private
+          with Constant_Indexing => Constant_Reference,
+               Default_Iterator  => Iterate,
+               Iterator_Element  => Element_Type,
+               Stable_Properties => (Length),
+               Global            => null,
+               Default_Initial_Condition => Length (Set) = 0,
+               Preelaborable_Initialization;
+
+[This is the ordered set package, so we have to refer to Ordered_Sets
+here - Editor.]
+
+Modify A.18.9(74.8/5):
+
+       procedure Assign (Target : in out {Ordered}[Hashed]_Sets.Set;
+                         Source : in Set)
+          with Post => Length (Source) = Length (Target);
+
+[This is the ordered set package, so we have to refer to Ordered_Sets
+here - Editor.]
+
+Modify A.18.9(74.9/5):
 
-Modify A.18.31(16/5):
+       function Copy (Source : {Ordered}[Hashed]_Sets.Set) return Set
+          with Post => Length (Copy'Result) = Length (Source);
 
+[This is the ordered set package, so we have to refer to Ordered_Sets
+here - Editor.]
+
+Modify A.18.32(16/5):
+
    The Implementation Advice about the Move and Swap operations is deleted
    for bounded holders; these operations can copy elements as
    {necessary}[needed].
@@ -698,6 +765,349 @@
  - currently, we can only do that on a full paragraph basis or with a few 
 macros - but new commands should not be hard to define and implement).
 
+!comment Only a few changes are defined with Corrigendum sections.
+
+!corrigendum 5.5.3(0)
+
+@dinsc
+See the conflict file for the changes.
+
+!corrigendum 6.1.2(0)
+
+@dinsc
+See the conflict file for the changes.
+
+!corrigendum 7.6.1(16/2)
+
+@drepl
+@xbullet<For an Adjust invoked as part of assignment operations other than
+those invoked as part of an @fa<assignment_statement>, other adjustments due to
+be performed might or might not be performed, and then Program_Error is raised.
+During its propagation, finalization might or might not be applied to objects
+whose Adjust failed. For an Adjust invoked as part of an
+@fa<assignment_statement>, any other adjustments due to be performed are
+performed, and then Program_Error is raised.>
+@dby
+@xbullet<For an Adjust invoked as part of assignment operations other than
+those invoked as part of an @fa<assignment_statement>, some of the adjustments
+due to be performed can be performed, and then Program_Error is raised.
+During its propagation, finalization may be applied to objects
+whose Adjust failed. For an Adjust invoked as part of an
+@fa<assignment_statement>, any other adjustments due to be performed are
+performed, and then Program_Error is raised.>
+
+!corrigendum 12.5.1(1/3)
+
+@drepl
+In its most general form, the category determined for a formal private
+type is all types, but the category can be restricted to only nonlimited
+types or to only tagged types. Similarly, the category for a formal
+incomplete type is all types but the category can be restricted to only
+tagged types; unlike other formal types, the actual type does not need
+to be able to be frozen (see 13.14). The category determined for a 
+formal derived type is the derivation class rooted at the ancestor type.
+@dby
+In its most general form, the category determined for a formal private
+type is all types, but the category can be restricted to only nonlimited
+types or to only tagged types. Similarly, the category for a formal
+incomplete type is all types but the category can be restricted to only
+tagged types; unlike other formal types, the actual type can be 
+incompletely defined, and not ready to be frozen
+(see 13.14). The category determined for a formal derived type is the
+derivation class rooted at the ancestor type.
+
+!corrigendum 13.1(7/2)
+
+@drepl
+The @i<representation> of an object consists of a certain number of bits (the
+@i<size> of the object). For an object of an elementary type, these are the
+bits that are normally read or updated by the machine code when loading,
+storing, or operating-on the value of the object. For an object of a
+composite type, these are the bits reserved for this object, and include
+bits occupied by subcomponents of the object. If the size of an object is
+greater than that of its subtype, the additional bits are padding bits.
+For an elementary object, these padding bits are normally read and updated
+along with the others. For a composite object, padding bits might not be
+read or updated in any given composite operation, depending on the implementation.
+@dby
+The @i<representation> of an object consists of a certain number of bits (the
+@i<size> of the object). For an object of an elementary type, these are the
+bits that are normally read or updated by the machine code when loading,
+storing, or operating-on the value of the object. For an object of a
+composite type, these are the bits reserved for this object, and include
+bits occupied by subcomponents of the object. If the size of an object is
+greater than that of its subtype, the additional bits are padding bits.
+For an elementary object, these padding bits are normally read and updated
+along with the others. For a composite object, it is unspecified whether
+padding bits are read or updated in any given composite operation.
+
+!corrigendum 13.3(37/2)
+
+@drepl
+The recommended level of support for the Size attribute of objects is the
+same as for subtypes (see below), except that only a confirming Size clause
+need be supported for an aliased elementary object.
+@dby
+The recommended level of support for the Size attribute of objects is the
+same as for subtypes (see below), except that only a confirming Size clause
+is required to be supported for an aliased elementary object.
+
+!corrigendum 13.3(55)
+
+@drepl
+@xbullet<The Size (if not specified) of a static discrete or fixed point
+subtype should be the number of bits needed to represent each
+value belonging to the subtype using an unbiased representation, leaving
+space for a sign bit only if the subtype contains negative values. If
+such a subtype is a first subtype, then an implementation should
+support a specified Size for it that reflects this representation.>
+@dby
+@xbullet<The Size (if not specified) of a static discrete or fixed point
+subtype should be the number of bits necessary to represent each
+value belonging to the subtype using an unbiased representation, leaving
+space for a sign bit only if the subtype contains negative values. If
+such a subtype is a first subtype, then an implementation should
+support a specified Size for it that reflects this representation.>
+
+!corrigendum 13.3(58)
+
+@dinsa
+@xindent<@s9<NOTE 6 @  A @fa<component_clause> or Component_Size clause can override a
+specified Size. Aspect Pack cannot.>>
+@dinss
+@s8<@i<Static Semantics>>
+
+For every subtype S:
+
+{{ Rest of this is in the conflict file }}
+
+@xbullet<If S is some other subtype, only confirming specifications of
+Object_Size are required to be supported.>
+
+!corrigendum 13.6(1/3)
+
+@drepl
+A @fa<type_conversion> (see 4.6) can be used to convert between two different
+representations of the same array or record. To convert an array from one
+representation to another, two array types need to be declared with
+matching component subtypes, and convertible index types.
+If one type has Pack specified and the other does not, then explicit
+conversion can be used to pack or unpack an array.
+@dby
+A @fa<type_conversion> (see 4.6) can be used to convert between two different
+representations of the same array or record. To convert an array from one
+representation to another, two array types with
+matching component subtypes and convertible index types are required.
+If one type has Pack specified and the other does not, then explicit
+conversion can be used to pack or unpack an array.
+
+!corrigendum 13.6(2/5)
+
+@drepl
+To convert an untagged record from one representation to another, two
+record types with a common ancestor type need to be declared.
+Distinct representations can then be specified for the record
+types, and explicit conversion between the types can be used to effect a
+change in representation.
+@dby
+To convert an untagged record from one representation to another, two
+record types with a common ancestor type are
+required. Distinct representations can then be specified for the record
+types, and explicit conversion between the types can be used to effect a
+change in representation.
+
+!corrigendum 13.11(21.6/3)
+
+@drepl
+The number of calls to Allocate needed to implement
+an @fa<allocator> for any particular type is unspecified. The number of calls
+to Deallocate needed to implement an instance of
+Unchecked_Deallocation (see 13.11.2) for any particular object is the same
+as the number of Allocate calls for that object.
+@dby
+The number of calls to Allocate that will be used to implement
+an @fa<allocator> for any particular type is unspecified. The number of calls
+to Deallocate that will be used to implement an instance of
+Unchecked_Deallocation (see 13.11.2) for any particular object is the same
+as the number of Allocate calls for that object.
+
+!corrigendum 13.11.2(9/3)
+
+@drepl
+@xhang<@xterms<3.>Free(X), when X is not equal to @b<null> first performs finalization of
+the object designated by X (and any coextensions of the object @emdash see
+3.10.2), as described in 7.6.1. It then deallocates the storage
+occupied by the object designated by X (and any coextensions). If
+the storage pool is a user-defined object, then the storage is
+deallocated by calling Deallocate as described in 13.11.
+There is one exception: if the object being freed contains
+tasks, the object might not be deallocated.>
+@dby
+@xhang<@xterms<3.>Free(X), when X is not equal to @b<null> first performs finalization of
+the object designated by X (and any coextensions of the object @emdash see
+3.10.2), as described in 7.6.1. It then deallocates the storage
+occupied by the object designated by X (and any coextensions). If
+the storage pool is a user-defined object, then the storage is
+deallocated by calling Deallocate as described in 13.11.
+There is one exception: if the object being freed contains
+tasks, it is unspecified whether the object is deallocated.>
+
+!corrigedum 13.13.2(56/3)
+
+@drepl
+The number of calls performed by the predefined implementation of the
+stream-oriented attributes on the Read and Write operations of the stream
+type is unspecified. An implementation may take advantage of this
+permission to perform internal buffering. However, all the calls on the
+Read and Write operations of the stream type needed to implement
+an explicit invocation of a stream-oriented attribute shall take place
+before this invocation returns. An explicit invocation is one appearing
+explicitly in the program text, possibly through a generic instantiation
+(see 12.3).
+@dby
+The number of calls performed by the predefined implementation of the
+stream-oriented attributes on the Read and Write operations of the stream
+type is unspecified. An implementation may take advantage of this
+permission to perform internal buffering. However, all the calls on the
+Read and Write operations of the stream type used to implement
+an explicit invocation of a stream-oriented attribute shall take place
+before this invocation returns. An explicit invocation is one appearing
+explicitly in the program text, possibly through a generic instantiation
+(see 12.3).
+
+!corrigendum 13.13.2(56.1/3)
+
+@drepl
+If @i<T> is a discriminated type and its discriminants have defaults, then
+in two cases an execution of the default implementation of S'Read is not
+required to create an anonymous object of type @i<T>: If the discriminant
+values that are read in are equal to the corresponding discriminant values
+of @i<Item>, then no object of type @i<T> need be created
+and @i<Item> may be used instead. If they are not equal and
+@i<Item> is a constrained variable, then Constraint_Error may be raised at that
+point, before any further values are read from the stream and before the
+object of type @i<T> is created.
+@dby
+If @i<T> is a discriminated type and its discriminants have defaults, then
+in two cases an execution of the default implementation of S'Read is not
+required to create an anonymous object of type @i<T>: If the discriminant
+values that are read in are equal to the corresponding discriminant values
+of @i<Item>, then creation of a new object of type @i<T> 
+may be bypassed and @i<Item> may be used instead. If they are not equal and
+@i<Item> is a constrained variable, then Constraint_Error may be raised at that
+point, before any further values are read from the stream and before the
+object of type @i<T> is created.
+
+!corrigendum A.1(51)
+
+@drepl
+An implementation may provide additional predefined integer types and
+additional predefined floating point types. Not all of these
+types need have names.
+@dby
+An implementation may provide additional predefined integer types and
+additional predefined floating point types. Some or all of these
+types may be anonymous.
+
+!corrigendum A.5.2(40.1/1)
+
+@drepl
+It is a bounded error to invoke Value with a string that is not the
+image of any generator state. If the error is detected, Constraint_Error or
+Program_Error is raised. Otherwise, a call to Reset with the resulting state
+will produce a generator such that calls to Random with this generator will
+produce a sequence of values of the appropriate subtype, but which might
+not be random in character. That is, the sequence of values
+might not fulfill the implementation requirements of this
+subclause.
+@dby
+It is a bounded error to invoke Value with a string that is not the
+image of any generator state. If the error is detected, Constraint_Error or
+Program_Error is raised. Otherwise, a call to Reset with the resulting state
+will produce a generator such that calls to Random with this generator will
+produce a sequence of values of the appropriate subtype, but which are
+not necessarily random in character. That is, the sequence of values
+do not necessarily fulfill the implementation requirements of this
+subclause.
+
+!corrigendum A.18.32(0)
+
+@dinsc
+Placeholder; see conflict file for results.
+
+
+!corrigendum D.9(12)
+
+@drepl
+@xbullet<An upper bound on the @i<lateness> of a @fa<delay_relative_statement>,
+for a positive value of the delay expression, in a situation where the task
+has sufficient priority to preempt the processor as soon as it becomes
+ready, and does not need to wait for any other execution resources. The upper
+bound is expressed as a function of the value of the delay expression. The
+lateness is obtained by
+subtracting the value of the delay expression from the @i<actual duration>.
+The actual duration is measured from a point immediately before a task
+executes the @fa<delay_statement> to a point immediately after the task
+resumes execution following this statement.>
+@dby
+@xbullet<An upper bound on the @i<lateness> of a @fa<delay_relative_statement>,
+for a positive value of the delay expression, in a situation where the task
+has sufficient priority to preempt the processor as soon as it becomes
+ready, and can proceed without waiting for any other execution resources. The
+upper bound is expressed as a function of the value of the delay expression.
+The lateness is obtained by
+subtracting the value of the delay expression from the @i<actual duration>.
+The actual duration is measured from a point immediately before a task
+executes the @fa<delay_statement> to a point immediately after the task
+resumes execution following this statement.>
+
+!corrigendum D.9(13)
+
+@drepl
+@xbullet<An upper bound on the lateness of a @fa<delay_until_statement>, in a
+situation where the value of the requested expiration time is after the time
+the task begins executing the statement, the task has sufficient priority to
+preempt the processor as soon as it becomes ready, and it does not need to
+wait for any other execution resources. The upper bound is expressed as a
+function of the difference between the requested expiration time and
+the clock value at the time the statement begins execution. The lateness
+of a @fa<delay_until_statement> is obtained by subtracting the requested
+expiration time from the real time that the task resumes execution
+following this statement.>
+@dby
+@xbullet<An upper bound on the lateness of a @fa<delay_until_statement>, in a
+situation where the value of the requested expiration time is after the time
+the task begins executing the statement, the task has sufficient priority to
+preempt the processor as soon as it becomes ready, and it can proceed without
+waiting for any other execution resources. The upper bound is expressed as a
+function of the difference between the requested expiration time and
+the clock value at the time the statement begins execution. The lateness
+of a @fa<delay_until_statement> is obtained by subtracting the requested
+expiration time from the real time that the task resumes execution
+following this statement.>
+
+!corrigendum D.15(1/3)
+
+@drepl
+This subclause describes a language-defined package to allow user-defined
+protected procedures to be executed at a specified time without the
+need for a task or a delay statement.
+@dby
+This subclause describes a language-defined package to allow user-defined
+protected procedures to be executed at a specified time without the
+use of a task or a delay statement.
+
+!corrigendum G(4)
+
+@drepl
+@xbullet<a mode ("relaxed mode"), in which no accuracy or other numeric
+performance requirements need be satisfied, as for implementations not
+conforming to the Numerics Annex;>
+@dby
+@xbullet<a mode ("relaxed mode"), in which there are no accuracy or other numeric
+performance requirements to be satisfied, as for implementations not
+conforming to the Numerics Annex;>
+
 !ASIS
 
 No ASIS effect.
@@ -799,4 +1209,75 @@
 
 ****************************************************************
 
+From: Randy Brukardt
+Sent: Wednesday, May 11, 2022  5:27 PM
+
+More questions that have arisen applying the ISO changes...
+
+ISO comment #21 says:
+
+For an individual document, the form “this document” shall be used when making
+references within the document to itself. Use “this document” (not “This
+International Standard”) to refer to ISO/IEC 8652 throughout the text.
+
+----
+
+For the most part, this is not interesting to the ARG as we already refer 
+differently for the RM and ISO versions. The vast majority of the references
+that they don't like only appear in the ISO version (which I will change via 
+adjustments of the macros that determine the natural language used). However, 
+we have a few uses of "this Standard" and "the Standard" in the text. So far
+as I can tell, those never were an allowed form.
+
+... [Items belonging to AI12-0441-1 eliminated - see that AI for the full
+text - Editor.] ...
+
+In 3.4.1(6/2), we have "... are referred to in this standard as ..." (note the
+lower case). This should be "in this document" (in all versions), and I propose
+to put that into AI12-0445-1 with the other uncategorized changes.
+
+****************************************************************
+
+From: Randy Brukardt
+Sent: Tuesday, May 24, 2022  12:41 AM
+
+Steve noticed that there are three occurrences of Hashed_Sets in the 
+Ordered_Set Stable subpackage. These are obviously wrong, I've added them to
+the AI12-0445-1 wording changes so that they'll be correct in Ada 2022. If
+there is any complaint (I can't imagine why), please speak up now.
+
+****************************************************************
+
+From: John Barnes
+Sent: Tuesday, May 24, 2022  2:05 AM
+
+Gosh. Isn't that annoying!! I should have noticed that. Sorry.
+
+****************************************************************
+
+From: Tucker Taft
+Sent: Tuesday, May 24, 2022  7:01 AM
+
+Good catch!
+
+****************************************************************
+
+From: Randy Brukardt
+Sent: Wednesday, May 25, 2022  12:44 AM
+
+It would have been a better catch if I had found it when I looked for problems 
+like this last year. I fixed a substantial number of such problems at that
+time, but I obviously missed this one.
+ 
+Unfortunately, compiling these specs with any existing compiler is a real pain 
+and thus I only did it for a few of the specs. One generally had to remove most
+of the new aspects and then provide some sort of dummy body to even get
+started. And then one had to decide whether an error was from the compiler or
+from the spec (it was about even at that time). It didn't matter much whose
+compiler I used for the task, thus it mostly didn't get done. (Tucker did test
+the syntax of all of these specs, so we did fix a bunch of those errors.) I
+wouldn't be surprised if there are some conflict problems or other visibility
+issues in some of these specs.
+
+****************************************************************
 

Questions? Ask the ACAA Technical Agent