comp.lang.ada
 help / color / mirror / Atom feed
From: dewar@merv.cs.nyu.edu (Robert Dewar)
Subject: Re: Waiver question
Date: 1997/05/04
Date: 1997-05-04T00:00:00+00:00	[thread overview]
Message-ID: <dewar.862753859@merv> (raw)
In-Reply-To: 1997May3.075709.1@eisner


Larry says

<<Robert Dewar stated earlier in this thread that Alpha was "addressable"
to the byte level even though only "accessible" down to the byte level.
If both of you have the same meaning for the term "addressable",
then the fact that A and B are independently addressable does not
necessarily mean they are in separate longwords.>>

Sorry, we are using terminology here without clearly explaining it. The
key term is independent. This was coined by Norman Schulman in his thesis
on shared variables, and later reused by me in my Ada9X report on shared
variables (this was one of the Ada 9X SEI special reports) which was the
basis for some of the thinking in the Ada 9X design

Independent means precisely accessible my multiple simultaneous tasks
in this context.

By the way, a little history here. In the Ada 83 design, the fields of
ALL composite objects were non-independent, i.e. the language of 9.11
was such that two tasks could not work on separate rows of an array.

I always knew the language was like this, and assumed it was intentional,
because although in some cases such independent access is possible, in the
packed case, it is quite impossible on most machines. I knew this problem
well because we had addressed it in Algol-68 (which by the way was one of
the first languages of the Algol class to have built in concurrency, and
so ran into many of these problems first).

However, a change was made in the printer's proof just days before
final publication, with no review by anyone, that chnaged this, and
the final Ada 83 standard requires indepedence for ALL fields and
elements of composites.

Apparently the designers had always intended this, and regarded the
language in 9.11 as a simple typo (it was a matter of the terminology used
to describe variables -- whether it included subfields or not). They
regarded it as important for, e.g. two tasks to be able to work on separate
rows of an array.

BUT, this change had the disastrous effect of requirng full independence
for packed arrays and for packed records. In fact those making the change
at the last minute without review never considered this side effect, and
thus made a huge mistake without realizing it (changes at the last
minute are always dangerous).

In practice, no one implemented this (the only implementation in some
architectures would involve a kernel call for every access to a packed
array, even in non-tasking contexts, because of separate compilation).
Luckily, the ACVC suite did not attempt to enforce this requirement of
Ada 83, so no real harm was done.

But clearly we needed to clean this up. The compromise in Ada 95 is to
require independence in the normal case but not in the packed case.
This seems a reasonable compromise for most machines, but is problematical
on the Alpha and similar machines which do not have independent byte
addressability.

P.S. Please note that a previous post I made here was exactly wrong (must
have been my evil twin brother again). I said that Ada 83 did not require
independence for composites. That, as is clear from the above history,
is wrong (I guess I was indulging in wishful thinking, and thinking about
the standard as approved by the committee, rather than the one that was
printed. Of course it is fine to fix typos in a final printers draft, but
here was a remarkable case in which one persons typo was another persons
major change. A useful cautionary example :-)

Robert Dewar






  reply	other threads:[~1997-05-04  0:00 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-04-18  0:00 Waiver question Ken Garlington
1997-04-19  0:00 ` Tom Moran
1997-04-20  0:00 ` Dean Runzel
1997-04-22  0:00   ` Ken Garlington
1997-04-20  0:00 ` Steve Doiel
1997-04-20  0:00 ` Robert Dewar
1997-04-21  0:00   ` Ken Garlington
1997-04-22  0:00     ` Ken Garlington
1997-04-23  0:00       ` Corey Minyard
1997-04-24  0:00         ` Richard Kenner
1997-04-28  0:00         ` Larry Kilgallen
1997-04-28  0:00           ` Corey Minyard
1997-04-29  0:00             ` Laurent Guerby
1997-04-30  0:00               ` Corey Minyard
1997-04-29  0:00             ` Kaz Kylheku
1997-04-29  0:00             ` Robert Dewar
1997-04-29  0:00           ` Richard Kenner
1997-04-30  0:00             ` Robert Dewar
1997-05-01  0:00               ` Larry Kilgallen
1997-05-07  0:00                 ` Bad .diff files in gnat-3.09 in Linux Benoit Jauvin-Girard
1997-05-09  0:00                   ` Albert K. Lee
1997-04-30  0:00             ` Waiver question Robert A Duff
1997-05-01  0:00               ` Kaz Kylheku
1997-05-02  0:00                 ` Robert A Duff
1997-05-02  0:00                   ` Larry Kilgallen
1997-05-02  0:00                     ` Robert A Duff
1997-05-02  0:00                       ` Larry Kilgallen
1997-05-03  0:00                         ` Robert A Duff
1997-05-03  0:00                           ` Larry Kilgallen
1997-05-04  0:00                             ` Robert Dewar [this message]
1997-05-04  0:00                         ` Robert Dewar
1997-05-02  0:00                     ` Robert Dewar
1997-05-06  0:00                     ` John M. Mills
1997-04-29  0:00           ` Robert Dewar
1997-04-23  0:00     ` Tarjei Jensen
1997-04-21  0:00 ` Robert I. Eachus
1997-04-21  0:00   ` Robert Dewar
1997-04-22  0:00     ` Robert I. Eachus
1997-04-23  0:00       ` Robert Dewar
1997-04-22  0:00   ` Ken Garlington
1997-04-23  0:00     ` Robert S. White
1997-04-24  0:00     ` Robert Dewar
1997-04-24  0:00       ` Steve Vestal
1997-04-25  0:00         ` Robert I. Eachus
1997-04-25  0:00         ` Ken Garlington
replies disabled

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