comp.lang.ada
 help / color / mirror / Atom feed
* Tag values in 9X
@ 1993-05-05 16:13 cis.ohio-state.edu!pacific.mps.ohio-state.edu!zaphod.mps.ohio-state.edu!d
  0 siblings, 0 replies; 2+ messages in thread
From: cis.ohio-state.edu!pacific.mps.ohio-state.edu!zaphod.mps.ohio-state.edu!d @ 1993-05-05 16:13 UTC (permalink / raw)


The draft LRM for 9X says (14.6.4) "The value used to represent each
tag is determined at the time the corresponding type declaration is
compiled." 

I have a couple of questions about this.

Scenario 1. Jane creates some tagged types, writes them to a file
using stream io, and sends the file to Fred, with the message "Here
are the sources I used to create the file." Can Fred, using the same
architecture/compiler be guaranteed to read correctly the file he
receives from Jane? That is, will the same tag values be generated at
both ends?

Scenario 2. Linked libraries. On Day 1, Ann creates a library and
compiles into it the definition of the root of a class. Jack and Jill
are responsible for developing cooperating, communicating processes
in this project. On Day 2, Jack creates another library, links it with
Ann's and creates some more members of the original class. On Day 3
Jill does likewise. On Day 4, Ann puts some more members of the class
in her original library. Now, Jack wants to be able to deal with the
members of the class that he knows about, and Jill wants to be able to
deal with those she knows about. They both know about the ones Ann
made on Day 4. Can Jack write them so that Jill can read them?

I know this last seems a bit contrived, but not much. I also know that
the library is, from the language level, monolithic rather than
distributed spatially. Nevertheless, most implementations provide a
"structured" library mechanism overlying the language's, flat
mechanism, so this is not an idle question. How, in structured
libraries, will implementations ensure that tag values are unique and
consistent?

Just curious.


andrew

#  Andrew Dunstan                   #   There's nothing good or bad   #
#  net:                             #                                 #
#    adunstan@steptoe.adl.csa.oz.au #   but thinking makes it so.     #
#  or: andrewd@cs.adelaide.edu.au   #                                 #

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Tag values in 9X
@ 1993-05-10 13:07 news.intercon.com!psinntp!calspan!westley
  0 siblings, 0 replies; 2+ messages in thread
From: news.intercon.com!psinntp!calspan!westley @ 1993-05-10 13:07 UTC (permalink / raw)


In article <1s8p3h$sud@huon.itd.adelaide.edu.au> 
  andrewd@cs.adelaide.edu.au writes:

>The draft LRM for 9X says (14.6.4) "The value used to represent each
>tag is determined at the time the corresponding type declaration is
>compiled." 
>
>I have a couple of questions about this.
>
>Scenario 1. Jane creates some tagged types, writes them to a file
>using stream io, and sends the file to Fred, with the message "Here
>are the sources I used to create the file." Can Fred, using the same
>architecture/compiler be guaranteed to read correctly the file he
>receives from Jane? That is, will the same tag values be generated at
>both ends?

I have a question along these lines.  We have built a TCP/IP
communication system which sends messages between heterogeneous
architectures (SPARC and MC68030) using Verdix' compiler.

We have adopted a convention whereby we MUST fully specified the
message with representation clauses to assure it has the same
structure on both architectures.

I am evaluating this system for conversion to 9X, primarily because
we can use a class of messages rooted at the default message which
is a header (source, destination, message id, etc.) only.  This avoids
the current problem of converting to/from arrays of bytes where
multiple message types must be handled, thereby losing type checking.

The question is this:  How can I specify the tag in the record
representation clause?  And, as Mr. Dunstan has pointed out, how can I
be sure that the tag will identify the same type in both systems?

>
>andrew
>
>#  Andrew Dunstan                   #   There's nothing good or bad   #
>#  net:                             #                                 #
>#    adunstan@steptoe.adl.csa.oz.au #   but thinking makes it so.     #
>#  or: andrewd@cs.adelaide.edu.au   #                                 #
-- 
Terry J. Westley, Principal Computer Scientist
Calspan Corporation, P.O. Box 400, Buffalo, NY 14225
westley@calspan.com
Let's hear it for smart mailers that cut off long signa

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1993-05-10 13:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1993-05-05 16:13 Tag values in 9X cis.ohio-state.edu!pacific.mps.ohio-state.edu!zaphod.mps.ohio-state.edu!d
  -- strict thread matches above, loose matches on Subject: below --
1993-05-10 13:07 news.intercon.com!psinntp!calspan!westley

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