!standard 1.1.1(14) 21-03-17 AI12-0425-1/03 !standard 3.3.1(33/2) !standard 4.5.2(37/5) !standard 4.10(37/5) !standard 6.1.2(0/5) !standard 13.6(2) !standard J.15.8(1/3) !standard N(16) !standard N(22) !class presentation 21-03-02 !status Amendment 1-2012 21-03-02 !status ARG Approved 15-0-0 21-06-03 !status work item 21-03-02 !status received 20-03-02 !priority Low !difficulty Easy !qualifier Omission !subject Presentation issues from public review !summary Various wording issues were noted by reviewers of drafts of Draft 29. [Editor's note: These items are all added in the published Draft 29; these were discovered during the creation of that draft. This was done so that WG 9 review did not reraise these issues.] !question (1) J.15.8(1/3) has two "and"s. Additionally, the simplified form adopted by AI12-0417-1 would be better anyway. Should this be changed? (Yes.) (2) 13.6(2) says: To convert a record from one representation to another, two record types with a common ancestor type need to be declared, with no inherited subprograms. 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. AI12-0376-1 repealed the requirement that there be no inherited subprograms, so it seems wrong to mention that here. Additionally, various related rules have been changed over the years since this was written. Perhaps it should say something about tagged types and/or by-reference types. Should this wording be improved? (Yes.) (3) N(16) is not worded as a definition but simply states a property. Reword? (Yes.) (4) N(22) contains the odd phrase that a library unit "is always a package, subprogram, or generic unit". This seems better without the "always". Change this? (Yes.) (5) 4.5.2(35) says that the following examples are of expressions, but 4.5.2(37/5) contains an object declaration -- which is surely not an expression. Change this? (Yes.) (6) 4.10(37/5) says: If S is a composite subtype, the leading character of the image of a component value or index value is a space, and the immediately preceding character is an open parenthesis or bracket, then the space may be omitted. The same transformation is also permitted if the leading character of the component image is a space (in which case one of the two spaces may be omitted). It seems like the second sentence is wrong, and should be something more like The same transformation is also permitted if the immediately preceding character is a space (in which case one of the two spaces may be omitted). But we could combine the two sentences to simplify this. Should this be reworded? (Yes.) (7) There is a syntax section, not identified as such, mixed in the middle of the Global aspect definition. This is an unusual organization; could we organize this subclause more conventionally? (Yes.) (8) 1.1.1(14) should end with a semicolon (;) rather than a period (it is in the middle of a list. Fix this? (Yes.) !recommendation (1) Replace J.15.8(1/3) with: "The following pragmas are defined with the given forms:". (2) Updated 13.6(2) to mention untagged types, and remove the part about primitive subprograms. Update the AARM notes accordingly, including a mention of by-reference types. (It doesn't make sense to define by-reference types with different representations, so it isn't necessary to mention it in the RM.) (3) Replace with: "An elementary type is a type that does not have components." (4) Follow the suggestion in the question. (5) Add "A_String : constant String := "A";" to the end of 3.3.1(33/2). Then use A_String in the example 4.5.2(37/5). (6) Combine the two sentences. (7) Rearrange the start of 6.1.2. (8) The suggested change should be made. Interestingly, this is wrong in every version of Ada, going all the way back to version 3.0 of Ada 9x (1993) -- which is the first draft of Ada 9x that had wording for subclause 1.1.1. It has escaped every reviewer since then. !wording (1) Replace J.15.8(1/3): The form for pragmas Atomic, Volatile, Independent, Atomic_Components, and Volatile_Components, and Independent_Components is as follows: with: The following pragmas are defined with the given forms: (2) Modify 13.6(2): To convert {an untagged}[a] record from one representation to another, two record types with a common ancestor type need to be declared[, with no inherited subprograms]. 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. Replace AARM 13.6(2.a): AARM Ramification: The language does not allow implicit copying of by-reference types, so it also does not allow different representations of related by-reference types. Similarly, language rules prevent related tagged types from having different representations of the parent part. Therefore, this technique cannot be used for tagged or by-reference types. (3) Modify N(16): Elementary type. An elementary type {is a type that} does not have components. (4) Modify N(22): Library unit. A library unit is a separately compiled program unit, and is [always] a package, subprogram, or generic unit. (5) Add at the end of 3.3.1(33/2): A_String : constant String := "A"; Replace 4.5.2(37/5) with: A_String = "A" -- True (see 3.3.1) "" < A_String and A_String < "Aa" -- True A_String < "Bb" and A_String < "A " -- True (6) Replace 4.10(37/5): If S is a composite subtype, the leading character of the image of a component value or index value is a space, and the immediately preceding character is an open parenthesis or bracket, then the space may be omitted. The same transformation is also permitted if the leading character of the component image is a space (in which case one of the two spaces may be omitted). with: If S is a composite subtype, the leading character of the image M of a component value or index value is a space, and the immediately preceding character (if any) is an open parenthesis, open bracket, or space, then the leading space of the image M may be omitted. (7) Replace the start of 6.1.2 (down to the previous Static Semantics heading, which is deleted): The Global and Global'Class aspects of a program unit are used to identify the objects global to the unit that might be read or written during its execution. Syntax global_aspect_definition ::= null <> Name Resolution Rules A global_name shall resolve to statically denote an object or a package (including a limited view of a package). Static Semantics For a subprogram, an entry, an access-to-subprogram type, a task unit, a protected unit, or a library package or generic library package, the following language-defined aspect may be specified with an aspect_specification (see 13.1.1): Global The Global aspect shall be specified with a global_aspect_definition. The Global aspect identifies the set of variables (which, for the purposes of this clause, includes all constants except those which are known to have no variable views (see 3.3)) that are global to a callable entity or task body, and that are read or updated as part of the execution of the callable entity or task body. If specified for a protected unit, it refers to all of the protected operations of the protected unit. Constants of any type may also be mentioned in a Global aspect. If not specified or otherwise defined below, the aspect defaults to the Global aspect for the enclosing library unit if the entity is declared at library level, and to Unspecified otherwise. If not specified for a library unit, the aspect defaults to Global => null for a library unit that is declared Pure, and to Global => Unspecified otherwise. For a dispatching subprogram, the following language-defined aspect may be specified with an aspect_specification (see 13.1.1): Global'Class The Global'Class aspect shall be specified with a global_aspect_definition. This aspect identifies an upper bound on the set of variables global to a dispatching operation that can be read or updated as a result of a dispatching call on the operation. If not specified, the aspect defaults to the Global aspect for the dispatching subprogram. Together, we refer to the Global and Global'Class aspects as global aspects. <> (8) 1.1.1(14) should end with a semicolon (;) rather than a period. !discussion (See !recommendation.) !corrigendum 1.1.1(14) @drepl @xbullet @dby @xbullet !corrigendum 3.3.1(33/2) @drepl @xcode Integer := 10_000; Low_Limit : @b Integer := Limit/10; Tolerance : @b Real := Dispersion(1.15); Hello_Msg : @b String := Hello'Access; --@ft<@i< see 3.10.2>>> @dby @xcode Integer := 10_000; Low_Limit : @b Integer := Limit/10; Tolerance : @b Real := Dispersion(1.15); A_String : @b String := "A"; Hello_Msg : @b String := Hello'Access; -- @ft<@i>> !corrigendum 4.5.2(37) @drepl @xcode<"" < "A" @b "A" < "Aa" --@ft<@i< True>> "Aa" < "B" @b "A" < "A " --@ft<@i< True>>> @dby @xcode> "" < A_String @b A_String < "Aa" --@ft<@i< True>> A_String < "Bb" @b A_String < "A " --@ft<@i< True>>> !corrigendum 4.10(0) @dinsc ** Force a conflict; the actual changes are in the conflict file. ** !corrigendum 6.1.2(0) @dinsc ** Force a conflict; the actual changes are in the conflict file. ** !corrigendum 13.6(2) @drepl To convert a record from one representation to another, two record types with a common ancestor type need to be declared, with no inherited subprograms. 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 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. !corrigendum J.15.8(1/3) @drepl The form for @fas Atomic, Volatile, Independent, Atomic_Components, and Volatile_Components, and Independent_Components is as follows: @dby The following @fas are defined with the given forms: !ASIS No ASIS effect. !ACATS test No ACATS tests should be needed, none of these changes change any semantics. !appendix Editor's note, March 2, 2021. In working on AI12-0417-1, it was noticed that J.15.8(1/3) contained an extra "and". Moreover, Tucker thought it was grammetrically incorrect. We used a simplified form in AI12-0417-1, and that form should be used in J.15.8(1/3) for consistency and to correct the noted issues. **************************************************************** From an informal RM review from John Barnes (March 8, 2021) 4.5.2(37/5) its not an expression. perhaps make it a comment 6.1.2(2/5) strange layout, usually a central heading for syntax N(16) elementary type not really a definition but simply stating a property. Better to say An elementary type is a type that does not have components N(22) library unit “is always” is a bit strange. maybe delete always. **************************************************************** From some private mail from Steve Baird: In 4.10 (Image attributes), this looks wrong to me: > If S is a composite subtype, the leading character of the image of a > component value or index value is a space, and the immediately preceding > character is an open parenthesis or bracket, then the space may be omitted. > The same transformation is also permitted if the leading character of the > component image is a space (in which case one of the two spaces may be > omitted). It seems like the second sentence is wrong, and should be something more like The same transformation is also permitted if the immediately preceding character is a space (in which case one of the two spaces may be omitted). But if we are going to do that, then perhaps replace the entire paragraph with If S is a composite subtype, the leading character of the image of a component value or index value is a space, and the immediately preceding character (if any) is an open parenthesis, bracket, or space, then the leading space of the image may be omitted. [Editor's note: some wordsmithing followed, resulting in the proposed wording change.] **************************************************************** From an informal RM review from John Barnes (March 17, 2021) 1.1.1(14) Ends with period should be semicolon. Wrong in 2012 also. ****************************************************************