Version 1.4 of ai12s/ai12-0183-1.txt

Unformatted version of ai12s/ai12-0183-1.txt version 1.4
Other versions for file ai12s/ai12-0183-1.txt

!standard 3.7.2(3/3)          17-04-06 AI12-0183-1/03
!standard 4.9(2)
!standard D.4(4)
!standard D.4(7/5)
!class presentation 16-03-23
!status Amendment 1-2012 16-03-23
!status work item 16-03-23
!status received 16-03-23
!priority Low
!difficulty Easy
!qualifier Omission
!subject Presentation errors in Ada 2012 post Corrigendum 1
!summary
This AI corrects minor errors in the Standard.
1) Add Ordered_FIFO_Queuing to D.4(4).
2) Be specific about which policy is defined in 9.5.3 and 9.7.1.
3) The header "Static Semantics" is missing from 4.9.
4) Define the type of the object Constrained attribute in 3.7.2.
!question
1) AI12-0163-1 defines policy Ordered_FIFO_Queuing. But the Legality Rule D.4(4) does not allow that as a policy name. Should it? (Yes.)
2) D.5(7/2) says "The rules for this policy are specified in 9.5.3 and 9.7.1." This paragraph defines three queuing policies. "This" in this text refers to that last one mentioned (I think), but that's ambiguious. Should we be specific here? (Yes.)
3) 4.9 does not have a Static Semantics portion; the entire section though paragraph 32 is not under any header (which represents introductory text). Only paragraph 1 appears to be introductory, should there be a Static Semantics portion in this subclause? (Yes.)
4) 3.7.2(3/3) says that the result of A'Constrained is either True or False, but it never gives the type of the attribute. Compare to T'Callable, which explicit says that the type of the attribute is Boolean. Should this be fixed? (Yes.)
!recommendation
(See Summary.)
!wording
[Editor's note: The following changes are included in the draft RM, even though it is not intended for the full ARG to take up this AI until just before the next document (a Revision?) is submitted to WG 9. This AI is only used to record wording changes that appear to the editor to be obvious improvements in the Standard.]
1) Modify D.4(4):
The policy_identifier shall be either FIFO_Queuing, {Ordered_FIFO_Queuing, }Priority_Queuing or an implementation-defined identifier.
2) Modify D.5(7/2) [as modified by AI12-0163]:
Three queuing policies, FIFO_Queuing, Ordered_FIFO_Queuing, and Priority_Queuing, are language defined. If no Queuing_Policy pragma applies to any of the program units comprising the partition, the queuing policy for that partition is FIFO_Queuing. The rules for {the FIFO_Queuing}[this] policy are specified in 9.5.3 and 9.7.1.
3) Add a "Static Semantics" header before 4.9(2).
4) Add to the end of 3.7.2(3/3):
The value of this attribute is of the predefined type Boolean.
!discussion
1) This is a clear omission from AI12-0163-1. Obviously, if we define a queuing policy, we have to allow it to be used in the Queuing_Policy pragma, else it would be the most useless Ada construct ever.
2) The other two queuing policies are defined in this subclause, so it's fairly obvious that "this" must refer to FIFO_Queuing. But it shouldn't be necessary to read the entire subclause in order to figure that out.
3) 4.9(2-32) are not introductory text, so they should be in some headed portion. Static Semantics seems appropriate for these rules. [Editor's note: The section was labeled Intro in the RM source files (.MSS) - separately from paragraph 1. This almost certainly was a cut-and-paste error where someone forgot to change the label in the @begin and @end.]
4) The type of this attribute has been missing since the earliest versions of Ada 9x (the author checked back to version 2.0 - which was the first version to have complete wording). Interestingly, the sentence giving the type was in the Ada 83 wording, so it was presumably lost in transcription.
The odd thing is that no one ever reported the mistake until 2017; that was just short of 24 years since it was made. That shows the difficulty of noting errors of omission.
!corrigendum 3.7.2(3)
Replace the paragraph:
A'Constrained
Yields the value True if A denotes a constant, a value, a tagged object, or a constrained variable, and False otherwise.
by:
A'Constrained
Yields the value True if A denotes a constant, a value, a tagged object, or a constrained variable, and False otherwise. The value of this attribute is of the predefined type Boolean.
!corrigendum 4.9(2)
Replace the paragraph:
A static expression is a scalar or string expression that is one of the following:
by:
Static Semantics
A static expression is a scalar or string expression that is one of the following:
!corrigendum D.4(4)
Replace the paragraph:
The policy_identifier shall be either FIFO_Queuing, Priority_Queuing or an implementation-defined identifier.
by:
The policy_identifier shall be either FIFO_Queuing, Ordered_FIFO_Queuing, Priority_Queuing or an implementation-defined identifier.
!corrigendum D.4(7/5)
Replace the paragraph:
Three queuing policies, FIFO_Queuing, Ordered_FIFO_Queuing, and Priority_Queuing, are language defined. If no Queuing_Policy pragma applies to any of the program units comprising the partition, the queuing policy for that partition is FIFO_Queuing. The rules for this policy are specified in 9.5.3 and 9.7.1.
by:
Three queuing policies, FIFO_Queuing, Ordered_FIFO_Queuing, and Priority_Queuing, are language defined. If no Queuing_Policy pragma applies to any of the program units comprising the partition, the queuing policy for that partition is FIFO_Queuing. The rules for the FIFO_Queuing policy are specified in 9.5.3 and 9.7.1.
!ASIS
No changes needed.
!ACATS test
No test needed.
!appendix

From: Randy Brukardt
Sent: Friday, February 10, 2017  5:55 PM

In researching a suggestion from Tucker, I happened to notice that 3.7.2(3/3)
does not give any type for the attribute Constrained. The text gives the
results as True and False, but no type. Contrast to 'Callable, for instance:

A'Constrained
Yields the value True if A denotes a constant, a value, a tagged object, or a
constrained variable, and False otherwise. 

T'Callable
Yields the value True when the task denoted by T is callable, and False
otherwise; a task is callable unless it is completed or abnormal. The value
of this attribute is of the predefined type Boolean.

We need the second sentence in A'Constrained.

In the absence of an objection, I'll put this into the presentation AI.

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

From: Jeff Cousins
Sent: Saturday, February 11, 2017  3:24 AM

OK

Sent from my HTC

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


Questions? Ask the ACAA Technical Agent