We don't need a new verifiable language, everyone trying to build new ones is suffering from NIH in my opinion.
Lean is already an extremely powerful and performant FP whose capability is essentially a superset of all other FPs and which has the most powerful metaprogramming and DSL building features outside of Racket
It has massive, likely insurmountable network effects in terms of the lemmas already written for it which can be reused in general purpose contexts
What we need is more libraries, frameworks, contributions to Core and Batteries which make it more useful outside of the domain of pure proofs and mathematics which has obviously been the focus so far.
I’m surprised SPARK programing language was never mentioned.
> I believe that one crucial distinction is preventing the meteoric ascent of AI in software of the formally verified kind: the everpresence of change.
This is actually also what I realized after a year or so in industry. (I was quite enamored of formal verification in college.)
Here's what I've been thinking about lately. Many problems in constrained optimization can be solved much more easily if you know *which* constraints to the solution are actually important and how their relative importance looks like (dual variables). A similar effect can be found in learning - it could be framed as identifying relative importance of training examples. Both of these approaches are "soft" in that they allow exploration steps to venture into technically invalid states to "get a feel for where the problem gives and where it does not", and arrive to the final conclusion by summarizing this knowledge.
It appears that proper summarization of how much soft constraints push against invalid but promising attempts works better than hard constraining the search to the valid solution space.
Despite how promising it sounds, if one were to design a language that does not allow you to express certain types of harmful patterns or code that disagrees with coders intent, it might constraint one to a search space so narrow that searching it would become too hard.
It feels like TLA+ and rust borrow checker are more of a hard constraint. I am not sure what would count as soft constraints here through? A very smart linter that takes your smart expression of the guarantees for different parts of the code and checks them against guarantees provided by the implementation? But that's kinda like what rust checker does. Not sure how to make it even softer..
From a couple days ago; TFA links to that FA.
The need for a formally verifiable mainstream programming language - https://news.ycombinator.com/item?id=50663089 - November 2026 (343 comments)
You don't need a new language, you can adopt any of those tools to work with yours. Case in point, here's a detailed writeup of how I did this for Nim, which caught multiple classes of bugs in my code and the standard library: https://summarity.com/single-source-models
I'd boil away all of the article's thoughts on "object" vs "meta" languages, and instead point out that all languages are expression of graphs. Once the language is built from this perspective, object language and meta language (using the articles terms) can exist happily together. This is actually the core thesis of my language project; all computation is situated in a global hypergraph.
Eiffel was designed from the start to be formally provable.
A subset of Ada (SPARK) is formally provable.
Both are relatively easy to learn and use.
Options to produce better code have been available for a long time.
The more interesting and perplexing question to me is why weren't they brought into the mainstream decades ago?
And what will have to change for them to get serious consideration?
It seems to me that even total evisceration of existing code by LLMs has not been enough to prompt meaningful reconsideration in the mainstream of how programs are developed.
I've been toying with adding verifiable contracts to TypeScript + React and I've had a lot more luck with K Framework than Lean, Dafny, or TLA+ as backends.
They already have published formal specs for JavaScript among other main stream languages. You can combine that with this paper for formal semantics of React hooks: https://dl.acm.org/doi/10.1145/3763067?__cf_chl_tk=xOyr8JU2v...
I've always been dissatisfied with formal verification, mostly because I never know what I'm building until I have it in front of me. I really appreciate how the non-formal methods allow for that. They also inherently check the artifact instead of the specification, meaning you don't necessarily need to formally verify your compiler or OS, simply running the program enough will give you a lot of confidence that it works as expected. Integration testing and fuzz testing (and in the limit, something like Antithesis [1]) is vital for actually achieving that though, along with consistent use of assertions.
Although that all being said, I think you could do verification in addition to everything I mentioned before if that "gradually verified language" open question in the blog post was satisfactorily answered. SPARK and Verus seem popular so I'll definitely have to look into them.
One of the most interesting things is how Sel4 works -- IIUC they compile to arm64 assembler, and then run verification proofs on that.
Inspired by that, I think that an interesting place to patch verification in to an existing language is at the IR level. At the IR level, you have usually (effectively) a highly-regularized schema for all operations, that is usually still embued with semantic information (for example: the function you called is "malloc") that can be used to generate invariants that you'd like to prove (or refute).
Of course you still have to trust that the IR->ASM part of the compiler is good, but at least the program logic has been verified.
I think the only scalable approach will be in intrinsic verification
If we put in the effort to design the right libraries/DSLs for correct-by-construction development, we do not need to trust the program writer. So a slop-machine can write whatever, and we can use typechecking to statically guarantee correctness. This is more robust to refactors and does not require a human or agent to do manual proof repair. Moreover, we pay much of the verification cost up front and then don’t need to do ad hoc work upon every instantiation of the framework
I expect that if we as a community invest in the right abstractions now, we will see a flourishing of verified software
This is a pretty bad article because it starts with irrelevant technical details and doesn't even spend a minute asking itself what a developer might even want to prove about their software. Instead, the assumption is that you want tomprove everything about the program, which leads to going down irrelevant rabbit holes and completely failing to live up to the title.
If you want to go mainstream you need to be able to convince users that they can prove useful properties about their software and so far the article has managed to entirely avoid that topic.
I think there's a pretty big conceptual difference between programming and math, which is that in programming we think about building up something over time by applying successive steps. In math though we have to think about the whole thing simultaneously, forwards and backwards. So when we prove a program, we're actually proving it forwards and backwards, with all possible inputs and outputs, at the same time. And either it's all true, or it blows up in your face.
Another difficulty is with programming, we succeed by making abstractions that don't leak, where with math we're constantly opening up mathematical objects and messing around with their internals, chaining together the internals with theorems to get to our desired outcome.
Since we so often need access to the guts of the objects we're working with to prove facts, it makes it really hard to interoperate with other systems, because either we have to make assumptions about those systems which can compromise correctness or we have to be able to plug in all the way.
Signed, an undergrad in math with decent coding experience.