From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,8c8bbb1419c8e81a X-Google-Attributes: gid103376,public From: dewar@merv.cs.nyu.edu (Robert Dewar) Subject: Re: Waiver question Date: 1997/05/04 Message-ID: #1/1 X-Deja-AN: 239280831 References: <1997May2.063334.1@eisner> <1997May2.164921.1@eisner> <1997May3.075709.1@eisner> Organization: New York University Newsgroups: comp.lang.ada Date: 1997-05-04T00:00:00+00:00 List-Id: Larry says <> 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