Article View: comp.arch
Article #12254Correct? programs
From: Herman Rubin
Date: Tue, 25 Jun 1991 13:00
Date: Tue, 25 Jun 1991 13:00
30 lines
1830 bytes
1830 bytes
In article <1991Jun24.211407.17389@ingres.Ingres.COM>, jpk@Ingres.COM (Jon Krueger) writes:
> jbs@WATSON.IBM.COM (James B. Shearer) writes:
> > Do you disagree that it is undesirable for optimization to affect
> > a program's behavior?
>
> Yes.
>
> It is a good and joyful thing, always and everywhere, for
> compilers to expose broken programs.
>
> Correct programs can be written in available languages.
> The meaning of such programs does not depend on whether
> compilers apply permissible optimizations.
It is almost possible to write absolutely correct programs, but is it
worthwhile? It is easy to give examples where the slightest breathing
at a program will give different answers.
One is always going to have problems with architectural limits, such as
number of bits of precision, exponent range, how overflow and underflow
are handled, etc. Cancellation can be a problem, and sometimes a careful
rearrangement of the calculation, supposedly violating optimization rules,
can avoid the problem. Only by using obscure languages do we have the
availability needed for even producing reasonable programs.
--
Herman Rubin, Dept. of Statistics, Purdue Univ., West Lafayette IN47907-1399
Phone: (317)494-6054
hrubin@l.cc.purdue.edu (Internet, bitnet) {purdue,pur-ee}!l.cc!hrubin(UUCP)
Technical Details
Message-ID:
<13948@mentor.cc.purdue.edu>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!sample.eng.ohio-state.edu!purdue!mentor.cc.purdue.edu!pop.stat.purdue.edu!hrubinReferences:
<9106210542.AA21933@ucbvax.Berkeley.EDU> <1991Jun24.211407.17389@ingres.Ingres.COM>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!sample.eng.ohio-state.edu!purdue!mentor.cc.purdue.edu!pop.stat.purdue.edu!hrubin From: hrubin@pop.stat.purdue.edu (Herman Rubin) Newsgroups: comp.arch Subject: Correct? programs Message-ID: <13948@mentor.cc.purdue.edu> Date: 25 Jun 91 13:00:36 GMT References: <9106210542.AA21933@ucbvax.Berkeley.EDU> <1991Jun24.211407.17389@ingres.Ingres.COM> Sender: news@mentor.cc.purdue.edu Lines: 30