comp.lang.ada
 help / color / mirror / Atom feed
From: bobduff@dsd.camb.inmet.com (Bob Duff)
Subject: Re: Modulus and Remainder operations (Was Re: Help with a bit of C code)
Date: Thu, 13 Oct 1994 23:44:24 GMT
Date: 1994-10-13T23:44:24+00:00	[thread overview]
Message-ID: <CxMxy1.67y@inmet.camb.inmet.com> (raw)
In-Reply-To: 1994Oct13.181350.10997@nosc.mil

In article <1994Oct13.181350.10997@nosc.mil>,
Charles H. Sampson <sampson@nosc.mil> wrote:

> ...Does anyone know why programs that rely on an implementation
>of a compiler-dependent feature were not also classified as erroneous?
>
>                                   Charlie

Depending on an implementation-dependent feature makes your program
nonportable.  Erroneous execution is much worse: your program might do
anything, including delete all the files on your disk, crash the system,
and set your keyboard on fire.  Therefore, erroneousness is reserved for
situations where we really can't predict what might happen.  (A good
operating system will minimize the probability of trashing the disk, but
I know of case where an erroneous Ada program running under MS-DOS
actually destroyed the root directory.)

In Ada 9X, we have reduced the number of erroneous situations.  For
example, in Ada 83, reading an uninitialized variable was considered
erroneous.  In Ada 9X, this is defined as a "Bounded Error", which is
not quite as bad as being erroneous, since you have *some* knowledge of
what the program might do.  Either way, you shouldn't read an
uninitialized variable.  But if you do (presumably by accident), then in
Ada 9X, the damage is a bit less -- it can't trash your disk, for
example.

In general, "not portable" is not considered to be an error,
and certainly should not always be classified as "erroneous".

- Bob
-- 
Bob Duff                                bobduff@inmet.com
Oak Tree Software, Inc.
Ada 9X Mapping/Revision Team (Intermetrics, Inc.)



      parent reply	other threads:[~1994-10-13 23:44 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1994-09-27 14:40 Modulus and Remainder operations (Was Re: Help with a bit of C code) David A. Cobb
1994-09-28 13:56 ` Robert Dewar
1994-09-29  9:04   ` Christopher Costello
1994-09-29 14:34   ` Norman H. Cohen
     [not found]   ` <1994Oct7.225248.6208@nosc.mil>
     [not found]     ` <1994Oct10.084630.19894@sei.cmu.edu>
     [not found]       ` <37bof4$ljl@gnat.cs.nyu.edu>
     [not found]         ` <37cigq$6e0@felix.seas.gwu.edu>
1994-10-11 14:42           ` Norman H. Cohen
     [not found]     ` <hbakerCxFK2p.4wp@netcom.com>
     [not found]       ` <1994Oct11.161048.1058@nosc.mil>
1994-10-11 20:06         ` Norman H. Cohen
1994-10-13  1:51           ` Henry G. Baker
1994-10-13  8:27             ` Magnus Kempe
1994-10-13 12:30               ` Robert Dewar
1994-10-14 15:45               ` Henry G. Baker
1994-10-14 22:11                 ` Robert Dewar
1994-10-15 17:35                 ` Tucker Taft
1994-10-13 10:38             ` Tucker Taft
1994-10-13 21:34             ` Norman H. Cohen
1994-10-14 15:39               ` Henry G. Baker
1994-10-14 22:56                 ` David Weller
1994-10-16  1:25                   ` Henry G. Baker
1994-10-13 18:13           ` Charles H. Sampson
1994-10-13 16:56             ` Robert I. Eachus
1994-10-13 20:59             ` Robert Dewar
1994-10-13 23:44             ` Bob Duff [this message]
replies disabled

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