From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1164f8,b0b9a5eaad4ab6eb X-Google-Attributes: gid1164f8,public X-Google-Thread: 1014db,37e683828bae12e2 X-Google-Attributes: gid1014db,public X-Google-Thread: 109fba,37e683828bae12e2 X-Google-Attributes: gid109fba,public X-Google-Thread: f8c65,37e683828bae12e2 X-Google-Attributes: gidf8c65,public X-Google-Thread: 1008e3,37e683828bae12e2 X-Google-Attributes: gid1008e3,public From: Ruud Bruijnesteijn Subject: Re: [++] Tight coding Date: 1998/03/01 Message-ID: <34F97152.DBF199BD@sds-sportdata.com>#1/1 X-Deja-AN: 329708499 Content-Transfer-Encoding: 7bit References: <6csl81$rb9@news-rocq.inria.fr> <34F3B7C5.5FD1@earthlink.net> <34F49435.B6307838@hda.hydro.com> <6dbgjv$lg$1@andros.cygnus.com> X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Organization: SDS Sport.Data.Systems GmbH Mime-Version: 1.0 Newsgroups: comp.sys.dec,comp.lang.c++,comp.lang.c,comp.lang.modula2,comp.lang.modula3 Bill Moyer wrote: > > I occasionally wonder if (or when) software will become suf- > ficiently massive and complex that system performance will be > dominated by the frequency and time it takes to recover from > application (or system) crashes. If this happened, upgrading > to faster hardware would not effectively improve productivity. I think (hope) some products (notably WinXX, Adobe, Nutscrape) will reach that state before the end of the century. > the more I > think that techniques discarded in the past for being slow, > inconvenient, or impractical (memory segmentation with bounds > checking, strong type checking, compile-time proving of code > correctness, et al) might be worth another look. I think what you are forgetting here is a re-evaluation of the basic programming principles that were outlined in the 70s and 80s. For some reason I have the impression that the bulk of so-called programmers have no notion of what an Invariant is, what Pre- or Postconditions are, and why these are such important elements in programming. > Changing the programming language to improve compile-time > verification of code correctness (with richer and stronger > types, richer static semantic sets, and compile-time range > tracking) would locate more bugs at compile-time, reduce the > number of bugs in a "finished" product, and reduce the overall > time spent in the development cycle (because finding run-time > bugs is a much longer and more laborious task than finding > them at compile-time). It has been proven that the imperative > languages are not provable (ie, for any turing-complete imper- > ative language, a program can be written which is not provably > correct or incorrect), but it is still possible to improve > provability by degrees, and we can do a lot better than C. Hmm. I think you're right from a pure theoretical point of view, and in fact practice is that most programs are impossible to prove. However, the fact that programs can be written that can not be proven, does not exclude the possibility that there are programs that can! It's 'a discipline of programming' ;-) Algorithms can be proven, (if you can't prove it, it's not an algorithm!) but the step from algorithm to implementation (the 'mapping') is a sore point. But you're right that all a strickt language can do to help is to improve the chances to catch an error. However, Did you take look at the work by Mishra and Mani Chandri in Austin on the provability of software, and the formal descriptional method they call UNITY. Have you looked at Component Pascal (Oberon-2, BlackBox) for a real neat modern approach? It's not perfect, but it sure is a step in the right direction, I think. -- Ruud Bruijnesteijn SDS Sport.Data.Systems GmbH http://www.sds-sportdata.com