Re: Proof of Algorithm correctness



Maarten Bergvelt wrote:

>In article <1112376088.698746.302290@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>,
>Deodiaus wrote:
>
>
>>Has anyone seen a "proof of algorithm correctness" for a large program.
>> Most of the proofs I have seen are for trivial small programs (e.g. a
>>sort algorithm), but want to see a proof for substantial programs. I
>>know that the problem becomes the verification of the proof and keeping
>>track of the onerous details. Oftentimes, the algorithm can be
>>incorrect, but since the person doing the proof is convinced the
>>algorithm is correct, he can be blind to errors and get lost in the
>>tedium of a proof like that.
>>I suppose that computer program have been written which "attempt" to
>>prove program correctness in certain cases, but those tend to
>>manufacture a proof, which might not be right.
>>I think it was Turning who stated that no such algorithm exists because
>>if it did then you could use it to prove itself. Thus this became an
>>inpossible aspiration.
>>
>>
>
>Maybe you should look at the work of Edsger Dijkstra, see
>http://www.cs.utexas.edu/users/EWD/. He proved the correctness of
>rather famous algorithms.

I would suggest looking at of some of the earlier publications (1960's
- 1970's) of logician/computer scientist Jon McCarthy. He and one of
his students (if memory serves me correctly) gave a correctness proof
of a compiler for a reasonable subset of the Lisp programming
language.

Other examples of large program proofs occur in the area of verified
security kernels, aka secure operating systems. The typical approach
in this case is to establish and invariant - the security policy
written in a first order language - then show that the invariant is
true initially and is true after each application of an operation
(e.g., a login or file open). The operators are usually represented by
a few first order expressions: one that describes the necessary state
when the operator is applied and one that describes the new system
state in terms of the old state and the operator parameters. More
ambitious efforts then try to prove correspondence between the model
and an implementation. Intermediate stages of proof/validation include
proofs of the consistency of the invariant and dealing with the
difference between the max and min fix points of the model.

A few products certified A1 by the Orange Book criteria (NSA) actually
used the above approaches as part oft the certification process. Do a
google search using keys "blacker" and "security" to look for some
examples.

-- Jeff Barnett

[Formatting adjusted by moderator. Please do not submit multipart email as
a newsgroup post. Flat text only, with lines under 80 characters. --djr]

.



Relevant Pages

  • Re: Blowfish Sign Extension implementation risk
    ... Usual approach is to specify the algorithm in a computer-understandable ... Some people work on proofs of program correctness: ... with more low-level languages like C, ... one could try to design the algorithm ...
    (sci.crypt)
  • Re: JSH: Weird feeling
    ... I recall, back when you claimed to find a polynomial algorithm for TSP, that you gave "proofs" of correctness for your algorithms, algorithms that were later shown to be incorrect. ... My family's too spread out to be killed with a bomb. ... Intelligence services need to note that I have ...
    (sci.math)
  • Re: Hash functions (was: Maximum String size in Java?)
    ... > "Even though a hash table is a fairly wonderful data structure, ... correctness are, which implies simplicity and consistency of the ... It doesn't take long for an Oalgorithm to become unusable, ... the broken "Reply" link at the bottom of the article. ...
    (comp.programming)
  • Re: puzzle
    ... >>>such an algorithm is when n is very small so there is no need to perform ... >>>any other optimizing tricks. ... Tricks and algorithms) the Xor solution is unacceptable. ... but we were not talking about correctness but about execution speed. ...
    (comp.programming)
  • Re: Checking for null parameter
    ... any invariant wich can't be enforced by java code. ... it's because you haven't fully analyzed the algorithm. ... You don't just throw away the whole analysis because you broke it - that's exactly the sort of trouble invariant analysis is designed to help with. ...
    (comp.lang.java.programmer)

Loading