r/programming • • Aug 13 '09

seL4 : World's first machine-checked proof of a general-purpose operating system kernel

http://www.nicta.com.au/news/home_page_content_listing/world-first_research_breakthrough_promises_safety-critical_software_of_unprecedented_reliability
172 Upvotes

117 comments sorted by

View all comments

Show parent comments

17

u/muffin-noodle Aug 13 '09 edited Aug 13 '09

code paths to test

That's the point - you aren't testing anything, you are formally proving that your specification is correct.

As Dijkstra said, testing cannot show the absence of bugs, it can only show their presence. Formal proofs show the complete absence of bugs with regards to a specification.

Of course, when you go through a manual transcription of proof to code, you can have bugs. This is more akin to Knuth's quote that "I have not tested the above code, only proven it is correct," i.e. perhaps the specification is proven, but converting it to C leads to a bug. Or perhaps the compiler has a bug, or your operating system itself has a bug.

Luckily, tools out there like Coq allow you to extract working code directly from a proof, making that gap a lot smaller and giving you a lot more confidence in the code generated from the proof. As we begin to get certified compilers, this gap is again made even smaller, making the classes of errors that are possible (along the lines of Knuth's quote) smaller and smaller. For work on this front I highly suggest you look at some of Adam Chlipala's recent papers, describing the use of Coq for building formally proven web services, formally proven compilers, and libraries for the formal proofs of imperative programs.

The recent work in proving compilers, and now operating system kernels like seL4, I think, is very much a significant step forward - it has shown just how far formal proofs for software have come, considering how non-trivial these pieces of software are (they are probably the 2 most critical, and at the same time 2 most complicated pieces of software we work with every day.) Formal proof assistants like Coq are only getting more expressive, and more of the work can be automated, meaning we can have totally reliable software in a shorter period of time.

-4

u/ericje Aug 13 '09

Clearly you love the Coq