comp.lang.ada
 help / color / mirror / Atom feed
From: "Robert I. Eachus" <eachus@mitre.org>
Subject: Re: generic package dilemma
Date: 1999/12/01
Date: 1999-12-01T21:32:22+00:00	[thread overview]
Message-ID: <38459568.8DAF60@mitre.org> (raw)
In-Reply-To: wccyabqfldi.fsf@world.std.com

Robert A Duff wrote:
 
> I certainly don't believe the designers of Ada 83 (in 1980) thought it's
> possible for compiler to solve the halting problem.  I think they just
> wrote the rule in a slightly sloppy way.  They could have rewritten it
> to say what they always meant, but instead they chose to go with
> run-time checking -- I presume because that makes things simpler by
> avoiding a link-time analysis of the entire program's call graph.

   I don't think so.  We started building SLANG as a subset of Ada 80. 
It later grew to be a pretty large subset of Ada 83 (and changed it's
name to Ada/SIL).

   This compiler had a rather agressive optimizer that created and
heavily used the call graph.  For example it would combine the stack
frames for non-recursive subprograms with the parent, which required
some pretty sophisticated static analysis.  After Ada82 was published,
it would also eliminate the "elaborated" bit, and any checks for it in
any unit that could be statically shown not to be called before
elaboration.

   I argued fairly strongly for making elaboration checks dynamic based
on what we found when trying to implement the Ada 80 rules.  Most small
programs were easy to find an elaboration order for and (later)
eliminate all elaboration checks.  But larger programs would hit a
complexity barrier where finding a static elaboration order--if one
existed--took longer than compiling all of the compilation units. 
Putting elaboration bits in just a few packages dramatically decreased
link times.  There were three packages that got hit all the time, but
I'll give one example:  Good belt and suspenders programming practice is
to include in exception handling code a quick message to tell what went
wrong.  Some of these stay in the delivered version, some are inserted
during debugging and taken out during integration along with many
others.

   Of course, changing these messages could change the elaboration order
for the program, or worse, create a situation where no workable
elaboration order existed.  If this check was static, there was no way
to find and remove this emergent property of the program other than to
backtrack.  This was no help to the guy trying to get the initialization
code of a large system to work.  He was MUCH happier getting

-- 

                                        Robert I. Eachus

with Standard_Disclaimer;
use  Standard_Disclaimer;
function Message (Text: in Clever_Ideas) return Better_Ideas is...




  parent reply	other threads:[~1999-12-01  0:00 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-11-17  0:00 generic package dilemma Riyaz Mansoor
1999-11-17  0:00 ` Matthew Heaney
1999-11-17  0:00   ` Mats Weber
1999-11-17  0:00     ` Matthew Heaney
1999-11-18  0:00       ` Robert A Duff
1999-11-18  0:00         ` Matthew Heaney
1999-11-18  0:00       ` Mats Weber
1999-11-18  0:00         ` Matthew Heaney
1999-11-19  0:00           ` Mats Weber
1999-11-19  0:00             ` Matthew Heaney
1999-11-19  0:00               ` Robert Dewar
1999-11-19  0:00                 ` Matthew Heaney
1999-11-20  0:00                   ` Mats Weber
1999-11-19  0:00                 ` Robert I. Eachus
1999-11-22  0:00                   ` Robert Dewar
1999-11-22  0:00                     ` Matthew Heaney
1999-11-19  0:00               ` Mats Weber
1999-11-22  0:00                 ` Robert Dewar
1999-11-22  0:00                   ` Mats Weber
1999-11-22  0:00                     ` Robert A Duff
1999-11-23  0:00                       ` Robert Dewar
1999-12-01  0:00                       ` Robert I. Eachus [this message]
1999-12-01  0:00                         ` Robert I. Eachus
1999-11-22  0:00                   ` Larry Kilgallen
1999-11-23  0:00                     ` Robert Dewar
1999-11-22  0:00                   ` Robert A Duff
1999-11-23  0:00                     ` Robert Dewar
1999-11-29  0:00                       ` Robert A Duff
1999-12-01  0:00                         ` Robert Dewar
1999-12-01  0:00                       ` Robert A Duff
1999-12-02  0:00                         ` Mats Weber
1999-12-03  0:00                           ` Robert Dewar
1999-12-03  0:00                             ` Ted Dennison
1999-12-04  0:00                               ` Robert Dewar
1999-12-03  0:00                             ` Robert A Duff
1999-12-06  0:00                               ` Robert Dewar
1999-11-22  0:00                   ` Mats Weber
1999-11-22  0:00                     ` Bryce Bardin
1999-11-23  0:00                     ` Robert Dewar
1999-11-19  0:00             ` Vladimir Olensky
1999-11-19  0:00       ` Robert Dewar
1999-11-18  0:00   ` Riyaz Mansoor
1999-11-19  0:00     ` Robert Dewar
1999-11-19  0:00   ` Robert Dewar
replies disabled

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