4 ms·
Firstly I don't expect to prove a whole program. However being able to prove the correctness of key functions or algorithms in a program could be useful. You
by rwmj 12y ago
Firstly I don't expect to prove a whole program. However being able to prove the correctness of key functions or algorithms in a program could be useful.
You mention glibc, and it would be great to prove that (for example) 'qsort' is correct. That wouldn't be entirely trivial:
https://sourceware.org/git/?p=glibc.git;a=blob;f=stdlib/msort.c;h=4e17a8874736d7a653b3f589fbb7ad253225c939;hb=HEAD https://sourceware.org/git/?p=glibc.git;a=blob;f=stdlib/msor...
https://sourceware.org/git/?p=glibc.git;a=blob;f=stdlib/qsort.c;h=304fbed8e5d8d2edfd606ab7db6412e408c1d479;hb=HEAD https://sourceware.org/git/?p=glibc.git;a=blob;f=stdlib/qsor...
For an example of a larger program, I'd like to prove various invariants of C programs, such as that 'reply_with_error' is called exactly once on every error path in this program:
https://github.com/libguestfs/libguestfs/tree/master/daemon https://github.com/libguestfs/libguestfs/tree/master/daemon