logoalt Hacker News

grohan • today at 6:52 AM • 5 replies • view on HN

Formal verification is not a silver bullet! I am afraid AI has positioned it as the ultimate red herring (and nerd-snipe).

I recommend reading Cantwell Smith's "The Limits of Correctness" https://dl.acm.org/doi/pdf/10.1145/379486.379512

The TL;DR is that proofs only show that the program matches a spec, not that the spec matches the world. The gap between "what you can model" and "the real world" is generally too large for formal methods to be useful (outside of narrow domains, where they are highly useful).

In other words, computing is closer to an empirical science than a formal one.


Replies

nr378 • today at 2:36 PM

The program matching the spec matters a great deal for security purposes. If we achieve nothing other than that, we’re in a much better position than we are today with C and PHP.

gf000 • today at 8:31 AM

Proofs are programs themselves. So if you generate the very program from your proof (like with lean), that mismatch should not really happen.

Of course you may have still written incorrect spec, and once you have IO you probably won't model the whole Linux kernel in the proof.

mirekrusin • today at 10:30 AM

You can say the same about tests, yet they're useful and everybody is using them.

kbr- • today at 8:08 PM

The gap between the spec and the world is a minor technicality that will be solved in 1 month, max. You can quote me.

Dashadower • today at 8:28 AM

"If civil engineers built bridges like how software engineers write software there would be no bridges left today"