Version 1.1 of ai05s/ai05-0101-1.txt

Unformatted version of ai05s/ai05-0101-1.txt version 1.1
Other versions for file ai05s/ai05-0101-1.txt

!standard E.2.2(14/2)          08-05-28 AI05-0101-1/01
!standard E.2.3(14/2)
!class binding interpretation 08-05-28
!status work item 08-05-28
!status received 06-04-22
!priority Low
!difficulty Medium
!qualifier Omission
!subject Remote functions must support external streaming
!summary
The result type of a remote function must support external streaming.
!question
E.2.2(14/2) specifies restrictions applying to the types of non-controlling formals of the primitive operations of the limited private type associated with an RACW. The same restrictions must be applied to a non-controlling result, to ensure that the returned value can be sent back to the calling partition.
E.2.3(14/2) has similar language for RCI subprograms and RAS types. This clause should be augmented to forbid functions returning a type that does not support external streaming.
!wording
Change E.2.2(14/2) as follows (this wording includes the changes of AI05-0060-1):
The primitive subprograms of the corresponding specific type shall only have access parameters if they are controlling formal parameters; each non-controlling formal parameter {and result subtype} shall support external streaming (see 13.13.2);
Change E.2.3(14/2) as follows:
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 parameter {or result} of a type that does not support external streaming (see 13.13.2).
[Editor's note: I intend to delete the access parameter portion above as it is redundant and including it complicates the wording for little value. If this is considered important, it should be mentioned in a user note, not in the normative wording.]
!discussion
There is more discussion in the e-mail that I don't understand: in particular, I don't see how converting the result of a type that does not support streaming is supposed to work. If the function has a controlling access result, doing whatever is needed to make it work is the compiler's responsibility, and the result can be used in any way that an access parameter could have been used (I don't see any special restrictions on what can be passed as a controlling access parameter).
So this AI may need work if I have missed something - Editor.
--!corrigendum E.2.2(14/2)
!ACATS Test
!appendix

!topic Return type of remote function should support external streaming
!reference Ada 2005 E.2.2(14/2), E.2.3(14/2)
!from Thomas Quinot 08-04-22
!keywords distributed systems, return type, support external streaming
!discussion

E.2.2(14/2) specifies restrictions applying to the types of non-controlling
formals of the primitive operations of the limited private type associated
with an RACW. The same restrictions must be applied to a non-controlling
result, to ensure that the returned value can be sent back to the
calling partition. (The case of controlling access results is an annoying
irregularity since these can't support external streaming (being anonymous
access types). Maybe a special exception should be added for those).

E.2.3(14/2) has similar language for RCI subprograms and RAS types.
This clause should be augmented to forbid functions returning a type that
does not support external streaming.

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

From: Tucker Taft
Sent: Tuesday, April 22, 2008  7:15 AM

Good point about the non-controlling result.
But I don't follow your point about the
controlling access result.  I would have said that a controlling
(non-access) result needs to support external streaming, whereas with
a controlling *access* result, the restriction would be that it *must*
be converted to a RACW upon return, since it can't be a "normal"
access value.

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

From: Thomas Quinot
Sent: Tuesday, April 22, 2008  7:41 AM

> But I don't follow your point about the controlling access result.  I 
> would have said that a controlling (non-access) result needs to 
> support external streaming,

Sounds reasonable, but this is not currently explicit in the RM.

> whereas with
> a controlling *access* result, the restriction would be that it *must* 
> be converted to a RACW upon return, since it can't be a "normal"
> access value.

... and can't support external streaming. Which is why I mentioned we
might need a separate rule explicitly making it compulsory to convert
such a controlling access result to an RACW.

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



Questions? Ask the ACAA Technical Agent