Damus
David Chisnall (*Now with 50% more sarcasm!*) profile picture
David Chisnall (*Now with 50% more sarcasm!*)
@David Chisnall (*Now with 50% more sarcasm!*)
I accidentally read LinkedIn again and lots of people are talking about the flow of writing code with an LLM and then using a feedback loop with formal verification to reject incorrect implementations.

On the surface, this seems sensible: LLMs can produce kind-of correct (or, at least, correct-looking) code rapidly, verification tools can tell you if it’s correct and you can just keep exploring the design space until you find something correct.

But the bit no one is talking about is: who writes the specification, which must be sufficiently detailed that it can reject incorrect things (including thins in the wrong complexity class, so you don’t accept when the LLM writes a factorial complexity algorithm where a linear one would work)? And why is writing a formal specification believed to be easier than writing code? And what tools can take an arbitrary program and prove that it does or does not implement a spec? If these things were all easy, formal verification would already be ubiquitous.
3
Anders Stenberg · 17w
nostr:nprofile1qy2hwumn8ghj7un9d3shjtnyd968gmewwp6kyqpqncxka2nmkqkndk4wkuf3tz3l39z9m8xax3aen3h8tvudwgjmf5mq4uv2v2 I haven't fully thought this through so maybe I'm wrong, but I feel like a _full_ correct specification of how a program should work has to be on par in complexity with "just" writing th...
Peter Bindels · 17w
nostr:nprofile1qy2hwumn8ghj7un9d3shjtnyd968gmewwp6kyqpqncxka2nmkqkndk4wkuf3tz3l39z9m8xax3aen3h8tvudwgjmf5mq4uv2v2 > And why is writing a formal specification believed to be easier than writing code? Code is just whatever format it takes to specify for a computer what it should do, in an unambiguous...
Skjeggtroll · 17w
nostr:nprofile1qy2hwumn8ghj7un9d3shjtnyd968gmewwp6kyqpqncxka2nmkqkndk4wkuf3tz3l39z9m8xax3aen3h8tvudwgjmf5mq4uv2v2 Actual _formal_ specifications and proof of corretness against them exist, but they are difficult and require a lot of work and specialized tools and skills. There is absolutely no way...