Article View: comp.lang.misc
Article #3790Re: Proving correctness of programs in functional languages
From: Raul Rockwell
Date: Tue, 14 May 1991 04:42
Date: Tue, 14 May 1991 04:42
37 lines
2431 bytes
2431 bytes
Dave Gillett: When we define our domain of discourse to be functions, which accept inputs and produce (we hope!) results, we are able to express the necessary properties for verification of each function in terms of predicates linking properties of the inputs to properties of the results. Composition of functions leads to combination and simplification of intermediate predicates, and ultimately to the set of pre- and post-conditions which demonstrates (or, as appropriate, fails to demonstrate) that our composition has the properties which we wish it to have. This is nice, not only for "proof of correctness", but for things like designing optimizers. I believe everybody is familiar with the way a specific case can often be implemented more efficiently than a general case? This exercise is entirely in terms of functions and predicates, which are mathematical objects, and any well-defined functional notation is sufficient to allow us to proceed to proof. By contrast, the majority of the literature that I have seen on the verification of procedural programs starts, instead, from the notion that a program is a "text". Resolution of syntactic and semantic issues, in order to arrive at suitable objects for reasoning, becomes a major task; indeed, there is rarely time or space left for the actual proof itself. yacc at its finest :-) The way I understand it, the term "functional language" was invented by Backus to describe the deficiencies he saw in the languages he'd helped develop (fortran, algol). Since people don't talk about this much, I should point out that he also talked about Applicative State Transition systems (with formal functional programming as the subsystem used to generate a state). Raul Rockwell
Technical Details
Message-ID:
<ROCKWELL.91May13234235@socrates.umd.edu>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!wuarchive!udel!haven.umd.edu!socrates.umd.edu!socrates!rockwellReferences:
<873@saxony.pa.reuter.COM>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!wuarchive!udel!haven.umd.edu!socrates.umd.edu!socrates!rockwell From: rockwell@socrates.umd.edu (Raul Rockwell) Newsgroups: comp.lang.misc,comp.lang.functional Subject: Re: Proving correctness of programs in functional languages Message-ID: <ROCKWELL.91May13234235@socrates.umd.edu> Date: 14 May 91 04:42:35 GMT References: <873@saxony.pa.reuter.COM> Sender: rockwell@socrates.umd.edu (Raul Rockwell) Organization: Traveller Lines: 37 In-Reply-To: dgil@pa.reuter.COM's message of 13 May 91 19: 19:11 GMT