comp.lang.ada
 help / color / mirror / Atom feed
From: dewar@cs.nyu.edu (Robert Dewar)
Subject: Re: Ada ad in Embedded Systems Programming stinks
Date: 11 Sep 1994 08:20:26 -0400
Date: 1994-09-11T08:20:26-04:00	[thread overview]
Message-ID: <34usma$hti@gnat.cs.nyu.edu> (raw)
In-Reply-To: 34tu91$139u@source.asset.com

Mike says:  

"Ada compilers include LRM references so the programmer can figure out the
 error"

This of course is an attribute of an implementation not a language (C
compilers and Lint could equally well include references to the ANSI
standard).

There are however real language differences that show up, e.g. when in C
you casually write an unchecked conversion from pointer to integer, or
you casually assume that pointers and integers occupy the same amount of
space, or, or, or ... these are not errors in the sense of being static
violations of some rule that Lint can easily catch. 

That being said, the fact that in Ada, the compiler is required to catch
things means that it certainly will. A given implementation of Lint may
or may not catch all the possible static errors (which were not designed
into C in a manner guaranteeing that they could be detected). It's really
that fundamental philosophical difference that is important. Standards like
the COBOL, Fortran and C standards are basically only positive standards,
they tell you what a legal program *is*, and what a conforming implementation
must do with a legal program. The Ada standard is equally concerned with
the class of illegal programs, and worries about what a conforming
implementation must do with an illegal program.

This isn't just theory, IBM has at least in one incident I know of, officially
refused to accept as a valid bug report from an important COBOL user, a
complaint that the compiler did not diagnose an error.

Speaking of LRM references, especially with Ada 9X, where parts of the RM
are very technical and do not even pretend to be simple easy to read English,
I am not at all sure that routinely sending people off to look at the RM is
a favor.

In GNAT we really concentrate on giving an error message that is clear enough
at a simple informal level to avoid the need to rummage in the LRM. Our
eventual plans are to have an auxiliary utility which will further explain
an error message, using additional text as well as references to the RM,
AARM, Rationale or whatever.

We haven't started work on that utility, but we have a good name for it
GNOME (GNAT Online Message Explanation).

That seems the best compromise. After all, remember that the user who is
most likely to need further help is also the user least likely to be able
to read the RM. If you really know the RM well, you shouldn't be making
errors in the first place, and you certainly should be able to figure
them out :-)




  reply	other threads:[~1994-09-11 12:20 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CvFI4J.D5M@world.std.com>
     [not found] ` <34ecqc$b5q@source.asset.com>
     [not found]   ` <34g5v3INN6q2@phage.cshl.org>
1994-09-06 13:46     ` Ada ad in Embedded Systems Programming stinks david.c.willett
     [not found]     ` <EACHUS.94Sep6094018@spectre.mitre.org>
1994-09-08  7:04       ` Dag Bruck
1994-09-08  9:52         ` Robert I. Eachus
1994-09-08 17:12           ` Dag Bruck
1994-09-08 17:28             ` Robert I. Eachus
1994-09-22  8:51         ` Brendan WALKER
1994-09-07 22:44   ` John Goodsen
1994-09-08  6:32     ` Keith Thompson @pulsar
     [not found] ` <1994Sep1.084046.21595@sei.cmu.edu>
     [not found]   ` <344u9q$di5@gnat.cs.nyu.edu>
     [not found]     ` <347idh$15ss@watnews1.watson.ibm.com>
     [not found]       ` <1994Sep4.092729.21408@lmpsbbs.comm.mot.com>
1994-09-07 22:46         ` John Goodsen
1994-09-08  6:47           ` Keith Thompson @pulsar
1994-09-08  8:52             ` David Emery
1994-09-11  3:41       ` Michael M. Bishop
1994-09-11 12:20         ` Robert Dewar [this message]
1994-09-11 13:29           ` Robert Dewar
1994-09-12 14:03             ` Norman H. Cohen
1994-09-11 21:48           ` Erik Naggum
1994-09-11 23:47             ` Robert Dewar
1994-09-12  6:28               ` Dag Bruck
1994-09-12 12:22                 ` David Weller
1994-09-12 20:03               ` Erik Naggum
1994-09-12 19:16             ` Maarten Landzaat
1994-09-13 10:10               ` Richard A. O'Keefe
1994-09-17 12:07                 ` Fred McCall
1994-09-12 20:49         ` Mitch Gart
1994-10-13 10:51 Bob Wells #402
replies disabled

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