From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=BAYES_00,INVALID_DATE autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,b0123581076a0cf3 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 1994-09-11 07:01:58 PST Path: nntp.gmd.de!xlink.net!howland.reston.ans.net!swiss.ans.net!cmcl2!thecourier.cims.nyu.edu!thecourier.cims.nyu.edu!nobody From: dewar@cs.nyu.edu (Robert Dewar) Newsgroups: comp.lang.ada Subject: Re: Ada ad in Embedded Systems Programming stinks Date: 11 Sep 1994 08:20:26 -0400 Organization: Courant Institute of Mathematical Sciences Message-ID: <34usma$hti@gnat.cs.nyu.edu> References: <1994Sep1.084046.21595@sei.cmu.edu> <344u9q$di5@gnat.cs.nyu.edu> <347idh$15ss@watnews1.watson.ibm.com> <34tu91$139u@source.asset.com> NNTP-Posting-Host: gnat.cs.nyu.edu Date: 1994-09-11T08:20:26-04:00 List-Id: 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 :-)