Version 1.4 of ais/ai-00093.txt

Unformatted version of ais/ai-00093.txt version 1.4
Other versions for file ais/ai-00093.txt

!standard RM-4.1.4 (12)          99-09-15 AI95-00093/04
!class binding interpretation 95-09-29
!status Corrigendum 2000 99-07-27
!status WG9 approved 95-06-14
!status ARG approved 10-0-0 95-11-01
!status received 95-09-29
!qualifier Clarification
!subject Float_Type'Small
!summary
An implementation may support an implementation-defined attribute Small for floating point types.
!question
Paragraph 4.1.4(12) says:
An implementation may provide implementation-defined attributes; the identifier for an implementation-defined attribute shall differ from those of the language-defined attributes.
AARM J(1) lists several Ada 83 floating-point attributes that have been removed from the language, including 'Small; J(1.h), however, says that "Implementations can continue to support the above features for upward compatibility".
Since 'Small is a language-defined attribute for fixed-point types, 4.1.4(12) implies that an implementation must not provide a 'Small attribute for floating-point types. This clearly contradicts the intent of J(1).
May an implementation support the 'Small attribute for floating-point types? (Yes.)
!recommendation
(See summary.)
!wording
(See corrigendum.)
!discussion
The intent is that implementations be allowed to support all Ada 83 attributes, for upward compatibility. Thus, it is important that they be allowed to support the Small attribute on floating point types. Therefore, this AI makes a specific exception to the rule in 4.1.4(12).
!corrigendum 4.01.04(12)
Replace the paragraph:
An implementation may provide implementation-defined attributes; the identifier for an implementation-defined attribute shall differ from those of the language-defined attributes.
by:
An implementation may provide implementation-defined attributes; the identifier for an implementation-defined attribute shall differ from those of the language-defined attributes unless supplied for compatibility with the previous version of this standard.
!ACATS test
This ruling give a permission. Since there is no requirement to use this permission, nor guidance on what the permission means, this cannot be tested.
!appendix

!section RM-4.1.4(12)
!subject Float_Type'Small
!reference RM95-4.1.4(12)
!reference AARM95-J(1)
!from Keith Thompson 95-09-11
!reference as: 95-5283.a Keith Thompson 95-9-11>>
!discussion

Paragraph 4.1.4(12) says
    An implementation may provide implementation-defined attributes; the
    identifier for an implementation-defined attribute shall differ from
    those of the language-defined attributes.

AARM J(1) lists several Ada 83 floating-point attributes that have been
removed from the language, including 'Small; J(1.h), however, says that
"Implementations can continue to support the above features for upward
compatibility".

Since 'Small is a language-defined attribute for fixed-point types,
4.1.4(12) implies that an implementation may not provide a 'Small
attribute for floating-point types.  This clearly contradicts the intent
of J(1).

May an implementation support the 'Small attribute for floating-point
types?

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

From: Robert Eachus  99-28-06

>AI-93:  Float_Type'Small

>An implementation may provide implementation-defined attributes; the
>identifier for an implementation-defined attribute shall differ from
>those of the language-defined attributes or be Small and applicable
>to floating-point types.
>
><<Note.  I find this hard to write neatly. Clearly the spirit is
>that it should be exactly the same as the Ada 83 attribute but I
>can't refer to Ada 83 in normative bits.>>

   You don't have to refer to the previous standard by name:

   ...shall differ from those of the language-defined attributes unless
supplied for compatibility with an earlier version of the standard.

   But better would be to put Float_Type'Small in Annex J.  There is
already one attribute there (T'Storage_Size) so it wouldn't be breaking new
ground.  (And since I raised the subject, I see no reason to remove Annex J
in 2000.  Leave it for the next major revision of the language.)

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

From: Robert Dewar   99-28-06

Bad idea to put Float_Type'Small into Annex J, we do not want to contaminate
the Ada 95 RM with the Ad 83 fpt model.

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

from John Barnes 99-06-30

Here is my revised homework for AI 93, further to comments from
Robert Eachus and Robert Dewar.

I quite liked Robert E's basic suggestion for overcoming direct
reference to Small but I agree with Robert D that any other messing
about with annex J would be inappropriate. In any case, if we had
wanted to do that then the AI would be different. I am only
empowered to do wording and not revisit the intent of the AI.

John

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

Questions? Ask the ACAA Technical Agent