comp.lang.ada
 help / color / mirror / Atom feed
From: Bob Duff <bobduff@theworld.com>
Subject: Re: Dynamic allocation in the predefined language environment
Date: Mon, 06 Jul 2015 10:45:00 -0400
Date: 2015-07-06T10:45:00-04:00	[thread overview]
Message-ID: <87y4itbb0z.fsf@theworld.com> (raw)
In-Reply-To: 559a8d12$0$297$14726298@news.sunsite.dk

Matthias-Christian Ott <ott@mirix.org> writes:

> It could be implemented in C or assembly language and than it could
> definitely crash.

Yes, it could be implemented in any language.  But it still has to be
implemented correctly.  If it crashes, then it's not a conforming
implementation of Ada.  (And of course, "conforming implementation of
Ada" is synonymous with "implementation of Ada"!)

If you think the RM says otherwise, then either you are misunderstanding
the RM, or else the RM has an error.  The latter is possible, but for
sure the INTENT of the RM is that running out of memory raises
Storage_Error, and does not "simply crash".

I mean, consider a simple addition:

    X + Y

The RM requires this to compute the sum of X and Y, or raise
Constraint_Error on overflow (or (unlikely) raise Storage_Error --
anything can raise Storage_Error).  The implementer doesn't get to say,
"Well the RM doesn't specify HOW '+' is implemented, and I'm choosing to
implement it wrong."

>...The point is: If the standard specifies how to
> implement a package, you have to assume anything when reasoning about
> the correctness of code.

I don't understand that sentence.  Are you missing a "not" or something?

Anyway, your original complaint (that the language doesn't let you
choose the storage pool used for containers) is quite correct.
I think it was considered, but I don't remember the details.

- Bob

  parent reply	other threads:[~2015-07-06 14:45 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-06 11:13 Dynamic allocation in the predefined language environment Matthias-Christian Ott
2015-07-06 13:04 ` G.B.
2015-07-06 14:21   ` Matthias-Christian Ott
2015-07-06 14:06 ` Bob Duff
2015-07-06 14:16   ` Matthias-Christian Ott
2015-07-06 14:23     ` G.B.
2015-07-06 14:43       ` Matthias-Christian Ott
2015-07-06 14:56         ` Bob Duff
2015-07-07  8:46           ` Matthias-Christian Ott
2015-07-07 22:32             ` Bob Duff
2015-07-08 19:47               ` Randy Brukardt
2015-07-08 21:08                 ` Bob Duff
2015-07-10 21:58                   ` Randy Brukardt
2015-07-08 21:16                 ` Dmitry A. Kazakov
2015-07-06 14:45     ` Bob Duff [this message]
2015-07-06 20:28       ` Randy Brukardt
2015-07-07  8:49       ` Matthias-Christian Ott
2015-07-07 22:14         ` Bob Duff
2015-07-06 15:29   ` Simon Wright
2015-07-06 20:31     ` Randy Brukardt
2015-07-06 21:35       ` Simon Wright
2015-07-07 18:29         ` Randy Brukardt
2015-07-06 20:22   ` Randy Brukardt
2015-07-06 18:45 ` Jeffrey R. Carter
2015-07-07  7:42 ` Dmitry A. Kazakov
2015-07-07  8:23   ` Matthias-Christian Ott
2015-07-07  8:46     ` Dmitry A. Kazakov
replies disabled

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