The need for a formally verifiable mainstream programming language
30 points by florianhartung
30 points by florianhartung
There's an Ada forum topic from yesterday about why Ada's verifiable SPARK subset isn't being brought up in the same discussions as Lean and TLA+.
I have no formal methods training and have written verified programs in Ada/SPARK. It doesn't have true liquid or refinement types, but subtype predicates are super easy to understand and use. Verification runs off open source tooling (GCC/GNAT/Why3) and it plays super nice with LLMs.
+1 for Ada/SPARK
Ada is a silent giant that has been running our nuclear plants, planes, jets and critical infrastructure for decades. It's not hyped and its proponents are usually not loud about it. Ada speaks for itself.
Ada provides more guarantees than Rust, and often already at compile-time. Memory safety is just one element of formal verification, and Rust ends there and is mostly a normal systems programming language beyond that. While verus is available for Rust, it's just 'plugged in', whereas Ada has native support with contracts, etc. This is why I lament the strong push for rewriting things in Rust, when we could rewrite in Ada/SPARK and dial up the formal verification
It's also pretty clean; the consortium is not scared of deprecating stuff, unlike e.g. the mess we see with C++.
And Ada is aimed towards maximum readability and encourages the programmer not to write convoluted 'smart' stuff, which is what I often miss with Rust where the opposite is often the case.
As a PL nerd, I like the idea of Ada and SPARK, but a programming language that has you "request pricing" to use the compiler (source) is not very friendly to experiment with.
This is GNAT Pro, which has certifications etc. The GNAT core (compiler, prover, tools, etc.) itself is GPL and freely available. They need to make money somehow, don't they? GCC also has an Ada backend.
I don’t like that either but everything I’ve done is all free tooling. You don’t need the paid stuff and I’ve never used it.
Just to put this out there: This way of selling software (GPLed, with paid support/certification, etc.) is endorsed by the FSF. No one forces you to pay for anything, it's all free/open source.
My only issue is that they require you reaching out to get a price.
I don't work there (though I wouldn't mind working there), but I've had a lot of positive interactions with AdaCore employees over the years. AdaCore helped improve the support of these tools openly and for free, and have done a lot to support the Ada open source community.
An important thing to realize is that Rust is popular despite its borrow checker, not because of it. IMO this explains why Ada/SPARK is less popular than it might should be.
In my experience most people use Rust because they want a language which runs faster but is not much harder than Python, Javascript, Java, or Go. So it has (reasonably) nice build tooling that integrates into a broad and deep ecosystem of packages, has good IDE integration, familiar syntax, and doesn't take much effort to avoid UB, segfaults, and other "weird" issues. Rust beats Ada in all of these categories, except maybe avoiding UB and other weird issues.
Is that true though? All those guarantees come from the borrow checker plus the ml type system. If you wanted ml in the shape and ecosystem of an established there’s scala and scala native, which haven’t had as much success.
My point is mainly that the borrow checker is the devil people have to deal with to get the benefits of Rust. I think relatively few people choose Rust because they want formal verification, although certainly some do. But most of the time I've seen Rust rejected for a project, it's been primarily because of the borrow checker. And most of the time I've seen Rust chosen for a project, it's been because people were convinced the borrow checker isn't that bad.
The borrow checker was a huge innovation, and SPARK actually adopted it in the latest standard version. I read your statement as in, that the borrow checker hinders the developer, and despite this people like Rust.
As I said in a previous comment, memory safety is just one part of formal verification. This is a big part why I don't feel like going with Rust. If I rewrite something, it should be in a language that allows me to go further.
The things you list are a matter of taste (e.g. the syntax familiarity) and how much time people are willing to pour into something. A good example is python, which despite its brittleness carries on as people are willing to spend countless of hours into massaging all the foreign backends into it.
Ada is very old and its Pascal style is unfamiliar to most programmers nowadays. One main reason why it hasn't received more love is because it's associated with the military/MIC.
F* extracting to OCaml is crazy good. It has both SMT backed refinement types and dependent types. There’s ADA as well. Liquid Haskell. Koka. ATS. Lean. So many options to evaluate before inventing something new.
I don’t disagree but at the same time, we have at minimum verus verification of rust; frama-c; and key for Java https://www.key-project.org/
Stepping slightly out of the mainstream, we’ve got lots of formal verification systems and dependently typed programming languages.
Nevertheless in this year of our lord 2026, people are still writing new software in golang, Ruby, typescript, and Python, none of which are particularly suited to formal verification (and tbh I’m not quite sure why there are so many attempts at formal verification for golang but nothing that becomes mature).
People are even writing C programs without formal verification. I suspect that the children do not yearn for the formal verification and that everything is wedged in its ecological niche until something comes along that is better in every single way, cf the growth of rust growing in the same niche as C++.
If you happen to have experience in Verus, how is it?
I think its pretty good. You can do a lot with it. It gives a good mix of control and support for low level systems things and automation along the way. Certain things only come out of building a fuzzy intuition for how to debug proofs, but LLMs are pretty good at it and there is development in making it more user friendly.
(disclosure: Ive done quite a bit of work on verus itself)
https://bend-lang.com/ sounds very similar to what the author is suggesting. I‘ve never used it.
This is a political problem. The author basically admits as such on the first paragraph:
The default was to be sloppy and poorly considered […]
And it is still now. LLMs merely made it worse by giving a nuclear arsenal to the tactical tornadoes. Having technical solutions that reduce the initial cost of doing things right is great, but unless we can reduce it below the (initial!) cost of doing it wrong, we'll still have a problem.
The root of the problem as far as I can tell, is a culture of externalising costs. Which is the corporate way of screwing over your neighbour, your country, the entire planet, just so you can fill your pockets a little more. If you engage in that behaviour, you're being bad, and you should feel bad. (I may forgive you if it's a matter of survival.)
This work at several levels. At the lowest we have our tactical tornado, that moves fast and breaks things. One problem is they're often rewarded for that behaviour, because they appear to get things done, and management don't always see the workload of everyone else increasing in their wake. How do you distinguish a tactical tornado from a damn good dev, if you're not technically competent yourself? Colleagues complaining could be a hint, but that one too has it share of false positives.
At the highest, there is a disconnect between what works, and what sells. Now people won't buy an obviously broken product (except in B2B, where the buyer and the end user typically aren't the same person), but sufficiently infrequent crashes, subtle enough corruption, or tolerable enough resource usage or lag may not affect sales at all. (This is different on sells tunnels, because any glitch on the sales tunnel itself will hurt the sales of the product.) Once the user bought (into) the product, it's a bit too late. But with enough users, the cost of just waiting a few seconds for the program to boot quickly adds up.
I believe we should seriously consider regulation. It start with accountability. You sell something, you're responsible for it. If it's not fit for purpose, you reimburse your customers. Your software causes damages, you pay for it. (Of course, misusers gonna misuse, you probable shouldn't be responsible for that.) You chose a dependency and it breaks, you are responsible for it, and it's your job to sue whoever you got it from — or having arranged the appropriate contracts in advance. (And yes, that means tons and tons of paperwork for a "simple" Node package. I consider it a potential feature.)
And finally, unreasonable resource usage should be cracked down upon somehow. Though for this one I'm not sure the regulation hammer is appropriate. What would be real nice would be to have the OS punish the resource hogs by default. This is already partially the case: I believe Linux's OOM killer for instance kills the programs that consume the most RAM first. But the same can be said for speed: programs that consume the most CPU should be given the lowest scheduling priorities (unless maybe it's a real-time interactive simulation running in the foreground, but those can be fairly well served with an easily accessible FPS counter or similar).
I believe we should seriously consider regulation.
It might be that currently is a short window when an extremist stance (to make previous demands look the moderate sensible compromise) has a justification within the current Overtone window…
Basically, software has no liability because the specific laws that forbid disclaiming liability were explicitly carved to make copyright licenses exempt. And the political cover was that there is not enough development throughput to make software to food safety liability rules.
Well, if LLMs are great at writing software (why search for the truth when one can take the claims of another side at face value), and layoffs are caused by incredible improvements in efficiency due to LLMs (everyone is welcome to admit their lies and mismanagement though!), then there is now and forever (LLMs are the future, right?) a sufficient supply to make it true that the company chooses how many bugs to ship.
High time to reduce the liability carveouts for for-profit products. We can start with DMA-defined of gatekeeper companies, who are (as a condition of being on The List) maintaining their position in large part via network effects, not just based on independent customer choice, and therefore avoid correctness pressure almost completely.
I agree, every software problem is a public goods problem in some way. It's interesting to think about what legal changes could actually solve this, it does seem nontrivial ha
earlier this month someone at our local functional programming group made the case that , well, lean itself is a perfectly serviceable general programming language!
Or at least the language itself has the right trappings. My impression is lots of the libs are still in the “lots of obvious and missing stuff” phase
The first two links in the article citing its sources are broken, the second apparently presuming authentication credentials the general public wouldn’t have.
These should be the two links. I've written a mail to Blaine to let them know :)
https://pages.faros.ai/hubfs/AI_Engineering_Report_2026_The_Acceleration_Whiplash_Faros.pdf
https://media.it-cisq.org/wp-content/uploads/2022/11/04192444/CPSQ-Report-Nov-22-2.pdf
Ughhhh two things throw me off here.
The deluge of text and blog posts is why when I find an article written before 2022 or 2023 i tend to favor it over anything recent.
Hey, author here. It's true that I haven't given extensive discussion of prior art; some languages I have omitted at some pain (for the sake of brevity) include Dafny and F*. From a comment on HN, I am reminded of SPARK, with which I am not particularly familiar and therefore did not want to speak authoritatively on.
As for your second point, you couldn't be more wrong, and your subsequent "just share the prompt!" comment cannot be construed as anything but presumptuous and rude. I wrote this article myself, by hand, in my own original voice. I did not use LLMs for writing, suggesting text, structuring the article, or deciding claims. (I did use it to spot correctness mistakes, because it's hard to get feedback from someone who can spot issues in the domain on short notice!)
What? Did we read the same post? The author clearly discusses prior art in formal specification languages (TLA, Iris, Lean, ...). And I don't see any Claudisms either. The writing style in general seems consistent with the author's 2024 writing before LLMs were mainstream.
Bluntly, your comment seems like a very lazy and rude dismissal of an interesting article.
A couple of random thoughts on the open questions:
If you want to know anything before deployment, you need to complement assertions with a way to trigger them, be it a test suite or a fuzzer. Proofs are, in a sense, about listing the assertions that are not verifiably un-triggerable under the given assumptions (so they are not just enriching intrinsic specification, but also making it checkable without an extrinsic driver)