CVS difference for ais/ai-00366.txt
--- ais/ai-00366.txt 2004/05/28 00:05:48 1.7
+++ ais/ai-00366.txt 2004/09/04 01:13:46 1.8
@@ -1829,3 +1829,122 @@
****************************************************************
+From: Erhard Ploedereder
+Sent: Monday, August 30, 2004 5:53 PM
+
+
+I tried fairly hard to figure out the right wording for AI-366 in accordance
+with the minutes of the last meeting, where it was decided that we should
+require Read/Write for private types in pure packages that are or include
+access types, and to require same for the visible types if used in RCI
+packages.
+
+Rather than incorporating the results in the AI directly, I give you the
+proposed wording separately for discussion at the next meeting. See my
+comments why I did this.
+
+Erhard
+
+----------------------------
+
+Add after the revised 10.2.1(16):
+
+ If the full view of a private type declared in the visible part of the
+ library unit is a non-remote access type (see E.2.2) or 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.
+
+<<< Comments:
+1. the "non-remote" part seems necessary, since remote type
+ packages can be pure and for remote access types E.2.2(8) poses the
+ requirement already on all access types, not just the private ones.
+2. E.2.2(17/1) has me seriously worried, since the expanded rule for "pure"
+ requires STORAGE_SIZE to be 0, but E.2.2 (17/1) says that the attributes
+ are not defined at all for the interesting remote access types. Probably that
+ para would need a change, too.
+3. The terminology of E.2.2(8) - inherited by this rule and the one below -
+ of talking about "views of types having a part that is of an access type"
+ is particularly mysterious to me. Does "type X is access Integer" have a
+ part that is of an access type ? I guess not, but in that case E.2.2
+ does not require user-defined Read/Write attributes on remote access
+ types. Interesting and surprising (to me).
+ >>>
+
+
+Change E.2.3(14.1) from
+
+* 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;
+
+to
+
+* 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, or a
+ formal parameter of a type that is a non-remote access type or
+ has a part that is of a non-remote access type, unless that access
+ type, or the type of some part that includes the access type
+ subcomponent, has user-specified Read and Write attributes.
+
+<<< Comments: I find these rules WAY TOO complicated; I don't fully
+understand them myself and I am not sure by any degree that they are
+correct and complete. Admittedly, the whole streaming area is not my
+forte, so it may seem simpler to you. In any case, these wordings need
+close scrutiny by better streaming experts.
+>>>
+
+****************************************************************
+
+From: Randy Brukardt
+Sent: Monday, August 30, 2004 8:51 PM
+
+> 3. The terminology of E.2.2(8) - inherited by this rule and the one
+below -
+> of talking about "views of types having a part that is of an access
+type"
+> is particularly mysterious to me. Does "type X is access Integer" have
+a
+> part that is of an access type ? I guess not, but in that case E.2.2
+> does not require user-defined Read/Write attributes on remote access
+> types. Interesting and surprising (to me).
+> >>>
+
+"Part" is of course a technical term, defined in 3.2(6) [I found this
+definition by looking in the index, as Bob always used to say]. "Part"
+includes the whole object or value as well as any subcomponents. If you
+don't want to include the object itself, you say "subcomponent" (which was
+not done here).
+
+Therefore, it's obvious that "type C is access Integer" has a part that is
+of an access type, and the rule applies.
+
+...
+>* 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, or a
+> formal parameter of a type that is a non-remote access type or
+> has a part that is of a non-remote access type, unless that access
+> type, or the type of some part that includes the access type
+> subcomponent, has user-specified Read and Write attributes.
+
+As noted above, the "that is a non-remote access type" is redundant, as it
+is covered by "part". So the wording can be simplified to:
+
+* 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, or a
+ formal parameter of a type that has a part that is of a non-remote
+ access type, unless the type of some part that includes the access
+ type has user-specified Read and Write attributes.
+
+I'm not going to claim that this is a lot more understandable, but less
+wording is usually better...
+
+****************************************************************
+
Questions? Ask the ACAA Technical Agent