logoalt Hacker News

The need for a formally verifiable mainstream programming language

279 points • by todsacerdoti • today at 5:22 AM • 280 comments • view on HN

Comments

supermatt • today at 7:22 AM

I couldn’t read past the first paragraph.

What are people doing that they are finding quality is nose diving? That’s completely the opposite of my experience. I’d like to know, but the link is broken

But of course software engineering has always had this problem, right? Oh! Another broken link.

Maybe we need to start closer to home when it comes to quality.

singularity2001 • today at 7:56 AM

Bend is working on it and https://github.com/pannous/wap/

0815beck • today at 6:55 AM

"i want to formally verify the program" should be met with the same reaction as "i want to prove that this is true", namely WHAT, what exactly do you want to prove

Overdrivr • today at 10:27 AM

Hard disagree, you'll only end up with spec errors and the specs will need to become so detailed to be defined that you'll end up back to square one.

Lean works well for math because there are many orders of magnitude of difference between defining a spec (ex P=NP) and implementing the proof. I don't think this applies for conventional software eng

nightmunnas • today at 7:47 AM

I would love to contribute to a project like this. What are the existing projects that try to achieve this?

dnautics • today at 2:19 PM

C is formally verifiable if youre Sel4

moneybunny • today at 7:34 AM

Are we going to write backend in lean now or who is gonna train ai with a brand new lang?

stsch • today at 8:37 AM

"Quality is nose-diving" leading to a 404 is funny in this one. ;-)

aloisdg • today at 6:47 AM

F*?

bigstrat2003 • today at 4:55 PM

We don't need formal verification, we need people to wake up to the reality that LLMs are not good at programming. Stop using them to write your code and you will have software which works better.

sylware • today at 10:40 AM

You will proove bugs...

globular-toast • today at 6:35 AM

Is it part of the joke that the first two links in the post are 404s?

➕ show 1 reply
xiaoyu2006 • today at 7:51 AM

Just make Lean useful?

Dashadower • today at 8:19 AM

Usability, strong verification guarantees, expressiveness

You get to choose 2 out of 3

➕ show 3 replies
vibebingo • today at 12:00 PM

Did someone say magic bullet? This sounds noble but formal verification doesn't take into account if you got the requirements right, human factors and more.

Arodex • today at 9:56 AM

Very ironic the first link titled "quality is nose-diving" doesn't work.

wseqyrku • today at 8:45 AM

If you think you ever need anything more than rust, drink bleach. I mean if dealing with borrow checker is a hard pass for you maybe let's not talk about formal verification

shevy-java • today at 9:11 AM

But if AI is writing code for us now, do people need to learn programming? To me that's a chicken-egg dilemma. Some languages struggle getting new people to use them.

DeathArrow • today at 8:17 AM

1. When coding was done exclusively by humans we still had lots of bugs, inefficiencies, poorly written and poorly architected software.

2. While at start LLM output was not great, models are continuously improving and the quality of coding by frontier models is good. (Even weaker models like Deepseek Flash can output high quality software if driven carefully)

3. By analyzing the model output, having lots of gates, having good testing habits and by asking the models to manually test what they did, and constantly changing my workflow to improve the output, I am very happy with the results and probably my workflow using AI is of better quality than if I would do it by hand.

4. If the software isn't of worse quality than if done by human teams with realistic constrains (time, money etc.), then using AI is a net gain.

5. While striving for perfection is great, doing when to do compromises and trade-offs, is even greater.

➕ show 1 reply
DeathArrow • today at 8:16 AM

1. When coding was done exclusively by humans we still had lots of bugs, inefficiencies, poorly written and poorly architected software.

2. While at start LLM output was not great, models are continuously improving and the quality of coding by frontier models is good. (Even weaker models like Deepseek Flash can output high quality software if driven carefully)

3. By analyzing the model output, having lots of gates, having good testing habits and by asking the models to manually test what they did, and constantly changing my workflow to improve the output, I am very happy with the results and probably my workflow using AI is of better quality than if I would do it by hand.

4. If the software isn't of worse quality than if done by human teams with realistic constrains (time, money etc.), then using AI is a net gain.

Nursie • today at 7:37 AM

> The only way forward is to fully embrace formal verification, all the way down to the foundations ... But that's easier said than done. Existing formal verification tools suffer from massive usability and understandability problems, and have failed to make any kind of noticeable impact ...

This is sort of a counterpart to my own opinion of formal verification, since first learning about it 30 years ago.

Firstly, if there's no direct link between the written code (or perhaps even the program code post-compilation) and the verification algebra, what are you really verifying? And secondly if we can 'get by' without it very well for the most part, then justifying the extra effort is very hard.

And I would argue in contrast to the author that we have achieved a hell of a lot without using it particularly widely. Much like that late-90s obsession, the semantic web, it illustrates a major disconnect between assumptions in the halls of academia about how the world should work, and real world industry practice.

So if there is value in formal verification then the author is right, if must be applicable directly to the program code under verification, and I would argue it must be low friction if it's going to get adoption. And I think LLMs can probably help us deliver that last part.

➕ show 2 replies
techpression • today at 7:27 AM

A programming language is more than compilation, which I feel the post misses. I pick language because of its runtime properties and quality of life, I don’t want to reinvent every foundation in every project with a barebones language.

light_hue_1 • today at 6:56 AM

If Haskell would finally give up on the disaster that is laziness (and by extension GHC) and pivot to formal verification, this could be the killer app.

Much of what the author wants already exists!

➕ show 3 replies
baq • today at 7:11 AM

Somebody call Victor Taelin

ezekiel68 • today at 7:08 AM

Obligatory: "...or else, what?"

If it's truly needed, it will appear (or has appeared already) in one form or another.

JodieBenitez • today at 6:32 AM

Yet another article claiming software quality is "nose-diving" because of AI, while we're piling [insert anything]2root exploits based on decades of real human sloppiness. Meanwhile, in-house software keeps getting better.

bytepatterns • today at 9:02 AM

[dead]

conrs • today at 6:55 AM

[dead]

merrowd • today at 10:24 AM

[dead]

DarrenEdwards11 • today at 8:08 AM

[dead]

oxcartctl • today at 8:19 AM

[dead]

exa_bit • today at 9:05 AM

[dead]

twotwoone • today at 8:03 AM

[dead]

protocolture • today at 6:44 AM

> fully embrace formal verification, all the way down to the foundations of our civilizational software stack.

I am getting so tired of LLMs being used as leverage for people to basically thrust their random viewpoint and make it all philosophical.

"LLMs mean my thing is best and everyone needs to do it or become post-civilizational transhuman paperclips"

I almost wish the stupid AI safety sex cult could convince Sanders and Trump to nuke us back to the stone age if only to save us from the onslaught of low-quality bad faith takes.