From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f8c65,37e683828bae12e2 X-Google-Attributes: gidf8c65,public X-Google-Thread: 109fba,37e683828bae12e2 X-Google-Attributes: gid109fba,public X-Google-Thread: 1008e3,37e683828bae12e2 X-Google-Attributes: gid1008e3,public X-Google-Thread: 1164f8,b0b9a5eaad4ab6eb X-Google-Attributes: gid1164f8,public X-Google-Thread: 1014db,37e683828bae12e2 X-Google-Attributes: gid1014db,public From: bill@cafe.net (Kaz Kylheku) Subject: Re: [++] Tight coding Date: 1998/03/02 Message-ID: #1/1 X-Deja-AN: 330058901 References: <6csl81$rb9@news-rocq.inria.fr> <6dbgjv$lg$1@andros.cygnus.com> <34F97152.DBF199BD@sds-sportdata.com> <6dcdvp$6oa$1@mainsrv.main.nc.us> Organization: Internet Direct NNTP-Posting-Date: Mon, 02 Mar 1998 09:12:50 PST Reply-To: kaz@cafe.net Newsgroups: comp.sys.dec,comp.lang.c++,comp.lang.c,comp.lang.modula2,comp.lang.modula3 In article <6dcdvp$6oa$1@mainsrv.main.nc.us>, wrote: >The best refutation of proofs for programs is in Peter van der Linden's >Deep C Secrets. He shows a page from such a proof, which is >incomprehensible to anyone other than a theoretical mathematician, and >then describes a Usenet flame war about an error in a proof. > >There are not enough programmers to go around, and requiring >mathematicians to prove programs on top of them will never work. The >only hope we have is "black box" object programming, where an object is >just a plug-in component. It will either work reliably, or can be >replaced if it does not. But over time, you could create libraries of formally proven black boxes. The time required to do the proof is worthwhile if countless people can benefit from it. I don't believe your claim that such proofs are comprehensible only to theoretical mathematitican. Anyone with a background in computer science should be able to follow such a proof. The proofs usually involve simple predicate logic, and simple algebra. There exist excellent textbooks on formal verification which can provide a refresher course. Knowing the techniques can help you write more solid code even in situations where you don't apply the techniques, because they give you a framework for reasoning about program logic.