93 points todsacerdoti 2 hours ago 60 comments
hresvelgr 1 hour ago | parent
Formal correctness does not guarantee desired function. People have written TLA+ specs for their software[1] and not have it materially improve the quality or reliability. You cannot just throw formal verification at a problem.
I am very much of the opinion that crap code is an issue of organisation and aesthetics, and that can be automated. This is something that is enforced by frameworks, and despite the popular consensus that LLMs are good at frameworks because of training data, I make another argument that LLMs are good at them because frameworks massively restrict the possibility space of code that can exist and enforce a consistent organisation and aesthetic. The solution as I see it is to make more restrictive frameworks that have a higher chance of producing desired functionality, then afterward we can worry about correctness.
ggm 1 hour ago | parent
FridgeSeal 1 hour ago | parent
Given how vibe coded the rest of that whole DB appears to be, and the number of holes the Jepsen test found, I’m not terribly sure I’d trust, or use it as an example of “used formal methods”.
A better example would be the AWS S3 team who used TLA+ to formally verify their permissions model, especially around whether something was publicly accessible.
latentsea 1 hour ago | parent
hresvelgr 30 minutes ago | parent
Formal verification is a useful tool, but I don't think it meaningfully combats "slop," which I argue is primarily disorganised, voluminous, and lacking in aesthetics.
> That is, the design should be started by modelling with some formal language
I would make sure what I am developing demonstrably works before formally verifying the characteristics of the system.
vikramkr 1 hour ago | parent
alphanumeric0 45 minutes ago | parent
globular-toast 1 hour ago | parent
remywang 1 hour ago | parent
That link is a pretty weak strawman. Also TLA+ is special in that it (usually) does not directly verify the implementation but a model of it.
behnamoh 49 minutes ago | parent
Boris said they heavily use TLA+ for Claude Code and they've noticed an improvement. Comparing CC with 6 months ago, it has indeed improved in terms of reliability and screen flicker, etc.
kubb 13 minutes ago | parent
"Formal correctness doesn't guarantee desired function, therefore we don't need it."
But in reality it will actually catch bugs, in addition to other verification methods, and give more confidence in software.
JacobAsmuth 1 hour ago | parent
I reimplemented the entirety of the css grammar and fully verified the data model, hydration/dehydration pipeline, and can even formally prove accessibility properties at compile time (e.g. contrast > 4.5).
I'm currently working on reimplementing the full sql grammar to allow you to formally verify your queries (and even row level security policies!) at compile time.
robin_reala 1 hour ago | parent
Or rather, zero problem with accessibility linting, but don’t oversell it.
JacobAsmuth 48 minutes ago | parent
lioeters 1 hour ago | parent
> TScert: a sound core for TypeScript. An independent checker, whose soundness is proved in Lean
pjmlp 1 hour ago | parent
Management would rather have vibe coding as the next step, following on cheap offshoring, than anything else, and the recent meltdowns aren't going to deter them, without liability in place.
hedonhermdev 1 hour ago | parent
The lab I worked with for my thesis used Verus for our formally verified Operating System written in Rust. https://mars-research.github.io/doc/2023-kisv-atmo.pdf
freakynit 1 hour ago | parent
DangIsATyrant 42 minutes ago | parent
techpression 25 minutes ago | parent
JodieBenitez 1 hour ago | parent
globular-toast 1 hour ago | parent
skybrian 1 hour ago | parent
unignorant 1 hour ago | parent
I won't share a link here as I tend to dislike replies that advertise personal projects, but I thought this difference in approach might be interesting to the author or others (I went through a somewhat similar evolution to the author in my thinking).
Snibz 1 hour ago | parent
protocolture 1 hour ago | parent
2. ????
3. Post Human Singularity or something
lioeters 55 minutes ago | parent
lz400 53 minutes ago | parent
protocolture 1 hour ago | parent
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.
porcoda 59 minutes ago | parent
aloisdg 58 minutes ago | parent
FullGarden_S 57 minutes ago | parent
Something like ZFC axioms is good enough. External formal verification tools are not ideal either. Its better if the type system of the host language's got these essentials included, like having a model checker for its abstract machine or something. However, model checker for enforcing correctness(especially of the intent) will be much harder to implement in languages without a well defined, stable ABI and type system, which typically is the case with almost all mainstream languages. Even though operational semantics is the semantics of the hardware, most languages do not strictly adhere to it due to a lot of practical reasons.
Mainstream languages that become practical enough to be used by masses will usually be in a spot where it becomes very hard to formally define the language and when that happens, enforcing "correctness" becomes close to impossible. Stuff like this needs to be addressed since the start.
Selling to the entire industry the idea that "memory safety" is the only thing essential security requirement, while all else is a low priority, simply means that anyone who bought that ad either had surplus resources or was operating with inadequate requirements to justify doing so. Computer programming is about deductive reasoning of the programs and that means its much more than just writing code and handling resources properly.
mrkeen 25 minutes ago | parent
Axiom of Infinity - There exists an infinite set.
Axiom of Replacement - If a function is defined, then for any set, there exists a set of images under that function.
Why would these help me?grohan 53 minutes ago | parent
I recommend reading Cantwell Smith's "The Limits of Correctness" https://dl.acm.org/doi/pdf/10.1145/379486.379512
The TL;DR is that proofs only show that the program matches a spec, not that the spec matches the world. The gap between "what you can model" and "the real world" is generally too large for formal methods to be useful (outside of narrow domains, where they are highly useful).
In other words, computing is closer to an empirical science than a formal one.
aenis 52 minutes ago | parent
Retr0id 50 minutes ago | parent
0815beck 50 minutes ago | parent
Qasaur 50 minutes ago | parent
Seamless formal verification requires a native formal specification to verify against. In my view, focusing work on formally modelling existing languages (like Rust), or if intractable at least a fragment with Cartesian closed semantics, is far more encouraging to mainstream adoption of formal methods than trying to convince the industry to adopt a new language.
light_hue_1 49 minutes ago | parent
Much of what the author wants already exists!
filipdobro 32 minutes ago | parent
If a language cannot balance tradeoffs between hardware and software, people will still use the most performant language, especially for resource-intensive tasks, so you end up with what we currently have. We need to rethink how we can design a language that is token-efficient, offers memory safety, is close to the metal, and lastly implements formal verification guarantees. The closest what we have to this is Rust and C++, but it's not good enough.
slacknatcher12 14 minutes ago | parent
This is ironic considering the default GC strategy for GHC's RTS is a copying collector that puts values physically close if they are used together plus bump allocation. That has good cache side effects (heh).
slacknatcher12 25 minutes ago | parent
ChicagoDave 42 minutes ago | parent
I’ve been doing it with a custom engineering harness on top of Claude Code for a year.
I certainly see the desire for a validation framework in code generation, but until we invent that and migrate the entire world to it, let’s focus on discipline.
The reality the OP sees isn’t wrong. Most of what I see publicly is trash. Undisciplined vibe coders are in a death spiral of agentic madness.
But if you bring discipline to software construction, you can extract high-quality results.
We still need requirements. We still need invariants. We still need wireframes. We still need user experience design.
Then we reach into history and bring back Functional Design Specifications.
Add TDD, DDD, behavior testing, mutation verification. And finally people need to use it for the final validation.
Now you have a disciplined approach that works today.
magoghm 39 minutes ago | parent
ezekiel68 37 minutes ago | parent
If it's truly needed, it will appear (or has appeared already) in one form or another.
spankalee 34 minutes ago | parent
I started Zena from wanting a TypeScript-like syntax that compiled to very efficient WebAssembly GC, and AssemblyScript had issues...
The motivation for targeting Wasm was as a good sandboxing and orchestration unit for AI-generated code. So, out of both general PL curiosity and enthusiasm, and an attempt to make a language that's good for AI generation, I started adding what I thought were the best features from other languages with a lot of focus on correctness, structure, and optimizability: pattern matching with exhaustiveness checking, ADTs and sum types via sealed classes, value types, async cancelation / structured concurrency, ownership and borrow checking for resources, unicode safe strings, and recently I added runtime contracts and I'll start on refinement types and some kind of proof system soon.
The idea is exactly to take a mainstream and familiar-looking language and add more cutting-edge and academic features that help with software correctness.
I wrote about some of this here, though not the formal methods parts: https://zena-lang.dev/blog/2026/09/languages-for-the-ai-era/
baq 34 minutes ago | parent
pianopatrick 32 minutes ago | parent
supermatt 23 minutes ago | parent
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.
microflash 19 minutes ago | parent
[1]: https://quint.sh
techpression 18 minutes ago | parent
jupake 16 minutes ago | parent
"It also includes facilities to help program verification. For these reasons, Ada is sometimes used in critical systems, where any anomaly might lead to very serious consequences, e.g., accidental death, injury or severe financial loss. Examples of systems where Ada is used include avionics, air traffic control, railways, banking, military and space technology."
All that was once old, is new again.
moneybunny 11 minutes ago | parent
Nursie 8 minutes ago | parent
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.