comp.lang.ada
 help / color / mirror / Atom feed
From: Andre Spiegel <spiegel@inf.fu-berlin.de>
Subject: Standard library and distributed systems
Date: 1997/07/02
Date: 1997-07-02T00:00:00+00:00	[thread overview]
Message-ID: <x2d8p1ln4r.fsf@inf.fu-berlin.de> (raw)


Last week I posted an article concerning distributability of types in
Ada's standard library.  There were no replies, so here is a second
try, hopefully a bit clearer.

The problem: Ada.Strings.Bounded and Ada.Strings.Unbounded are not
Remote_Types packages, which means that you cannot use bounded or
unbounded strings for interpartition communications in a distributed
system.  Since these types are very important, I find this a severe
restriction for distributed programming in Ada, and I wonder whether
this could be changed.

There is a proposal, documented in Ada Issue ai-00126 to make all
standard packages Remote_Types for which it is possible.  But even
under this proposal, Ada.Strings.Bounded and Ada.Strings.Unbounded
remain non-remote.

  (1) Ada.Strings.Bounded cannot be Remote_Types because it depends
      on Ada.Strings.Maps, which, according to ai-00126, cannot be 
      Remote_Types because it declares an access-to-subprogram type, 
      Character_Mapping_Function.

      I don't understand this.  According to RM95 E.2.2(9), a 
      Remote_Types package _may_ declare access-to-subprogram types.
      So I think that both Ada.Strings.Maps and Ada.Strings.Bounded
      could be Remote_Types.

  (2) Ada.Strings.Unbounded cannot be Remote_Types for an additional 
      reason: it declares type String_Access.  

      But this type is not used anywhere else in the visible part, and 
      I recall that people have been discussing whether this declaration 
      should be removed.  If it were removed, and Ada.Strings.Unbounded 
      privately defined Read and Write attributes for Unbounded_String, 
      then the type could be used for interpartition communications.

  (3) If, for example, Ada.Strings.Bounded were Remote_Types, I cannot
      imagine a scenario where Ada.Strings.Maps.Character_Mapping_Function
      would actually be used remotely (so that the function being pointed
      to would actually be called across partitions).  If this is correct,
      could it be that the language rules are too restrictive in this area?
      They forbid something which actually wouldn't cause any problems?

Please let me know whether the above reasoning is correct.  If not,
please tell me why not.  If it _is_ correct, is it planned to change
the standard library and/or the language rules?

Thanks,

Andre Spiegel
Free University of Berlin




             reply	other threads:[~1997-07-02  0:00 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-07-02  0:00 Andre Spiegel [this message]
1997-07-02  0:00 ` Standard library and distributed systems Tucker Taft
1997-07-02  0:00   ` Robert Dewar
1997-07-03  0:00   ` Andre Spiegel
1997-07-07  0:00     ` Tucker Taft
1997-07-02  0:00 ` Samuel Tardieu
1997-07-02  0:00   ` Andre Spiegel
1997-07-03  0:00     ` Robert Dewar
1997-07-04  0:00       ` Andre Spiegel
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox