Version 1.1 of ais/ai-00240.txt

Unformatted version of ais/ai-00240.txt version 1.1
Other versions for file ais/ai-00240.txt

!standard E.2.2 (8)          00-10-04 AI95-00240/01
!standard E.2.2 (14)
!standard E.2.3 (14)
!class binding interpretation 00-10-04
!status work item 00-10-04
!status received 00-10-04
!qualifier Clarification
!priority Low
!difficulty Medium
!subject Stream attributes for limited types in Annex E
!summary
E.2.2(14) and E.2.3(14) should be changed to allow any type with callable Read and Write stream attributes.
!question
The Technical Corrigendum changes 13.13.2(36/1) to allow calls to stream attributes for limited type extensions where the attribute was specified for an ancestor type:
An attribute_reference for one of these attributes is illegal if the type is limited, unless the attribute has been specified by an attribute_definition_clause or [(for a type extension)] the attribute has been specified for an ancestor type.
Several paragraphs in Annex E require the existence of stream attributes for a type: E.2.2(8), E.2.2(14/1), and E.2.3(14/1). None of these paragraphs have been updated to reflect the previous change. Should any of them be updated? (Yes for E.2.2(14), E.2.3(14), No for E.2.2(8)).
!recommendation
(See summary.)
!wording
Change 13.13.2(36) to define "callable stream attribute" to mean either (a) an attribute of a non-limited type; or (b) an attribute that has been specified by an attribute_definition_clause or [(for a limited type extension)] the attribute has been specified for an ancestor type.
Change E.2.2(8) to use the magic phrase "specified by an attribute_definition_clause", as "user-specified attribute" is not defined.
Change E.2.2(14) to say "each non-controlling formal parameter shall have either a nonlimited type or a type with callable Read and Write stream attributes;"
Change E.2.3(14) to say "...or a formal parameter of a limited type unless that limited type has callable Read and Write stream attributes;"
!discussion
Let's consider each paragraph separately.
For E.2.2(8):
if the full view of a type declared in the visible part of the library unit has a part that is of a non-remote access type, then that access type, or the type of some part that includes the access type subcomponent, shall have user-specified Read and Write attributes.
The intent of this paragraph is stated in AARM E.2.2(8.a): to avoid the use of the default implementation of the attributes. Thus, we do not want to include the new case here (as it potentially uses a default implementation for extension components). The wording should, however, be corrected to use the defined phrase "specified by an attribute_definition_clause" rather than the vague "user-specified" wording.
E.2.2(14/1) says:
The primitive subprograms of the corresponding specific limited private type shall only have access parameters if they are controlling formal parameters; each non-controlling formal parameter shall have either a nonlimited type or a type with Read and Write attributes specified via an attribute_definition_clause;
The intent of this paragraph is that the attributes be callable (see the Defect Report 8652/0083 for a discussion). Thus, it echos the original 13.13.2(36). However, with the change to 13.13.2(36), this does not allow the use of type whose attributes were specified for an ancestor type. Thus, this should be changed to match 13.13.2(36).
E.2.3(14/1) says:
it shall not be, nor shall its visible part contain, a subprogram (or access-to-subprogram) declaration whose profile has an access parameter, or a formal parameter of a limited type unless that limited type has user-specified Read and Write attributes;
This paragraph has the same intent as E.2.2(14). Thus, the wording should be similar.
!corrigendum E.2.2(8)
!corrigendum E.2.2(14)
!corrigendum E.2.3(14)
!ACATS test
An ACATS test is needed to verify that the new cases are implemented properly.
!appendix

From: Randy Brukardt
Sent: Wednesday, October 04, 2000 2:26 PM

The Technical Corrigendum changes 13.13.2(36/1) to allow calls to stream
attributes for limited type extensions where the attribute was specified for
an ancestor type:
    An attribute_reference for one of these attributes is illegal if the
    type is limited, unless the attribute has been specified by an
    attribute_definition_clause or [(for a type extension)] the attribute has
    been specified for an ancestor type.

Several paragraphs in Annex E require the existence of stream attributes for
a type: E.2.2(8), E.2.2(14/1), and E.2.3(14/1). None of these paragraphs
have been updated to reflect the previous change.

For E.2.2(8):
   if the full view of a type declared in the visible part of the
   library unit has a part that is of a non-remote access type, then
   that access type, or the type of some part that includes the access type
   subcomponent, shall have user-specified Read and Write attributes.

The intent of this paragraph is stated in E.2.2(8.a): to avoid the use of
the default implementation of the attributes. Thus, we do not want to
include the new case here (as it potentially uses a default implementation
for extension components). I'm not sure if this paragraph is intended to
allow the use of inherited user-defined attributes, as it does not use the
magic wording "specified by an attribute_definition_clause" (which is
specifically defined to include inherited user-defined routines). It
definitely does not include the use of attribute of type extensions which
has an ancestor with an inherited user-defined attribute, as that
technically is a "default implementation" -- and that is what we want.

E.2.2(14/1) says:
  The primitive subprograms of the corresponding specific limited private type
  shall only have access parameters if they are controlling formal parameters;
  each non-controlling formal parameter shall have either a nonlimited type or
  a type with Read and Write attributes specified via an
  attribute_definition_clause;

The intent of this paragraph is that the attributes be callable (see the
Defect Report 8652/0083 for a discussion). Thus, it echos the original
13.13.2(36). However, with the change to 13.13.2(36), this does not allow
the use of type whose attributes were specified for an ancestor type. It
seems that this should be changed to match 13.13.2(36). [If that is done, it
may be best to define a term "callable stream attribute" in 13.13.2(36), and
then use that here, to avoid synchronization problems in the future.]

E.2.3(14/1) says:
  it shall not be, nor shall its visible part contain, a subprogram (or
  access-to-subprogram) declaration whose profile has an access parameter, or
  a formal parameter of a limited type unless that limited type has
  user-specified Read and Write attributes;

The intent of this paragraph is not given anywhere. It seems to me that the
intent is similar to that of E.2.2(14). Thus, it is strange that the wording
differs so much; it seems to not allow any inherited user-specified
attributes, and definitely does not allow attributes of type extensions
which has an ancestor with an inherited user-defined attribute. Therefore,
the wording of this item should be changed in the same way that E.2.3(14/1)
is.

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


Questions? Ask the ACAA Technical Agent