Version 1.6 of ais/ai-00434.txt

Unformatted version of ais/ai-00434.txt version 1.6
Other versions for file ais/ai-00434.txt

!standard C.3 (23)          05-11-22 AI95-00434/03
!standard C.3 (26)
!standard C.3 (28)
!standard C.3.1 (07)
!standard C.3.1 (11)
!standard C.3.1 (16)
!standard C.3.1 (23)
!standard C.3.2 (22)
!standard C.7.2 (20)
!standard C.7.2 (26)
!standard C.7.2 (30)
!standard C.7.2 (33)
!standard 7.1 (05)
!standard 7.1 (06)
!standard 11.5 (13)
!standard 12.1 (08)
!standard A (03)
!standard A.1 (11)
!standard A.1 (20)
!standard A.5.2 (53)
!standard C.2 (01)
!standard F (05)
!standard F.3 (18)
!standard G.1.1 (26)
!standard G.1.2 (02)
!standard G.1.2 (41)
!standard G.1.3 (28)
!standard G.2.6 (6)
!standard G.2.6 (13)
!standard H.1 (5)
!standard H.1 (6)
!standard H.3.2 (5)
!class presentation 05-08-17
!status Amendment 200Y 05-08-17
!status WG9 Approved 06-06-09
!status ARG Approved 10-0-0 05-11-19
!status work item 05-08-17
!status received 05-08-17
!priority High
!difficulty Easy
!subject More presentation changes to the Standard
!summary
This AI corrects some minor errors noted in the Standard.
!question
1) In C.3(23), "whose one of its subprograms" makes no sense.
2) In C.3(26), the text says "subclause", but it really is intended to cover the rules of all of C.3, C.3.1, and C.3.2. So it should say "clause". Also, the second comma is extra.
3) In C.3.1(11), "that either" doesn't parse.
4) In C.3.1(7), "library level" should have a hyphen.
5) Metrics should be bullets, but C.3.1(16) isn't one. Also, "worst case" should have a hyphen.
6) In C.3.1(23), "that one of its procedures" doesn't parse.
7) The comma in C.3.2(22) is unecessary and makes the sentence hard to read.
8) There is a comma missing in C.3.2(24).
9) The description of the metrics in C.7.2(20) is somewhat confused.
10) C.7.2(26) should end with a semicolon.
11) C.7.2(33) [a note] references C.7.1, but the rule it is talking about is C.7.2(15).
12) 3.2.1(10) says that "universal_integer" is a predefined type, and certainly implies that "universal_float" is as well. Why doesn't A.1(11) and A.1(20) say that?
13) In A(3), "language defined" should have a hyphen.
14) There should be a comma before "or" in 12.1(8).
15) In 11.5(13), "rem" and "mod" should be in boldface.
16) In C.2(1), "implementation's support" is a possessive and weirdly worded.
17) In C.3(28) "a finer-grain control" is odd.
18) In C.7.2(30), "task's attributes" is confusing, does it make "task attributes" or does it mean "attributes of a task"?
19) In G.1.2(2), "pragma" should be in boldface in "pragma Pure".
20) In A.5.2(53), there is an extra right paren.
21) This list of items in F(5) isn't in any logical order (neither section nor alphabetical order).
22) The currency symbol "FF" is obsolete (in F.3(18)).
23) G.1.2(41) is confused; it needs to somehow say "When the parameter X has the value 1.0, ..."
24) G.1.3(28) should say "file" rather than "line" terminator.
25) In G.2.6(13), "takes precedence to" is strange.
26) In H.1(5 and 6), subtypes may have more than one initial value.
27) In H.3.2(5), objects are "visible".
28) Table numbers are missing from Annex G tables.
29) In 7.1(5-6), there are no declarative_items in a package spec.
30) "Cartesian" should be capitalized in G.1.1(26).
!recommendation
(See summary.)
!wording
(See corrigendum.)
!discussion
1) "whose" should be "for which".
2) Yes, all three subcluases are covered, and the wording should be "clause".
3) "that" should be "for which". Also, there should be a comma before "then".
4) "library-level" should have a hyphen when used as an adjective, not as a noun (as in AARM C.3.1(7.a)).
5) Yes, this should be a bullet.
6) Reorganize the start of the sentence to read: "A protected object that has a (protected) procedure attached to an interrupt should have a ceiling priority at least as high..."
7) Remove the comma.
8) Add the comma.
9) "...execute {at}[in] a sufficiently high priority...".
"...the Attribute type shall be a scalar {type} whose size is equal to the size of the predefined [integer size] {type Integer}."
10) Yes, this should end with a semicolon (its not the last bullet).
11) Yes, and since this note is completely redundant with an explicit rule given in this section, it should be deleted.
12) A.1(11) and A.1(20) should say that those types are predefined.
13) "language-defined" should have a hyphen when used as an adjective.
14) Add the comma.
15) Put them in boldface.
16) Drop "implementation's".
17) Replace "a finer-grain" with "finer-grained".
18) It means "attributes of a task".
19) Keywords in program text should always be in boldface.
20) Delete the last right paren.
21) Put the items into section order.
22) Replace "FF" by "kr" (Danish), as that is still in use and doesn't require changing the examples.
23) There are two ways to do this: Make the second half of 38 and 41 subbullets, and make 39 and 40 subsubbullets, or duplicate the text in 41. We chose the latter as the former is a lot of change that isn't much clearer.
24) A.10.9(28) uses file terminator for this; the rules ought to match.
25) This should be "takes precedence over".
26) Make "values" plural in both paragraphs.
27) Declarations are visible, add "the declaration of".
28) ISO requires that the tables be numbered. Moreover, the ones in Annex F are numbered. So we add numbers to the Annex G tables, and change the references to the use the numbers.
29) These should say "basic_declarative_items".
30) Yes, capitalize "Cartesian".
!corrigendum 7.1(05)
Replace the paragraph:
A package_declaration or generic_package_declaration requires a completion (a body) if it contains any declarative_item that requires a completion, but whose completion is not in its package_specification.
by:
A package_declaration or generic_package_declaration requires a completion (a body) if it contains any basic_declarative_item that requires a completion, but whose completion is not in its package_specification.
!corrigendum 7.1(06)
Replace the paragraph:
The first list of declarative_items of a package_specification of a package other than a generic formal package is called the visible part of the package. The optional list of declarative_items after the reserved word private (of any package_specification) is called the private part of the package. If the reserved word private does not appear, the package has an implicit empty private part.
by:
The first list of basic_declarative_items of a package_specification of a package other than a generic formal package is called the visible part of the package. The optional list of basic_declarative_items after the reserved word private (of any package_specification) is called the private part of the package. If the reserved word private does not appear, the package has an implicit empty private part.
!corrigendum 11.5(13)
Replace the paragraph:
Division_Check
Check that the second operand is not zero for the operations /, rem and mod.
by:
Division_Check
Check that the second operand is not zero for the operations /, rem and mod.
!corrigendum 12.1(08)
Replace the paragraph:
A generic_declaration declares a generic unit — a generic package, generic procedure or generic function, as appropriate.
by:
A generic_declaration declares a generic unit — a generic package, generic procedure, or generic function, as appropriate.
!corrigendum A(03)
Replace the paragraph:
The implementation shall ensure that each language defined subprogram is reentrant in the sense that concurrent calls on the same subprogram perform as specified, so long as all parameters that could be passed by reference denote nonoverlapping objects.
by:
The implementation shall ensure that each language-defined subprogram is reentrant in the sense that concurrent calls on the same subprogram perform as specified, so long as all parameters that could be passed by reference denote nonoverlapping objects.
!corrigendum A.01(11)
Replace the paragraph:
-- The integer type root_integer is predefined. -- The corresponding universal type is universal_integer.
by:
-- The integer type root_integer and the -- corresponding universal type universal_integer are predefined.
!corrigendum A.01(20)
Replace the paragraph:
-- The floating point type root_real is predefined. -- The corresponding universal type is universal_real.
by:
-- The floating point type root_real and the -- corresponding universal type universal_real are predefined.
!corrigendum A.05.02(53)
Replace the paragraph:
-Log(Random(G) + Float'Model_Small))
by:
-Log(Random(G) + Float'Model_Small)
!corrigendum C.02(01)
Replace the paragraph:
This clause specifies minimal requirements on the implementation's support for representation items and related features.
by:
This clause specifies minimal requirements on the support for representation items and related features.
!corrigendum C.03(23)
Replace the paragraph:
If the underlying system or hardware does not allow interrupts to be blocked, then no blocking is required as part of the execution of subprograms of a protected object whose one of its subprograms is an interrupt handler.
by:
If the underlying system or hardware does not allow interrupts to be blocked, then no blocking is required as part of the execution of subprograms of a protected object for which one of its subprograms is an interrupt handler.
!corrigendum C.03(26)
Replace the paragraph:
Other forms of handlers are allowed to be supported, in which case, the rules of this subclause should be adhered to.
by:
Other forms of handlers are allowed to be supported, in which case the rules of this clause should be adhered to.
!corrigendum C.03(28)
Replace the paragraph:
If the Ceiling_Locking policy is not in effect, the implementation should provide means for the application to specify which interrupts are to be blocked during protected actions, if the underlying system allows for a finer-grain control of interrupt blocking.
by:
If the Ceiling_Locking policy is not in effect, the implementation should provide means for the application to specify which interrupts are to be blocked during protected actions, if the underlying system allows for finer-grained control of interrupt blocking.
!corrigendum C.03.01(7)
Replace the paragraph:
The Attach_Handler pragma is only allowed immediately within the protected_definition where the corresponding subprogram is declared. The corresponding protected_type_declaration or single_protected_declaration shall be a library level declaration.
by:
The Attach_Handler pragma is only allowed immediately within the protected_definition where the corresponding subprogram is declared. The corresponding protected_type_declaration or single_protected_declaration shall be a library-level declaration.
!corrigendum C.03.01(11)
Replace the paragraph:
If the Ceiling_Locking policy (see D.3) is in effect then upon the initialization of a protected object that either an Attach_Handler or Interrupt_Handler pragma applies to one of its procedures, a check is made that the ceiling priority defined in the protected_definition is in the range of System.Interrupt_Priority. If the check fails, Program_Error is raised.
by:
If the Ceiling_Locking policy (see D.3) is in effect, then upon the initialization of a protected object for which either an Attach_Handler or Interrupt_Handler pragma applies to one of its procedures, a check is made that the ceiling priority defined in the protected_definition is in the range of System.Interrupt_Priority. If the check fails, Program_Error is raised.
!corrigendum C.03.01(16)
Replace the paragraph:
1. The worst case overhead for an interrupt handler that is a parameterless protected procedure, in clock cycles. This is the execution time not directly attributable to the handler procedure or the interrupted execution. It is estimated as C – (A+B), where A is how long it takes to complete a given sequence of instructions without any interrupt, B is how long it takes to complete a normal call to a given protected procedure, and C is how long it takes to complete the same sequence of instructions when it is interrupted by one execution of the same procedure called via an interrupt.
by:
!corrigendum C.03.01(23)
Replace the paragraph:
5 The ceiling priority of a protected object that one of its procedures is attached to an interrupt should be at least as high as the highest processor priority at which that interrupt will ever be delivered.
by:
5 A protected object that has a (protected) procedure attached to an interrupt should have a ceiling priority at least as high as the highest processor priority at which that interrupt will ever be delivered.
!corrigendum C.03.02(22)
Replace the paragraph:
The Reference function returns a value of type System.Address that can be used to attach a task entry, via an address clause (see J.7.1) to the interrupt specified by Interrupt. This function raises Program_Error if attaching task entries to interrupts (or to this particular interrupt) is not supported.
by:
The Reference function returns a value of type System.Address that can be used to attach a task entry via an address clause (see J.7.1) to the interrupt specified by Interrupt. This function raises Program_Error if attaching task entries to interrupts (or to this particular interrupt) is not supported.
!corrigendum C.03.02(24)
Replace the paragraph:
If the Ceiling_Locking policy (see D.3) is in effect the implementation shall document the default ceiling priority assigned to a protected object that contains either the Attach_Handler or Interrupt_Handler pragmas, but not the Interrupt_Priority pragma. This default need not be the same for all interrupts.
by:
If the Ceiling_Locking policy (see D.3) is in effect, the implementation shall document the default ceiling priority assigned to a protected object that contains either the Attach_Handler or Interrupt_Handler pragmas, but not the Interrupt_Priority pragma. This default need not be the same for all interrupts.
!corrigendum C.07.02(20)
Replace the paragraph:
The implementation shall document the following metrics: A task calling the following subprograms shall execute in a sufficiently high priority as to not be preempted during the measurement period. This period shall start just before issuing the call and end just after the call completes. If the attributes of task T are accessed by the measurement tests, no other task shall access attributes of that task during the measurement period. For all measurements described here, the Attribute type shall be a scalar whose size is equal to the size of the predefined integer size. For each measurement, two cases shall be documented: one where the accessed attributes are of the calling task (that is, the default value for the T parameter is used), and the other, where T identifies another, non-terminated, task.
by:
The implementation shall document the following metrics: A task calling the following subprograms shall execute at a sufficiently high priority as to not be preempted during the measurement period. This period shall start just before issuing the call and end just after the call completes. If the attributes of task T are accessed by the measurement tests, no other task shall access attributes of that task during the measurement period. For all measurements described here, the Attribute type shall be a scalar type whose size is equal to the size of the predefined type Integer. For each measurement, two cases shall be documented: one where the accessed attributes are of the calling task (that is, the default value for the T parameter is used), and the other, where T identifies another, non-terminated, task.
!corrigendum C.07.02(26)
Replace the paragraph:
by:
!corrigendum C.07.02(30)
Replace the paragraph:
Some implementations are targeted to domains in which memory use at run time must be completely deterministic. For such implementations, it is recommended that the storage for task attributes will be pre-allocated statically and not from the heap. This can be accomplished by either placing restrictions on the number and the size of the task's attributes, or by using the pre-allocated storage for the first N attribute objects, and the heap for the others. In the latter case, N should be documented.
by:
Some implementations are targeted to domains in which memory use at run time must be completely deterministic. For such implementations, it is recommended that the storage for task attributes will be pre-allocated statically and not from the heap. This can be accomplished by either placing restrictions on the number and the size of the attributes of a task, or by using the pre-allocated storage for the first N attribute objects, and the heap for the others. In the latter case, N should be documented.
!corrigendum C.07.02(33)
Delete the paragraph:
14 As specified in C.7.1, if the parameter T (in a call on a subprogram of an instance of this package) identifies a nonexistent task, the execution of the program is erroneous.
!corrigendum F(5)
Replace the paragraph:
See also: 3.5.9, "Fixed Point Types"; 3.5.10, "Operations of Fixed Point Types"; 4.6, "Type Conversions"; 13.3, "Operational and Representation Attributes"; A.10.9, "Input-Output for Real Types"; B.4, "Interfacing with COBOL"; B.3, "Interfacing with C and C++"; Annex G, "Numerics".
by:
See also: 3.5.9, "Fixed Point Types"; 3.5.10, "Operations of Fixed Point Types"; 4.6, "Type Conversions"; 13.3, "Operational and Representation Attributes"; A.10.9, "Input-Output for Real Types"; B.3, "Interfacing with C and C++"; B.4, "Interfacing with COBOL"; Annex G, "Numerics".
!corrigendum F.3(18)
Replace the paragraph:
An example of a picture String is "<###Z_ZZ9.99>". If the currency string is "FF", the separator character is ',', and the radix mark is '.' then the edited output string values for the decimal values 32.10 and –5432.10 are "bbFFbbb32.10b" and "(bFF5,432.10)", respectively, where 'b' indicates the space character.
by:
An example of a picture String is "<###Z_ZZ9.99>". If the currency string is "kr", the separator character is ',', and the radix mark is '.' then the edited output string values for the decimal values 32.10 and –5432.10 are "bbkrbbb32.10b" and "(bkr5,432.10)", respectively, where 'b' indicates the space character.
!corrigendum G.01.01(26)
Replace the paragraph:
Complex is a visible type with cartesian components.
by:
Complex is a visible type with Cartesian components.
!corrigendum G.01.01(56)
Replace the paragraph:
Implementations may obtain the result of exponentiation of a complex or pure-imaginary operand by repeated complex multiplication, with arbitrary association of the factors and with a possible final complex reciprocation (when the exponent is negative). Implementations are also permitted to obtain the result of exponentiation of a complex operand, but not of a pure-imaginary operand, by converting the left operand to a polar representation; exponentiating the modulus by the given exponent; multiplying the argument by the given exponent; and reconverting to a cartesian representation. Because of this implementation freedom, no accuracy requirement is imposed on complex exponentiation (except for the prescribed results given above, which apply regardless of the implementation method chosen).
by:
Implementations may obtain the result of exponentiation of a complex or pure-imaginary operand by repeated complex multiplication, with arbitrary association of the factors and with a possible final complex reciprocation (when the exponent is negative). Implementations are also permitted to obtain the result of exponentiation of a complex operand, but not of a pure-imaginary operand, by converting the left operand to a polar representation; exponentiating the modulus by the given exponent; multiplying the argument by the given exponent; and reconverting to a Cartesian representation. Because of this implementation freedom, no accuracy requirement is imposed on complex exponentiation (except for the prescribed results given above, which apply regardless of the implementation method chosen).
!corrigendum G.01.02(2)
Replace the paragraph:
with Ada.Numerics.Generic_Complex_Types; generic with package Complex_Types is new Ada.Numerics.Generic_Complex_Types (<>); use Complex_Types; package Ada.Numerics.Generic_Complex_Elementary_Functions is pragma Pure(Generic_Complex_Elementary_Functions);
by:
with Ada.Numerics.Generic_Complex_Types; generic with package Complex_Types is new Ada.Numerics.Generic_Complex_Types (<>); use Complex_Types; package Ada.Numerics.Generic_Complex_Elementary_Functions is pragma Pure(Generic_Complex_Elementary_Functions);
!corrigendum G.01.02(41)
Replace the paragraph:
by:
!corrigendum G.01.03(28)
Replace the paragraph:
Reads a complex value from the beginning of the given string, following the same rule as the Get procedure that reads a complex value from a file, but treating the end of the string as a line terminator. Returns, in the parameter Item, the value of type Complex that corresponds to the input sequence. Returns in Last the index value such that From(Last) is the last character read.
by:
Reads a complex value from the beginning of the given string, following the same rule as the Get procedure that reads a complex value from a file, but treating the end of the string as a file terminator. Returns, in the parameter Item, the value of type Complex that corresponds to the input sequence. Returns in Last the index value such that From(Last) is the last character read.
!corrigendum G.02.04(11)
Replace the paragraph:
The prescribed results specified in A.5.1 for certain functions at particular parameter values take precedence over the maximum relative error bounds; effectively, they narrow to a single value the result interval allowed by the maximum relative error bounds. Additional rules with a similar effect are given by the table below for the inverse trigonometric functions, at particular parameter values for which the mathematical result is possibly not a model number of EF.Float_Type (or is, indeed, even transcendental). In each table entry, the values of the parameters are such that the result lies on the axis between two quadrants; the corresponding accuracy rule, which takes precedence over the maximum relative error bounds, is that the result interval is the model interval of EF.Float_Type associated with the exact mathematical result given in the table.
by:
The prescribed results specified in A.5.1 for certain functions at particular parameter values take precedence over the maximum relative error bounds; effectively, they narrow to a single value the result interval allowed by the maximum relative error bounds. Additional rules with a similar effect are given by table G-1 for the inverse trigonometric functions, at particular parameter values for which the mathematical result is possibly not a model number of EF.Float_Type (or is, indeed, even transcendental). In each table entry, the values of the parameters are such that the result lies on the axis between two quadrants; the corresponding accuracy rule, which takes precedence over the maximum relative error bounds, is that the result interval is the model interval of EF.Float_Type associated with the exact mathematical result given in the table.
!corrigendum G.02.06(06)
Replace the paragraph:
The error bounds for particular complex functions are tabulated below. In the table, the error bound is given as the coefficient of CT.Real'Model_Epsilon.
by:
The error bounds for particular complex functions are tabulated in table G-2. In the table, the error bound is given as the coefficient of CT.Real'Model_Epsilon.
!corrigendum G.02.06(13)
Replace the paragraph:
The amount by which a component of the result of an inverse trigonometric or inverse hyperbolic function is allowed to spill over into a quadrant adjacent to the one corresponding to the principal branch, as given in G.1.2, is limited. The rule is that the result belongs to the smallest model interval of CT.Real that contains both boundaries of the quadrant corresponding to the principal branch. This rule also takes precedence to the maximum error bounds, effectively narrowing the result interval allowed by them.
by:
The amount by which a component of the result of an inverse trigonometric or inverse hyperbolic function is allowed to spill over into a quadrant adjacent to the one corresponding to the principal branch, as given in G.1.2, is limited. The rule is that the result belongs to the smallest model interval of CT.Real that contains both boundaries of the quadrant corresponding to the principal branch. This rule also takes precedence over the maximum error bounds, effectively narrowing the result interval allowed by them.
!corrigendum H.01(05)
Replace the paragraph:
If a pragma Normalize_Scalars applies, the implementation shall document the implicit initial value for scalar subtypes, and shall identify each case in which such a value is used and is not an invalid representation.
by:
If a pragma Normalize_Scalars applies, the implementation shall document the implicit initial values for scalar subtypes, and shall identify each case in which such a value is used and is not an invalid representation.
!corrigendum H.01(06)
Replace the paragraph:
Whenever possible, the implicit initial value for a scalar subtype should be an invalid representation (see 13.9.1).
by:
Whenever possible, the implicit initial values for a scalar subtype should be an invalid representation (see 13.9.1).
!corrigendum H.03.02(05)
Replace the paragraph:
An inspection point is a point in the object code corresponding to the occurrence of a pragma Inspection_Point in the compilation unit. An object is inspectable at an inspection point if the corresponding pragma Inspection_Point either has an argument denoting that object, or has no arguments and the object is visible at the inspection point.
by:
An inspection point is a point in the object code corresponding to the occurrence of a pragma Inspection_Point in the compilation unit. An object is inspectable at an inspection point if the corresponding pragma Inspection_Point either has an argument denoting that object, or has no arguments and the declaration of the object is visible at the inspection point.
!ACATS test
None needed.
!appendix

From: John Barnes
Sent: Monday, September 12, 2005  3:33 AM

In G.1.2(2) pragma is not in bold. (Generic_Complex_Elementary_Functions)

****************************************************************

From: Dan Eilers
Sent: Tuesday, August 23, 2005  7:28 PM

There are unmatched right parens in RM 9.11(3/2),
RM A.18.2(153/2), RM A.5.2(53), and AARM G.3.2(161.b/2).

****************************************************************


Questions? Ask the ACAA Technical Agent