From: "Nick Roberts" <Nick.Roberts@dial.pipex.com>
Subject: Re: AQ&S Guidance on pragma Elaborate_Body
Date: 1997/04/26
Date: 1997-04-26T00:00:00+00:00 [thread overview]
Message-ID: <01bc5253$1840e2c0$28f982c1@xhv46.dial.pipex.com> (raw)
In-Reply-To: 5jq9uc$kuf@top.mitre.org
Michael F Brenner <mfb@mbunix.mitre.org> wrote in article
<5jq9uc$kuf@top.mitre.org>...
> The link between pragma pure and thread safety is that thread safety is
> a memory concern, and the concept of a pure package is to be memory-free,
> and therefore as thread safe as any code can be. That is why optimizers
> are permitted to optimize away multiple calls to procedures in pure
> packages--they have NO memory. If they had memory, and therefore
> potential thread-unsafeness, they ARE NOT pure, and it would be fibbing
> to mark them pure, and the optimized-away calls will be an undesireable
> effect on the execution of the code. The purity is transitive, since
> everything imported (withed) by a pure package must be pure. Therefore,
> if you call, for example, some pure_io.put_line several times during
> the debugging of a pure package, only the first pure_io.put_line would
> actually be called!
>
> The second, and all further calls to pure_io.put_line would generate no
> code (i.e., in DEC Vaxen Ada language, would be optimized away).
Surely it would be a 'very poor' (substitute your favourite expletive)
compiler which 'optimized away' a second or subsequent call to a procedure
with only 'in' parameters defined in a pure package (as in Michael's
example)?
Moreover (and much earlier), if a compiler were to come across a procedure
which only has 'in' parameters declared in a pure package, surely to God it
should give a big fat warning message? I don't know if the language (Ada
95) allows it, but it would really be best for the compiler to give up
(with a fatal error), since this would certainly indicate a bug (wouldn't
it?).
Excellent post, by the way, Michael.
Nick.
next prev parent reply other threads:[~1997-04-26 0:00 UTC|newest]
Thread overview: 81+ messages / expand[flat|nested] mbox.gz Atom feed top
1997-04-18 0:00 AQ&S Guidance on pragma Elaborate_Body JP Thornley
1997-04-18 0:00 ` Robert Dewar
1997-04-19 0:00 ` Michael Paus
1997-04-19 0:00 ` Robert A Duff
1997-04-21 0:00 ` Robert Dewar
1997-04-23 0:00 ` Robert A Duff
1997-04-23 0:00 ` Robert Dewar
1997-04-24 0:00 ` Robert A Duff
1997-04-24 0:00 ` Robert Dewar
1997-04-24 0:00 ` Robert Dewar
1997-04-25 0:00 ` Robert A Duff
1997-04-25 0:00 ` Mats Weber
1997-04-25 0:00 ` Robert I. Eachus
1997-04-26 0:00 ` Nick Roberts
1997-04-26 0:00 ` Robert Dewar
1997-04-28 0:00 ` Robert I. Eachus
1997-04-29 0:00 ` Robert Dewar
1997-04-29 0:00 ` Robert I. Eachus
1997-04-27 0:00 ` Robert Dewar
1997-04-28 0:00 ` Mats Weber
1997-04-29 0:00 ` Redefinition of "=", elaboration and learning Ada Mats Weber
1997-04-29 0:00 ` Robert A Duff
1997-04-30 0:00 ` Mats Weber
1997-04-26 0:00 ` AQ&S Guidance on pragma Elaborate_Body Nick Roberts
1997-04-26 0:00 ` Robert Dewar
1997-04-24 0:00 ` Mats Weber
1997-04-24 0:00 ` Robert A Duff
1997-04-24 0:00 ` Robert Dewar
1997-04-25 0:00 ` Robert Dewar
1997-04-20 0:00 ` Robert Dewar
1997-04-21 0:00 ` Michael F Brenner
1997-04-23 0:00 ` Robert Dewar
1997-04-24 0:00 ` Laurent Guerby
1997-04-24 0:00 ` Matthew Heaney
1997-04-24 0:00 ` Robert Dewar
1997-04-24 0:00 ` Jon S Anthony
1997-04-24 0:00 ` Matthew Heaney
1997-04-26 0:00 ` Nick Roberts
1997-04-26 0:00 ` Robert A Duff
1997-04-26 0:00 ` Matthew Heaney
1997-04-26 0:00 ` Robert Dewar
1997-04-26 0:00 ` Matthew Heaney
1997-04-27 0:00 ` Robert Dewar
1997-04-29 0:00 ` John G. Volan
1997-04-29 0:00 ` Matthew Heaney
1997-04-30 0:00 ` Jon S Anthony
1997-05-01 0:00 ` John G. Volan
1997-05-02 0:00 ` Booch "forms" and child packages [was: AQ&S Guidance on pragma Elaborate_Body] John G. Volan
1997-05-02 0:00 ` AQ&S Guidance on pragma Elaborate_Body John G. Volan
1997-04-25 0:00 ` Robert Dewar
1997-04-24 0:00 ` Robert A Duff
1997-04-25 0:00 ` Michael F Brenner
1997-04-26 0:00 ` Nick Roberts [this message]
1997-04-18 0:00 ` Robert A Duff
1997-04-21 0:00 ` Michael F Brenner
1997-04-22 0:00 ` Robert A Duff
1997-04-20 0:00 ` Doug Smith
1997-04-20 0:00 ` Robert Dewar
1997-04-21 0:00 ` Matthew Heaney
1997-04-21 0:00 ` Robert A Duff
1997-04-21 0:00 ` Matthew Heaney
1997-04-21 0:00 ` Matthew Heaney
1997-04-22 0:00 ` Mats Weber
1997-04-22 0:00 ` Robert A Duff
1997-04-22 0:00 ` Matthew Heaney
1997-04-22 0:00 ` Robert A Duff
1997-04-22 0:00 ` Matthew Heaney
1997-04-23 0:00 ` Robert A Duff
1997-04-24 0:00 ` Matthew Heaney
1997-04-24 0:00 ` Robert A Duff
1997-04-25 0:00 ` Robert Dewar
1997-04-23 0:00 ` Robert Dewar
1997-04-24 0:00 ` Robert Dewar
1997-04-24 0:00 ` Robert A Duff
1997-04-23 0:00 ` Robert Dewar
1997-04-21 0:00 ` Robert A Duff
1997-04-21 0:00 ` Robert Dewar
1997-04-22 0:00 ` Robert A Duff
1997-04-24 0:00 ` Robert Dewar
-- strict thread matches above, loose matches on Subject: below --
1997-04-30 0:00 W. Wesley Groleau (Wes)
1997-04-30 0:00 ` Robert I. Eachus
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox