!standard 3.7.2(3/3) 18-08-31 AI12-0183-1/07 !standard 4.9(2) !standard 5.5.2(5/5) !standard 8.3(12.3/2) !standard 12.6(8.2/2) !standard D.4(4) !standard D.4(7/5) !standard E.4(17) !class presentation 16-03-23 !status Amendment 1-2012 16-03-23 !status ARG Approved 11-0-1 18-06-22 !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. 5) Drop the redundant words in 5.5.2(5/5). 6) Clarify 8.3(12.3/2) as conformance applies to profiles, not subprograms. 7) E.4(17) ought to reference 9.5, not 9.5.1. 8) 12.6(8.2/2) should say subprogram rather than object. !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.4(7/5) 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 explicitly says that the type of the attribute is Boolean. Should this be fixed? (Yes.) 5) 5.5.2(5/5) starts: "The subtype defined by the loop_parameter_subtype_indication, if any, of a generalized iterator component iterator shall statically match ..." There's no such thing as a "generalized iterator component iterator". Was just "generalized iterator" meant here? (Yes.) 6) 8.3(12.3/2) says that "they fully conform", but full conformance applies to profiles, not subprograms. Should this wording be clarified? (Yes.) 7) E.4(17) says "All forms of remote subprogram calls are potentially blocking operations (see 9.5.1)." But the definition of "potentially blocking" was moved to 9.5. The reference ought to be changed, right? (Yes.) 8) 12.6(8.2/2) starts: * if the actual matching the formal_subprogram_declaration denotes a generic formal object of another generic unit G ... But a formal object never matches a formal subprogram. Is this supposed to say "subprogram" rather than "object"? (Yes.) !recommendation (See Summary.) !wording 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.4(7/5) [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. 5) Modify 5.5.2(5/5): The subtype defined by the loop_parameter_subtype_indication, if any, of a generalized iterator [component iterator] shall statically match ... 6) Modify 8.3(12.3/2): * Otherwise (all are null procedures, abstract subprograms, or require overriding), then any null procedure overrides all abstract subprograms and all subprograms that require overriding; if more than one such homograph remains that is not thus overridden, then if {the profiles of the remaining homographs}[they] are all fully conformant with one another, one is chosen arbitrarily; if not, they are all hidden from all visibility. 7) Modify E.4(17): All forms of remote subprogram calls are potentially blocking operations (see {9.5}[9.5.1]). 8) Modify 12.6(8.2/2): * if the actual matching the formal_subprogram_declaration denotes a generic formal {subprogram}[object] of another generic unit G, and the instantiation containing the actual [that] occurs within the body of a generic unit G or within the body of a generic unit declared within the declarative region of the generic unit G, then the corresponding parameter or result type of the formal subprogram of G shall have a null_exclusion; !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 (version 2.0 was dated March 29, 1993). That shows the difficulty of noting errors of omission. We treat this as a presentation issue, as the results of "True" and "False" imply type Boolean as there is no other language-defined type with those literals, and it doesn't make sense for any user-defined type that happens to be around to be used as the result type of a language-defined attribute. 5) There are three kinds of iterators defined in 5.5.2, "generalized iterators", "array component iterators", and "container element iterators". Each sentence in 5.5.2(5/5) gives a rule for one kind of these iterators, so it is clear that there are extra words in the first sentence - especially as no kind of iterator includes the word "iterator" twice. 6) It's clear that "fully conform" applies to the profile of the subprograms involved, so we just change the working to say that. [Note: The question comes from the discussion of AI12-0064-2 during the Lexington ARG meeting in October 2017.] 7) The reference clearly ought to be corrected. 8) This is clearly a cut-and-paste error; there is a very similar rule in 12.4 for formal objects and it appears too much was copied. There'd be no reason for a rule that starts "if False then", so we conclude that "subprogram" had to be intended. A respondent noted that there is also an extra "that" in the paragraph. !corrigendum 3.7.2(3) @drepl @xhang<@xterm Yields the value True if A denotes a constant, a value, a tagged object, or a constrained variable, and False otherwise.> @dby @xhang<@xterm 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) @drepl A static expression is a scalar or string expression that is one of the following: @dby @s8<@i> A static expression is a scalar or string expression that is one of the following: !corrigendum 5.5.2(5/5) @drepl The subtype defined by the @fa, if any, of a generalized iterator component iterator shall statically match the iteration cursor subtype. The subtype defined by the @fa, if any, of an array component iterator shall statically match the component subtype of the type of the @i@fa. The subtype defined by the @fa, if any, of a container element iterator shall statically match the default element subtype for the type of the @i@fa. @dby The subtype defined by the @fa, if any, of a generalized iterator shall statically match the iteration cursor subtype. The subtype defined by the @fa, if any, of an array component iterator shall statically match the component subtype of the type of the @i@fa. The subtype defined by the @fa, if any, of a container element iterator shall statically match the default element subtype for the type of the @i@fa. !corrigendum 8.3(12.3/3) @drepl @xbullet