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=1.3 required=5.0 tests=BAYES_00,INVALID_MSGID, MSGID_RANDY autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,14f7200925acb579 X-Google-Attributes: gid103376,public From: Robert Dewar Subject: Re: No Go To's Forever! Date: 2000/03/29 Message-ID: <8bu3o4$3b4$1@nnrp1.deja.com>#1/1 X-Deja-AN: 604074370 References: <8bbsc6$aes$1@nnrp1.deja.com> <8bdbof$t19$1@nnrp1.deja.com> <38E1F6D5.8303903C@dowie-cs.demon.co.uk> X-Http-Proxy: 1.0 x24.deja.com:80 (Squid/1.1.22) for client 205.232.38.14 Organization: Deja.com - Before you buy. X-Article-Creation-Date: Wed Mar 29 23:31:16 2000 GMT X-MyDeja-Info: XMYDJUIDrobert_dewar Newsgroups: comp.lang.ada X-Http-User-Agent: Mozilla/4.61 [en] (OS/2; I) Date: 2000-03-29T00:00:00+00:00 List-Id: In article <38E1F6D5.8303903C@dowie-cs.demon.co.uk>, Martin Dowie wrote: > speaking of proving things... > > one of the reasons I had always been told for avoiding using gotos, was > that it makes a program unprovable. a) was this true; and if so, b) is > this still true? Well it's an overstatement, obviously limited forms of gotos are totally equivalent to simple control structures and thus neither harder or easier to prove correct. It is true that the denotational semantics of a general goto is very tricky. If any of you can dig out ancient materials, have a look at the source code of Ada/Ed. This was basically an executable denotational semantics. At this level, an if statement was coded something like: if evaluate (expression) = true then replace if with then part else replace if with else part end; the coding for goto was really complex and horrible (and interestingly REALLY inefficient :-) So yes, general gotos can definitely make proof of correctness more difficult. Sent via Deja.com http://www.deja.com/ Before you buy.