comp.lang.ada
 help / color / mirror / Atom feed
From: Robert Dewar <robert_dewar@my-deja.com>
Subject: Re: Ada safety road Was: Which is right ...
Date: 1999/06/09
Date: 1999-06-09T00:00:00+00:00	[thread overview]
Message-ID: <7jmddh$rv6$1@nnrp1.deja.com> (raw)
In-Reply-To: 375E9592.32DA0709@averstar.com

In article <375E9592.32DA0709@averstar.com>,
  Tucker Taft <stt@averstar.com> wrote:
> Robert Dewar wrote:
> Using an uninitialized variable is *not* erroneous in Ada 95.

OK, pedagogically correct, but let's see what the RM says

   11  If the representation of the object does not represent a
       value of
       the object's type, the semantics of operations on such
       representations is implementation-defined, but does not
       by itself lead to erroneous or unpredictable execution,
       or to other objects becoming abnormal.

OK, suppose that I have an implementation for the Alpha, where
the normal code for division by a small constant uses a jump
table depending on the constant value, and I do not feel like
doing a constraint check, e.g.

   subtype q is range 1 .. 5;
   qv : q;
   x : integer := ...
   r : integer := x / qv;

Now in my compiler documentation, the effect is implementation
defined, so let me define it. When the division operation is
executed, a four byte address is computed by loading the value
from a table ..... control is then passed to the code at this
four byte address. If the value is valid, the code will do the
required division, if the value is invalid, you must inspect the
generated object code to determine the actual code that will be
executed.

Very well defined! Completely predictable! Not erroneous!
Completely RM compliant! But not very helpful :-(

I perfectly well understand the attempt in the RM to cut back
on erroneousness here, but I am afraid it is a bit bogus in
this case.


Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.




  reply	other threads:[~1999-06-09  0:00 UTC|newest]

Thread overview: 57+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-05-30  0:00 Which is right here - GNAT or OA ? Vladimir Olensky
1999-05-30  0:00 ` Robert Dewar
1999-05-31  0:00   ` Vladimir Olensky
1999-05-31  0:00     ` Robert Dewar
1999-06-01  0:00   ` dennison
1999-05-30  0:00 ` Florian Weimer
1999-05-31  0:00   ` Vladimir Olensky
1999-05-31  0:00     ` Robert Dewar
1999-06-05  0:00       ` Vladimir Olensky
1999-06-05  0:00         ` Florian Weimer
1999-06-05  0:00         ` Vladimir Olensky
1999-06-05  0:00           ` Robert Dewar
1999-06-07  0:00             ` Ada safety road Was: Which is right Vladimir Olensky
1999-06-06  0:00               ` Larry Kilgallen
1999-06-07  0:00                 ` Keith Thompson
1999-06-07  0:00                   ` Hyman Rosen
1999-06-08  0:00                     ` Robert A Duff
1999-06-08  0:00                       ` Robert Dewar
1999-06-08  0:00                       ` Keith Thompson
1999-06-09  0:00                         ` Robert Dewar
1999-06-09  0:00                           ` Tucker Taft
1999-06-09  0:00                             ` Robert Dewar [this message]
1999-06-09  0:00                         ` dennison
1999-06-09  0:00                           ` Entamology of "Nasal Demons" dennison
1999-06-09  0:00                       ` Ada safety road Was: Which is right dennison
1999-06-08  0:00                   ` Robert Dewar
1999-06-07  0:00                     ` Keith Thompson
1999-06-08  0:00                     ` Robert A Duff
1999-06-08  0:00                   ` Robert A Duff
1999-06-14  0:00                   ` Ada safety road Franco Mazzanti
1999-06-15  0:00                     ` Franco Mazzanti
1999-06-16  0:00                       ` Vladimir Olensky
1999-06-06  0:00               ` Ada safety road Was: Which is right Robert Dewar
1999-06-07  0:00                 ` Pascal F. Martin
1999-06-07  0:00                   ` Vladimir Olensky
1999-06-08  0:00                 ` Robert A Duff
1999-06-10  0:00               ` Peter Amey
1999-06-10  0:00                 ` Markus Kuhn
1999-06-11  0:00                   ` Vladimir Olensky
1999-06-12  0:00                     ` Robert Dewar
1999-06-12  0:00                       ` JP Thornley
1999-06-13  0:00                         ` Vladimir Olensky
1999-06-16  0:00                         ` William Dale
1999-06-19  0:00                           ` JP Thornley
1999-06-21  0:00                           ` Robert A Duff
1999-06-13  0:00                       ` Vladimir Olensky
1999-06-12  0:00                         ` Matthew Heaney
1999-06-13  0:00                           ` Vladimir Olensky
1999-06-13  0:00                         ` Robert Dewar
1999-06-13  0:00                           ` Vladimir Olensky
1999-06-13  0:00                           ` swhalen
1999-06-13  0:00                         ` Robert Dewar
1999-06-13  0:00                           ` Vladimir Olensky
1999-06-01  0:00   ` Which is right here - GNAT or OA ? Tucker Taft
1999-05-31  0:00 ` David Botton
1999-06-01  0:00   ` dennison
1999-06-03  0:00 ` Matthew Heaney
replies disabled

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