Version 1.4 of ais/ai-00175.txt

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

!standard 06.03.01 (19)          99-06-12 AI95-00175/02
!class binding interpretation 97-03-19
!status WG9 approved 99-06-12
!status ARG Approved 9-0-0 99-03-24
!status work item 97-03-19
!status received 97-03-19
!priority Low
!difficulty Easy
!subject Full conformance of expressions with attributes
!summary
For two attribute_references to fully conform, the attribute_designator must be the same.
!question
Is Integer'Succ fully conformant with Integer'Pred? (No.)
From 6.3.1(19-22), it would appear so: both attribute_references have the syntactic construction
prefix ' attribute_designator := name ' identifier
!recommendation
(See summary.)
!wording
Add an additional bullet after 6.3.1(21):
each attribute_designator must be the same as the corresponding attribute_designator in the other; and
!discussion
It would be ludicrous to treat two different attributes to be fully conformant. None of the reasons for conformance checking would be enforced if this was true. Thus, the RM's failure to require this can only be categoried as an oversight.
!appendix

!section 6.3.1(19)
!subject Full conformance of expressions with attributes
!reference RM95-6.3.1(19)
!from Vince Del Vecchio  96-12-11
!reference 1996-5779.a Vince Del Vecchio  1996-12-11>>
!discussion

Is Integer'First fully conformant with Integer'Last?

From 6.3.1(19-22), it would appear so:  both attribute_references
have the syntactic construction
  prefix ' attribute_designator :=
  name ' identifer

It is not entirely clear to me whether an identifier has "constituent
constructs" or not.  (See 1.1.4(15-17), 2.1, and 2.3.)  It looks like
identifier_letter is not a "syntactic category", since it does not meet
the 1.1.4(15) requirement that it be defined in a "Syntax" section, even
though it _is_ set in the syntactic-category font, and in fact, is
basically defined as
  identifier_letter :=
    upper_case_identifier_letter | lower_case_identifer_letter
(only the := is missing).  However, letter_or_digit does appear to be a
syntactic category.  A construct must be an instance of a syntactic
category, so apparently "First" has constituent constructs "i" "r" "s"
"t", but not "F" which is not a construct, not being an instance of a
syntactic category (talk about counter-intuitive!).

So perhaps identifiers with different numbers of letters do not
have corresponding constituent constructs which they would need to
be fully conformant.  We can change my example to
Integer'Succ(A) vs Integer'Pred(A), which pretty clearly have the
same syntactic construction.

Also, I think F'Delta and F'Digits (for some decimal fixed point type F,
presumably) are fully conformant, since neither Delta nor Digits is
a syntactic category (they don't even appear in the right font).

I also don't understand why "after replacing each use of an operator
with the equivalent function_call" is in brackets in 6.3.1(19).
In the absence of this language, I would say that since neither
"+" nor "-" is a syntactic category, but both are possible values
of the syntactic category unary_adding_operator, "+A" and "-A"
should be fully conformant.  Even with this language, I think that
"A and then B" is fully conformant with "A or else B", and
"A in Integer" is fully conformant with "A not in Integer".

-Vince Del Vecchio
vdelvecc@inmet.com


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

Questions? Ask the ACAA Technical Agent