!standard C(1)                                        23-05-19  AI22-0065-1/01

!standard D(1)

!class binding interpretation 23-03-22

!status work item 23-03-22

!status received 23-03-22

!priority Low

!difficulty Medium

!qualifier Clarification

!subject Specialized Needs Annexes should be normative


** TBD.


The JTC1 Directives, Part 2 are the rules governing the contents of the Ada Standard. One rule that has caused trouble is that Annexes can only be treated as normative if they contain absolute requirements (as Ada Annexes A, B, and J do). "Optional requirements", like those given in the Specialized Needs Annexes, do not make the annexes normative.

Our intent has been that anything that implementers are supposed to follow should be normative. Thus, the fact that the Specialized Needs Annexes cannot be normative is uncomfortable. To make them normative, they would need to be organized more like Annex B, with a small required part and a larger optional part.


(See Summary.)


** TBD.


We need a volunteer to develop introductory wording for each Specialized Needed Annex. We also need suggestions on things that we could safely require of all Ada implementations in the Annexes.

Note that we don't necessarily have to do this for all of the Annexes, if doing so would cause work for implementers. The utility of requiring anything in Annex E or F is questionable; perhaps they should be left as-is?

It's likely that the stated purpose of the Specialized Needs Annexes could be supported with additional requirements on Ada implementers. Most implementers support many of the annexes already, and the need for simple compilers for small hosts has evaporated. Requiring parts of the SNAs is unlikely to cause much pain and would give more fully portable capabilities to users.

Some suggestions of things that we could require without too much pain for implementers might include:

C.2 Required representation support (but if we did that, it probably should be integrated into Chapter 13).

C.7.1 Ada.Task_Identification (this is universally implemented)

C.7.2 Ada.Task_Attributes (this is easily provided as map keyed by task ids)

D.1 Aspects Priority and Interrupt_Priority (so long as we aren't requiring more than one priority to be supported)

D.7 Task restrictions (so long as no runtime effect is required)

G.1 Complex packages (so long as any accuracy requirements remain optional)

G.3 Vector and matrix packages (so long as any accuracy requirements remain optional)

The most relevant paragraphs are the following, from RM 1.1.3(16/5-17/3):


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.


Discussion: The last sentence defines what it means to say that an implementation conforms to a Specialized Needs Annex, namely, only by supporting all capabilities required by the Annex.


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.

One possible fix is to remove any mention of optionality in RM 1.1.3, and instead use Implementation Permissions in each annex to permit certain packages or capabilities to be omitted, or provided in partial form.  The conformance certificate would indicate which packages or capabilities are fully supported.

!ACATS test

Changing the status of Specialized Needed Annexes does not directly change any ACATS tests (ACATS tests can test optional requirements by the definition in ISO/IEC 18009). However, anything required of Ada implementations by the rewrite of the annexes may require existing tests to change their pass/fail criteria.