Au contraire, it's both horrifying and impressive that so much of the software industry has grown for decades without formal verification. With the accelerated production ("productivity") of machine-generated code, we're at a threshold where it will become impossible to manage the complexity unless we change our ways.
I think it's simple to understand. Most code is now written by LLMs and the bottleneck is verification. If with a few more tokens thrown at TLA+, Lean, etc. we can achieve _guaranteed_ correctness, it's an amazing deal. I'm not saying it's possible or even that it works that way, but that's the dream.
Obviously! That's what being a good engineer has always been about — automate away the mundane of your job, and think through what else could be automated next!
As for reviewing AI code, have you seen some of it? Nobody wants to review that!
I agree mostly, but not that verification being a bottleneck is the principal part. Isn't it rather that as we push ourselves to working at higher levels of abstraction, managing agents, we want to be sure we're not just letting them go off and do whatever, but keeping some reins on them? We might no longer be able to do what they do - I'm thinking RH in Lean - but if it's formally verifiable we can at least say a model output complies with a specification (unless the agent hacked the formal verification stage).
We want to be confident we're not being duped.
It's like we skipped over the Laws of Robotics, but we're writing some sort of Mosaic 'moral' code for generative models.
The way I see it is that there are 2 places where formal methods help:
- Proof the absence of runtime-errors/panics
- Proof functional correctness
The sweet spot for many users is the first. Make sure that the application cannot crash. No array-out-of-bounds read/write, no memory issue on ANY input, formally proven at compile time.
This requires additional work in the program to annotate (in SPARK at leasts) and knowledge from the programmer, which meant that there was a barrier to entry.
Well, LLMs COMPLETELY remove this barrier to entry. You can write the logic and have the LLM add the contracts to get to the proof. This works in most cases.
And then, for truly critical code, you can look at functional correctness as a cherry on top of your cheesecake.
(1) security - If we want secure systems they have to be watertight. And AIs are good at hacking.
(2) reasoning ownership - The AI models not being open weight and their thinking not being published means you don't own the reasoning process. Formal modelling (of requirements and specification) and proving is a way to partially retake that ownership.
Replies (7)
2. ????
3. Post Human Singularity or something
Replies (4)
Replies (1)
As for reviewing AI code, have you seen some of it? Nobody wants to review that!
We want to be confident we're not being duped.
It's like we skipped over the Laws of Robotics, but we're writing some sort of Mosaic 'moral' code for generative models.
verification against whose spec?
The sweet spot for many users is the first. Make sure that the application cannot crash. No array-out-of-bounds read/write, no memory issue on ANY input, formally proven at compile time.
This requires additional work in the program to annotate (in SPARK at leasts) and knowledge from the programmer, which meant that there was a barrier to entry.
Well, LLMs COMPLETELY remove this barrier to entry. You can write the logic and have the LLM add the contracts to get to the proof. This works in most cases.
And then, for truly critical code, you can look at functional correctness as a cherry on top of your cheesecake.
(1) security - If we want secure systems they have to be watertight. And AIs are good at hacking.
(2) reasoning ownership - The AI models not being open weight and their thinking not being published means you don't own the reasoning process. Formal modelling (of requirements and specification) and proving is a way to partially retake that ownership.