r/ProgrammingLanguages • • 6d ago

What’s going on with program verification?

https://blog.sigplan.org/2026/11/17/whats-going-on-with-program-verification/
41 Upvotes

11 comments sorted by

14

u/its-been-a-decade 5d ago

I think the author here is very close to pointing out something that I and several of my colleagues have thought for a very long time: the problem is the language. Of course it will cost millions of dollars to verify the correctness of machine code, if for no other reason than it takes an enormous amount of effort simply to specify what “correct” means. We need a language that permits abstract formal specification and a suite of verified components on which to layer applications (without having to re-prove the component again). At that point, we can dispatch verification conditions to whatever theorem prove we like best because it turns out, with sufficiently abstract specification and implementation, VCs are almost always “easy” in the sense that a human can check out the givens and the goal and quickly recognize their validity. Of course there’s plenty of work to be done in automating these proofs using classical methods but I can’t imagine an LLM would get tripped up by these things to the tune of millions of dollars.

Incidentally, one idea a colleague of mine had recently was related to VC proofs with an incomplete theorem prover. Their idea was, in essence, to dispatch unproved VCs to an LLM and direct it to generate a proof and proof certificate. As mentioned above, the VCs are usually so relatively easy that it’s not going to require deep mathematical insight to prove.

5

u/Royal_Pin_1971 5d ago

Without sounding too presumptuous, PFCL, the language I’m building, is exactly what you described: building software from verified components. Instead of library, components (pure functions) enter a content-addressed catalog once. At admission they’re checked for typing, totality and termination and programs are composed from them without re-proving anything. I cannot yet say they are checked for functional correctnes - beacuse it also comes with question of semantics: "is this functionality that is meant" - but function is correct within laws, complexity, preconditions and postconditions specified in metadata. Composing admitted components generates no new verification conditions, so the proof step mostly disappears instead of being handed to a prover.

20

u/pthierry 6d ago

The LLM hype has many facets. I wonder what will become of this one after the bubble pops. I wish the interest in formal verification will not due out.

4

u/Mickenfox 5d ago

Even with assumptions that vastly favor the LLMs, Astrée comes out more than 400 times faster on 20-year-old hardware than today’s best models running on GPU clusters

Have we tried using those $134M worth of tokens to improve Astrée and seeing what comes out?

Also "verify machine code directly" seems insane. We build software piece by piece for a reason. Encoding semantics and restrictions is what programming languages do.

3

u/ryo33h 6d ago

I wonder if divide and conquer could help here.
Also, I hope languages that are fast and support formal proofs become popular.

3

u/matthieum 5d ago

Rust is decently popular, definitely fast (to execute), and has decent support for proofs (in the form of compiler plugins).

I hope that, at some point, the custom attributes (& syntax) used to describe pre-conditions, post-conditions, and invariants are standardized in the language.

3

u/ryo33h 5d ago

I love Rust, and I hope it evolves in the way you describe. And i think that's the most realistic scenario. It’s extremely hard for new languages to gain mainstream adoption.

3

u/garagedragon 5d ago

Contracts being considered as a first party feature in Rust is really cool, but as the GH issue about it points out, it's really complicated to cover all the possibilities of unsafe, weird lifetime logic, etc.

You can probably cover 90% of safe code with only a few constructs so hopefully those arrive relatively quickly

1

u/pthierry 4d ago

This reminds me of The Curse of The Excluded Middle. It's vastly easier to start from something easy to reason about and add features, than to start from something designed only from a practical point of view and adding proofs while maintaining backwards compatibility.

1

u/matthieum 4d ago

Oh god... yes, I was definitely thinking safe code only here.

Mind you, Creusot does perform verifications on unsafe Rust code, so there is work there, but you need "Separation Logic" to reason about unsafe Rust code and I imagine that'd bleed into unsafe contracts... so I'm not sure how approachable it'd end up being.

Would be really cool, though.

2

u/joonazan 5d ago

I think the price for verifying nixpkgs wouldn't be that ridiculous if it was something stronger than not crashing. That kind of project would find an enormous amount of bugs, so getting those fixed might be a big part of the cost.

Correctness is a tricky target, though. Some parts are easy to specify but hard to implement. There a correctness proof is great. But some parts are best when expressed in concise code. Those parts would ideally get a good DSL, which is something AI is incapable of designing.