AI22-0105-1
!standard 1.1.3(16/5) 24-08-02 AI22-0105-1/03
!standard 1.1.3(17/3)
!standard 1.1.3(17.1/5)
!status Amendment 1-2022 24-05-02
!status WG9 Approved 24-10-10
!status ARG Approved 12-0-2 24-05-02
!class binding interpretation 24-04-25
!status work item 24-04-25
!status received 24-03-18
!submitter Randy Brukardt
!priority Low
!difficulty Easy
!qualifier Clarification
!subject Meaning of conforms to this Reference Manual
Conforming fully to the Reference Manual includes fully conforming to the core of the language. It is possible to partially conform to the Reference Manual.
AI22-0065-1 redefined the meaning of conformance in order to eliminate the optionality from Specialized Needs Annexes (necessary to keep the annexes normative). However, we did not update the associated AARM notes. That must be done.
(See Summary.)
Modify 1.1.3(16/5) [This includes the changes of AI22-0065-1]:
An implementation that {fully} conforms to [this]{the core of this} Reference Manual shall support each capability required by the core language {(see 1.1.2),} as specified. [In addition, an implementation that conforms to this Reference Manual may conform to one or more Specialized Needs Annexes (or to none). ] [C]{Full c}onformance to a Specialized Needs Annex means that each capability required by the Annex shall be provided as specified.
Modify 1.1.3(17/3) [This includes the changes of AI22-0065-1]:
An implementation conforming{, either in full or in part,} to this Reference Manual may provide additional aspects, attributes, library units, and pragmas. However, it shall not provide any aspect, attribute, library unit, or pragma having the same name as an aspect, attribute, library unit, or pragma (respectively) specified in {the core or} a Specialized Needs Annex unless the provided construct is either as specified in [the Specialized Needs Annex]{this Reference Manual} or is more limited in capability than that required by [the Annex]{this Reference Manual}. A program that attempts to use an unsupported capability [of an Annex] shall either be identified by the implementation before run time or shall raise an exception at run time.
Modify AARM 1.1.3(17.a):
The last sentence of the preceding paragraph defines what an implementation is allowed to do when it does not "conform" to [a Specialized Needs Annex]{some part of this Reference Manual}. In particular, the sentence forbids {partial} implementations from providing a construct with the same name as a corresponding construct in [a Specialized Needs Annex]{the Reference Manual} but with a different syntax ([e.g.]{for instance}, an extended syntax) or quite different semantics. The phrase concerning "more limited in capability" is intended to give permission to provide a partial implementation, such as not implementing a subprogram in a package or having a restriction not permitted by an implementation that conforms to the [Annex]{Reference Manual}. For example, a partial implementation of the package Ada.Decimal might have Decimal.Max_Decimal_Digits as 15 (rather than the required 18). This allows a partial implementation to grow to a fully conforming implementation.
Modify AARM 1.1.3(17.b):
A restricted implementation might be restricted by not providing some subprograms specified in one of the packages defined by [an Annex]{the Reference Manual}. In this case, a program that tries to use {a}[the] missing subprogram will usually fail to compile. Alternatively, the implementation might declare {a}[the] subprogram as abstract, so it cannot be called. Alternatively, a subprogram body might be implemented just to raise Program_Error. The advantage of this approach is that a program to be run under a fully conforming [Annex ]implementation can be checked syntactically and semantically under an implementation that only partially supports the [Annex]{Reference Manual}. Finally, an implementation might provide a package declaration without the corresponding body, so that programs can be compiled, but partitions cannot be built and executed.
Modify 1.1.3(17.1/5):
[For an implementation that conforms to this Reference Manual, the]{A conforming} implementation of a language-defined unit shall abide by all postconditions, type invariants, and default initial conditions specified for the unit by this document (see 11.4.2).
The original wording had subtly different meanings for "conforming to the core of the language" and "conforming to the Reference Manual". That was too subtle for one of the authors of this AI, and was likely to be confusing to any reader.
Therefore, we reword to be more explicit about "fully" conforming to the core or a Specialized Needs Annex. And we clarify that an implementation that claims conformance to any part of the Reference Manual is subject to the restrictions of 1.1.3(17/6) and 1.1.3(17.1/6).
@drepl
An implementation that conforms to this Reference Manual shall support each capability required by the core language as specified. In addition, an implementation that conforms to this Reference Manual may conform to one or more Specialized Needs Annexes (or to none). Conformance to a Specialized Needs Annex means that each capability required by the Annex shall be provided as specified.
@dby
An implementation that fully conforms to the @i{core} of this Reference Manual shall support each capability required by the core language (see @ref{1.1.2}), as specified. Full conformance to a Specialized Needs Annex means that each capability required by the Annex shall be provided as specified.
@drepl
An implementation conforming to this Reference Manual may provide additional aspects, attributes, library units, and pragmas. However, it shall not provide any aspect, attribute, library unit, or pragma having the same name as an aspect, attribute, library unit, or pragma (respectively) specified in a Specialized Needs Annex unless the provided construct is either as specified in the Specialized Needs Annex or is more limited in capability than that required by the Annex. A program that attempts to use an unsupported capability of an Annex shall either be identified by the implementation before run time or shall raise an exception at run time.
@dby
An implementation conforming, either in full or in part, to this Reference Manual may provide additional aspects, attributes, library units, and pragmas. However, it shall not provide any aspect, attribute, library unit, or pragma having the same name as an aspect, attribute, library unit, or pragma (respectively) specified in the core or a Specialized Needs Annex unless the provided construct is either as specified in this Reference Manual or is more limited in capability than that required by this Reference Manual. A program that attempts to use an unsupported capability shall either be identified by the implementation before run time or shall raise an exception at run time.
@drepl
For an implementation that conforms to this Reference Manual, the implementation of a language-defined unit shall abide by all postconditions, type invariants, and default initial conditions specified for the unit by this document (see @ref{11.4.2}).
@dby
A conforming implementation of a language-defined unit shall abide by all postconditions, type invariants, and default initial conditions specified for the unit by this document (see @ref{11.4.2}).
No ACATS test is necessary for these changes. As explained in AI22-0065-1, the ACATS currently only tests for full conformance to the core or a Specialized Needs Annex. But if demand was to arise, it could be structured to support partial conformance more formally.
From: Randy Brukardt
Added: Friday, August 2, 2024
As part of John Barnes’ Editorial Review, he noted that the text of 1.1.3(17.b) switches from plural nonspecific (“some subprograms”) to singular specific (“the subprogram”), twice, and then to singular nonspecific (“a subprogram body”). I corrected the two “the subprogram” occurrences to “a subprogram” so all of the uses are nonspecific.