news.volyx.in

Lean proved this program correct; then I found a bug (kirancodes.me)

395 points by bumbledraven · 139 days ago · 178 comments on HN

Article summary

The article discusses the use of formal verification in software development, specifically with the Lean proof assistant, and how it was used to verify the correctness of a zlib implementation. However, despite the verification, bugs were found in the Lean runtime and in an unverified part of the code. The article highlights the limitations of formal verification and the importance of considering the entire software system, including unverified components. The author argues that formal verification is a valuable tool, but it is not a guarantee of bug-free code.

Main themes

  • Formal verification
  • Software correctness
  • Lean proof assistant
  • Bug detection
  • Software security
  • Trusted computing base

What commenters say

  • Formal verification can prove the soundness of an implementation, but not the correctness of the design.
  • The chance of bugs in a formal verification tool is not equal to the chance of bugs in the program being verified, as the tool is simpler and more widely used.
  • A bug in an unverified part of the code or in the runtime can still compromise the security of a formally verified program.
  • The title of the article is misleading, as it implies a flaw in the Lean proof, when in fact the bug was found in the runtime or unverified code.
  • Formal verification is a valuable tool, but it should not be relied upon as the sole means of ensuring software correctness.
  • The entire software system, including unverified components, should be considered when evaluating the security and correctness of a formally verified program.
  • The article's findings do not necessarily undermine the value of formal verification, but rather highlight its limitations and the need for a comprehensive approach to software security.
  • The use of formal verification can help to eliminate certain classes of bugs, but it is not a substitute for thorough testing and validation.