Path: utzoo!utgpu!attcan!uunet!lll-winken!lll-ncis!helios.ee.lbl.gov!pasteur!ames!oliveb!sun!chiba!khb From: khb%chiba@Sun.COM (Keith Bierman - Sun Tactical Engineering) Newsgroups: comp.lang.fortran Subject: Re: An exercise in fultility Keywords: tradmark validation_suite portability Message-ID: <84224@sun.uucp> Date: 6 Jan 89 18:51:04 GMT References: <584@mbph.UUCP> Sender: news@sun.uucp Reply-To: khb@sun.UUCP (Keith Bierman - Sun Tactical Engineering) Organization: Sun Microsystems, Mountain View Lines: 93 In article <584@mbph.UUCP> hybl@mbph.UUCP (Albert Hybl Dept of Biophysics SM) writes: >} >The phrase "this question" refers to Steven Weintraub's >"Dubious Fortran Code Problem." If Keith is right, then >the results of KEITH = SQRT(-16.00) could conceivably be >+4.0, -4.0, 42, x3.8-1978 on some machines or a useful diagnostic >on other machines! This is an absurdity; obviously taking the SQRT >of a negative number "is WRONG. Thus compilers are allowed to do >whatever they want." Right? As a user, I want every compiler >to produce the same result. After all, the purpose of the >Fortran ANSI X3.9 1978 standard "is to promote portability >of FORTRAN programs for use on a variety of data processing >systems." There are things the standard says must be done. There are things that the standard says must not be done. There are things which are left purposely undefined (like how to tell the user that we was asked for was absurd) which are left up to the vendor. If a vendor sells you a compiler which returns +4 for the sqrt(-16) you should find a better vendor. Different machines have different facilities. Older machines will probably halt and core dump. IEEE floating point arithemtic machines will do whatever the user asked for, continue with the value being NaN (if memory serves), take a user coded exception handler, or abort and core dump. Had x3j3 ordained that this must cause an abort, it would be impossible to be fortran and to be IEEE compliant. It is far from clear that this would have been a better state of affairs. >I am a member of national ACM and subscribe to Fortan Form. >I agree that it is a good venue to publish the "Cumulative >Annual Pocket Part" containing new extensions and >revisions of old language in the ANSI FORTRAN standard. >I was disappointed when the committee did not publish >the proposed 8x Standard in Fortran Forum. As it happens there are ANSI rules which forbade this. These are stupid rules and should be changed. The comparable European bodies made it much easier to get copies of the proposed standard. However anyone who wanted one was able to procure one; it was simply not as easy as it should have been nor as cheap. > >I think that the committee is without real power! They >can not enforce the standard so their panegyrist says >'When the code is WRONG, the compilers are allowed to >do whatever they want.' If the name FORTRAN is not a >registered trademark, anyone can use it to sell anything. But are users that stupid ? The last 20 years seem to have indicated that users are very astute. Even without an enforcement arm, x3.8-1978 has been very successful. I have personally written libraries which were 99% portable, with 1% carefully marked as machine specific (machine epsilion and the like). I have ported numerous large programs from machine to machine with modest effort (followed by huge effort to maximize performance, but until there is ONE TRUE MACHINE, that is another story). > >I think that a trademark must be registered for the Language. >A Fortran Validation Suite must be created and before a compiler >is allowed to use the trademark it must pass the validation tests. >A registered trademark is a powerful tool. The Mead Data Central >Inc., the firm that markets computerized legal data-base >services under the registered trademark Lexis, used the courts >to prevent Toyota Motor Corp from marketing a new line of cars >under the name Lexus. Unless a Fortran Standardizing Organization >is willing and able to legally enforce the Standard, this >discussion will have been nothing but an exercise in futility. Ada has proved that this is doable, but whether it is desireable is very debatable. Furthermore this approach makes it impossible to have vendor extensions. FORTRAN continues to be one of the most popular languages in use because it serves the needs of a wide body of users. Despite massive DoD support over a decade, Ada is just starting to take root. There are fortran validations suites, and GSA certifies compilers. My personal experience is that GSA certification is nearly useless, as certified compilers were in some cases awful, and uncertified ones were wonderful. Unless the validation suite is 100% comprehensive and totally bug free it provides a single (albeit potentially very useful) data point for judging a compiler. It is true that someone can offer you a blank notebook and floppy disk, and call it FORTRAN. There is no one to stop him. But will you buy it ? The standard is enforced by competitive pressures. Vendors who make substandard products lose sales to those who do a good job. Keith H. Bierman It's Not My Fault ---- I Voted for Bill & Opus