NHacker Next
  • new
  • past
  • show
  • ask
  • show
  • jobs
  • submit
▲LLMs are making formal software verification feasible at a much larger scale (anthropic.com)
jsenn 9 minutes ago [-]
This is really cool work. The particular spec structure/methodology does seem awkward though:

1. Prove the ASan-instrumented binary doesn't crash

2. Prove the non-instrumented binary doesn't crash

3. Prove the instrumented and non-instrumented binaries have the same behaviour (under a particular model of a Linux process's behaviour)

This is a clever hack for automatically generating a formal spec for an existing program, but the fact that you need ASan in there makes it seem like this is less general than it sounds. Could the agents directly prove that out of bounds memory accesses don't occur on the original binary and skip ASan altogether? It's convenient to let the spec just be "it doesn't crash", and ASan provides a crash when the other bad things you care about happen (i.e. out of bounds memory accesses), but I wonder if modelling the memory accesses directly would simplify things.

mentalgear 8 hours ago [-]
A good moment to remind everyone:

Verification: Code does what it says.

Validation: Code does what Specifications say.

Specifications: Were hopefully correctly modeled to the Problem.

In IEEE terms:

> Verification: "Are we building the product right?" > Validation: "Are we building the right product?")

You can write mathematically flawless code that highly efficiently solves the wrong problem.

---

While I think formal verification is the future (essential for cybersecurity), it's not a silver bullet for the other 2 items, which are way more ambiguous. I think however they can all iterate on each other and improve the project overall, but it still depends on competent steering

If you have had experiences with good approaches for verification Validation & Specification framework, do let us know about them.

less_less 8 hours ago [-]
Isn't it more like:

    Verification: code does what the specifications say

    Validation: specifications describe something we wanted to build
where with formal verification, the specifications are lower-level, so validation is extra-important.
sas224dbm 5 hours ago [-]
Verification : code does what the specs say Validation : Customer confirms it meets the intent of the ask
eru 8 hours ago [-]
> where with formal verification, the specifications are lower-level, so validation is extra-important.

Specifications don't need to be lower-level. They also compose nicely. Ie you can figure out how to formally specify a 'this doesn't crash' requirement once, and then re-use it on all your projects.

crabbone 3 hours ago [-]
There's, unfortunately, another meaning for "validation" that's used in the adjacent context. All those form fields are validated, the tool that validates them is called, unsurprisingly, "validator"... To generalize this notion: "validation" can also mean compliance with an arbitrary set of rules, not necessarily the rules imposed by the product design.

I.e. a field in a government form for residence permit might validate if the date entered is between the applicant's arrival date and three months later. And screw the applicant who wanted to apply for the permit before they landed in the country (this is a not invented example).

Also, since I worked in "software validation", I feel like it's important to note that the dictionary definition is different from practice. For the most part, the task of validation is the one that should culminate in the testers OK'ing the shipment of the product. Typically, testers, as well as the rest of the company involved in the shipping, are painfully aware that the product doesn't meet the customer's requirements (or any formal or informal requirements). It is simply declared "valid" because the potential damage is assessed to be manageable. I.e. a product may as well be declared "valid" while having a list of "known defects".

less_less 44 minutes ago [-]
Yeah. And e.g. NIST's glossary for IV&V is also the opposite of what I said:

> independent verification & validation (IV&V)

> A comprehensive review, analysis, and testing, (software and/or hardware) performed by an objective third party to confirm (i.e., verify) that the requirements are correctly defined, and to confirm (i.e., validate) that the system correctly implements the required functionality and security requirements.

In my experience it's more common to use "verify" for the lower-level "conforms to specs" and "validate" for the higher level "are the specs right" but in other areas it might be different.

dataflow 8 hours ago [-]
> A good moment to remind everyone: Verification: Code does what it says. Validation: Code does what Specifications say.

Isn't this the exact opposite of what "formal verification" means? First sentence on Wikipedia [1]: "Formal verification is the act of proving or disproving the correctness of a system with respect to a certain formal specification or property."

[1] https://en.wikipedia.org/wiki/Formal_verification

GuB-42 4 hours ago [-]
Asking a LLM, I got:

- Verification: Are we building the product right?

- Validation: Are we building the right product?

My intuition was different. To me verification is a process while validation is that the outcome of that process. As in: to validate the "+" operator, you verify that 1+2=3.

Looking at the Wikipedia article https://en.wikipedia.org/wiki/Verification_and_validation the definitions are not very clear and seem to depend on the context, tough the general idea is that of the LLM answer.

Funnily enough, the https://en.wikipedia.org/wiki/Engineering_validation_test Wikipedia article is introduced with "An engineering verification test (EVT)..."

It seems to be the kind of thing where everyone has a different idea and they are often conflated, making the distinction almost meaningless without context. You can give a precise definition for your project, but it may not apply elsewhere.

Note about using LLMs: I often like to use LLMs to settle these questions. Not because LLMs are flawless, far from it, but because they work by generalizing the content of their training dataset, they should do a pretty good job on extracting consensus. It fact, it is all they do; when a LLM tells the truth, as it is often the case, it is because the consensus is often the truth.

Lockal 7 hours ago [-]
This needs a new category:

AI verification: AI meticulously abuses all available loopholes to deliver answer expected by operator, rather than actually responding to the problem.

Simplest example: proof that `x+1 > x` (borderline impossible)

faresahmed 4 hours ago [-]
SirMaster 2 hours ago [-]
If code doesn't do what it says, isn't that a compiler issue?
dejw 6 minutes ago [-]
c/++ programers will say it's a skill issue
js8 4 hours ago [-]
At the end of the day, the program was asked for by somebody, and that person described what they wanted. Whatever the program does, it can only be as much correct as much unambiguous was the description that conceived it.

The description was most likely given in a natural language, with many assumptions about the shared objective reality.

Today, we have LLMs, which de facto (but with significant flaws) formalize the interpretation of natural language, as well as the shared objective reality we inhabit. They are becoming closer to the truth than any individual human. (Their construction is a wittgensteinian program of sorts.)

So we can take an LLM with the prompt "Respond according to the following specification:" plus the original specification/requirement, in natural language, itself, as a program A.

Then we can take the written program itself, together with the emulator of the machine it runs on, as a program B.

We can feed both of these into some theorem prover - and formally prove that program A and program B give identical outputs on identical inputs. That's most likely the best we can do, ever.

(Or we can, in theory, develop programs this way, as a solution to the following question: Which program, when run on the given platform, gives provably identical answers to program A? That's a general program synthesis problem.)

amelius 8 hours ago [-]
It's still great if the assertions in your code are provably correct.
malisper 15 hours ago [-]
For those skeptical, I've had decent success using formal verification for my Rust rewrite of Postgres. I wrote a compiler that can translate both Rust and C code into Lean. Once those two functions are in Lean, I have an LLM write a Lean proof that they behave identically.

So far, I've proven that about 12% of the code behaves the same when executed single-threaded. That works out to roughly 70k lines of C code. This has found very minor differences in behavior, such as how floating-point operations across platforms can produce different results.

I'm working on figuring out how to scale this up, but I don't see any fundamental limitation that would prevent this from scaling up further.

remywang 10 hours ago [-]
Every verification needs a spec, and in this case the spec is the Postgres implementation. I think we can and should do a lot better than taking 2.6 million lines of C code as the spec.

In general, the spec must be human readable, and I believe to achieve that we must do away with SQL. Putting aside the thousands of pages of SQL standard, even the core subset has a gnarly semantics due to issues like nulls.

A simpler semantics is one of the main motivations behind Prela [1], and despite its simplicity, we now know it’s powerful enough to express thousands of queries in the wild [2], as well as run doom [3].

[1]: https://prela-lang.org/

[2]: https://github.com/remysucre/prela/tree/sqlstorm

[3]: https://github.com/remysucre/prela/tree/doom/

dchftcs 6 hours ago [-]
Sometimes it's good to have bug-for-bug compatibility, where the code is the best spec.
5 hours ago [-]
rrr_oh_man 9 hours ago [-]
> In general, the spec must be human readable, and I believe to achieve that we must do away with SQL

Eh. Carthago delenda est? Why?

disgruntledphd2 8 hours ago [-]
Yeah, that's the most impractical part of the original post.

Like, SQL was around before I was born, and barring the immanence of the Machine God (and potentially even then), will be around long after I die (unless civilisation collapses, I guess).

remywang 13 hours ago [-]
> I wrote a compiler that can translate both Rust and C code into Lean

How do you verify this compiler is correct? To do that, I think you at least need a formal semantics for both C and Rust in Lean, both sound like Herculean efforts

malisper 12 hours ago [-]
> How do you verify this compiler is correct?

I haven't yet. My main goal has been to find as many bugs as possible. While bugs could still slip through because my compiler is incorrect, I'm still finding a good number, so I think it's worth it.

poly2it 10 hours ago [-]
Did you consider using an established Rust verification toolchain like Aeneas?

Edit: I don't do this often, but why is my question being downvoted? Is this question not allowed?

malisper 10 hours ago [-]
AFAICT, Aeneas only supports a safe subset of Rust. I needed something that could support all of Rust
homarp 3 hours ago [-]
https://github.com/AeneasVerif/aeneas says

"Aeneas currently functionalizes a subset of safe Rust, and we are in the process of extending the functional model with reasoning based on separation logic to support unsafe code and concurrent code."

naasking 4 hours ago [-]
> I think you at least need a formal semantics for both C

https://en.wikipedia.org/wiki/CompCert

ignoramous 5 hours ago [-]
> formal semantics for both C and Rust in Lean, both sound like Herculean efforts

If we're doing Ancient Athens, then Platonic Methexis probably fits better.

krukah 13 hours ago [-]
Does your bilingual [Rust|C] -> Lean compiler fork rustc or clang, or other? 12% is promisingly high. I'm still hoping for a world where you can prove critical behavior w static analysis cheaply and practically. The overlap of LLMs and PLT feel under-explored to me

pgrust is incredible btw

malisper 12 hours ago [-]
Thanks!

I tried several approaches to support both C and Rust. I tried using LLVM bytecode, but that ended up being way too low-level. The proofs ended up being gargantuan.

I also tried converting CBMC's intermediate representation, "GOTO Programs" to Lean. This seemed worth a shot because CMBC supports C and Kani adds support for Rust. Unfortunately, Kani's Rust-to-GOTO conversion caused a massive blow-up in code size.

What I ended up doing was converting both GOTO Programs and MIR (Rust's IR) to my own custom IR. The IR is low-level enough to convert both languages, but high-level enough to keep the code relatively concise. I then run simplification passes over the IR and compile it to Lean.

homarp 3 hours ago [-]
>pgrust is incredible

https://news.ycombinator.com/item?id=50205816 seems to differ

weinzierl 9 hours ago [-]
Have you heard of Aeneas? In case you did, what are your opinions on it? Specifically, why you didn't choose it for your project.
malisper 9 hours ago [-]
From what I can tell Aeneas only supports safe Rust. I need something that works with both C and unsafe Rust.
est31 15 hours ago [-]
Which models do you see to be productive for the task of writing lean? Big fan of pgrust.
malisper 15 hours ago [-]
I've been using Opus 5.5 for pretty much everything

I tried giving Astra a shot. Since it scores better on math, I thought it might do better at writing Lean. I forgot the exact details, but that didn't end up being the case. I think it wasn't thinking holistically enough and tended to rabbit hole itself more

simondotau 11 hours ago [-]
Opus 5.5 is a god tier model, but for serious large scale work, nothing beats getting at least three non-similar models to repeatedly refine a super detailed plan before any code is written.

Right now my consortium is Opus 5.5, Grok 4.7 and Muse Wonder. These three are different enough that their insights are very complementary. Once a plan is detailed enough, any decent model can execute on it successfully, but I personally like Grok’s ability to stick to the plan. (And no 5-hour quota!)

crashabr 10 hours ago [-]
Always fascinating to see Grok marketing in the wild. Always the same pattern of mentioning it innocently at the beginning of the message, then doubling down with a specific praise at the end. Well it's rare enough that it could also be a set of users who organically made it their mission to get HN to care about Grok.
rstuart4133 5 hours ago [-]
You replying to Simon Wright, creator and owner of whirlpool.net.au [0], which is a Australian version HN / Reddit. It was the major Australian discussion forum in its heyday. The odds of him doing paid spruiking for Grok, or anybody really, are pretty low.

[0] https://en.wikipedia.org/wiki/Whirlpool_(website)

jkhdigital 4 hours ago [-]
Never change HN, never change
simondotau 6 hours ago [-]
Always fascinating to see someone so allergic to the idea of an opinion differing from their own that they immediately invent a covert marketing operation to explain it. Someone liked a model you don't like? Impossible! Clearly, there must be a conspiracy.

Of course, it should go without saying that my comment was a genuine, good-faith account of my real world experience with these models. Not that a public reputation seems to count for much these days, but for what it's worth I have over 25 years of public involvement in the tech sector, and I'm posting under my real name and real identity.

malisper 10 hours ago [-]
idk - I had good experiences with Grok. At least before Gemini 3.7 flash came out it was one of the best fast and cheap models. Back with Fable 5.0, I was having issues with fuzz testing because I kept hitting the security safeguards. Grok ended up being the best model at the time I could get to do what I wanted
solyin 7 hours ago [-]
I mean, it's just more comforting to think that there's a shadowy cabal out there controlling things. Otherwise the planet is just a bunch of monkeys screeching at each other and everything is up to random chance.
therealdrag0 14 hours ago [-]
Same experience on my vibe coding side project. Astra seems autistic to the context, Claude seems more of an open minded partner with good taste.
octoberfranklin 10 hours ago [-]
So far, I've proven that about 12% of the code behaves the same when executed single-threaded.

Dude, this is a database.

Concurrency is the source of all the hard stuff in databases.

Databases without concurrency are super-trivial.

I don't see any fundamental limitation that would prevent this from scaling up further.

The fact that you've dodged all the hard stuff is a pretty fundamental limitation.

malisper 9 hours ago [-]
Proving the code works single threaded is a stepping stone to eventually proving the code works under concurrency. It may be surprising, but very little of the Postgres code deals with concurrency. For the most part they've isolated the parts that deal with concurrency to a small number of subsystems. At least by volume of code, the vast majority of it is single threaded
saidnooneever 8 hours ago [-]
the code is either single threaded or multi threaded. not partially...

so either you verify the whole thing or basically you didnt verify anything.

remember what verification is for. its great your query parser is functionally correct but verification is meant to prove something.

say you have a car. and its got safety requirements. those need to be verified. But now they say we've verified its safe only for the rear seat passengers. or, only the engine block is verified itll keep running safely.. it completely negates what is being done if its not done completely to the entire car.

and then ofc another driver just prangs into you anyway with their uncerified car, or suddenly the unverified road (OS) turns into a sinkhole and all ur verification still goes out the window..

there are limits already to verification if done properly and skipping the hard/important parts is really a big issue... u might aswell not do it.

(i do respect that there is a road to fully verified, u wont slap out those 9 million lines in one go. but saying you're winning halfway through the race.... nope)

solyin 6 hours ago [-]
But the analogy falls short. If I'm running a foot race and stop to celebrate before the end, someone else is going finish the race and win. If we're going from single to multi-threaded code. Using whatever synchronization primitives exist on the system, each section that I'm able to complete means that part is able to run faster when used by a multi-threaded system. Maybe a better comparison is a triathlon then. If you finish the bicycling section. No one can take that from you, even if you don't finish the rest.
imtringued 7 hours ago [-]
This type of logic only works in Rust or Haskell but basically no other programming language.

If you use a language like Java, you have to start with a multi threading aware design concept first or the retrofit is going to be painful and probably will never happen.

Multi threading in classical programming languages with mutable aliasing by default requires global program analysis to check if it is safe or not. Rust restricts the programs to what can be reasoned locally.

octoberfranklin 15 minutes ago [-]
It only works in Rust if you have code that is parallel-without-concurrency.

Databases and operating systems are inherently concurrent. They deal with concurrency sources outside the process running the Rust code. Because of this, they don't get the magical shared-xor-mutable => deterministic-concurrency benefit that Rust is famous for.

And, frankly, if you tried to make SQL/ACID shared-xor-mutable you'd completely cripple it. Databases are inherently concurrent.

naasking 4 hours ago [-]
> or the retrofit is going to be painful and probably will never happen.

They're using LLMs. The economics of this sort of retrofit has changed considerably with LLMs.

fedupnow 12 hours ago [-]
Im 35, Im screwed if they get their way. I'm not going to go to the trades, I quit construction when I was 27 because of how much I loved programming. I wanted to kill myself basically everyday working in the construction industry. I drank my twenties away because of how much it sucked. Ive been sober for years now entirely because of programming and actually loving what I do. But this company is stealing that from me, in many different ways.

I invested a ton of my life and my entire life savings into this transition. Now Im being screamed at everyday to go be an electrician because Anthropic claims they're going to solve the halting problem in some round about way, they dont even have to do what they claim. They just have to convince 20% of industry that they will, and guys like me will never get a chance to work long enough to retire.

I really don't think they'll suceeed, but if they do, Im going to be homeless coding from the public library because im not starting over again.

steezeburger 11 hours ago [-]
A lot of people think more jobs overall will be created from this. I sort of agree. However, our day to day has changed so much. The problems that I found fulfilling to solve are now handed off to LLMs, but at the same time I can build the things I want to build easier and faster. There are tradeoffs for sure. I'm trying to stay positive though.
euroderf 8 hours ago [-]
> A lot of people think more jobs overall will be created from this.

Be sure to distinguish between "jobs" and "good jobs" (that are enough to survive and even prosper on). Jobs that pay pittances can be created til the cows come home.

sokoloff 4 hours ago [-]
I think it will create a lot of jobs (overall) that pay twice the median wage.

The fact that some of those jobs would have paid 3-5x the median wage in 2021 isn’t a scathing indictment of AI, even if it’s inconvenient for the slice of the world who could have made 4x the median wage and now only makes double it.

Tryvrsakjo10 10 hours ago [-]
Yeah, there are conflicting views in the industry about whether LLM's will make more jobs overall or kill off jobs. The ostentatiously virtuous thing is the ability for developers to make software faster.
steezeburger 9 hours ago [-]
I've built some tools that genuinely help me manage my life tasks that improve my quality of life irl, but a lot of stuff I've built has been built to allow me to build more things like itself faster... And I ask myself, for what? Haha
Tryvrsakjo10 9 hours ago [-]
yeah like I've used AI to build me app to automate editing short clips which would have taken me a long time to make, if I coded them by myself. This is good but then it make you question why a software firm would hire you or keep you if there is a tool that can do this.
skapadia 8 hours ago [-]
Define developer in the age of LLMs
Tryvrsakjo10 6 hours ago [-]
I think this depends on the individual you're asking, I mean if you can prompt you can build right. Though the way I see it is a developer is someone who can leverage AI to help them complete tasks more efficiently then if they were doing those tasks manually like system design and architecture or finding bugs much faster than a professional developer could.
sadilek 8 hours ago [-]
I think the answer is: Think of yourself as a maker, not as a programmer, and you'll be good.

I feel like a good chunk of my skills that I honed over decades as a software engineer are obsolete: programming, debugging, navigating code. But there are other skills and especially experiences that, at least with the current level of tools, allow me to do much more than someone who doesn't have them: knowing what computers can and cannot do, or only inefficiently; distributed systems; deployment; CI/CD pipelines.

remywang 9 hours ago [-]
Hang in there! What you can build knowing how to code is drastically different from what promptards can build. Imagine trying to build a car without knowing anything about car building - you’d just get the most generic boring clunker anyone can design.
foo12bar 5 hours ago [-]
But anyone can decompile it, now, too.
IllIIlIlIlIIIIl 9 hours ago [-]
I feel ya. I've been grappling with the fact how this field has been completely uprooted. On one hand, I see this as another layer of abstraction: I don't know assembly, yet I can command the processor to do stuff via python. LLMs can be seen as another layer of abstraction that allows us to write higher volumes of even more complex software. On the other hand, I can see how programmers can go the route of the chimney sweepers. I try to be optimistic but feel fearful as well.
driverdan 53 minutes ago [-]
Have you talked with a mental health professional? There's a lot of negativity in your comment that suggests larger issues than your concerns about LLMs.
gyosko 9 hours ago [-]
Feel you bro, same age, same feelings. And even though AI won't replace me, the work is shit now. I like to code, not to babysit some retarded genius.
wadim 9 hours ago [-]
> I'm not going to go to the trades

I find it unrealistic anyway, that market will be saturated so fast, it won't make a difference for you or me, in the grand scheme of things.

n_u 10 hours ago [-]
My first question was “How do they know the proof correctly corresponds to the software they are checking?”

They say “ While this is an enormous volume of proof code, virtually none of it needs to be manually reviewed. The Rocq proof checker ensures that the spec is correctly satisfied by the proof. As a result, the only artifacts that a developer needs to trust are: The formal models of RISC-V and of Linux processes;

The exact theorem statements that were proved;

The Rocq proof checker itself.”

What are the formal models of RISCV and Linux? I’m guessing they allow translation of RISCV code directly into Rocq proofs?

I’d love to see more info about their workflow of code -> proof. Or even an open source tool

jasongross 9 hours ago [-]
adamddev1 9 hours ago [-]
Exactly. How do they now that the spec that was generated was correct? Is the spec also AI generated, and could the models lie to make a spec they can verify, just like they lie to make tests pass?

It is also interesting how the LLM optimists are leaning on tools like Rocq and Lean to save them from the mess of uncertainty and confusion. These are tools created by people who understood their code and worked with deeply with type theory etc. People can keep thinking they can get away with making products from vibes, but down in the infrastructure they still have to depend on people thinking and building carefully.

It is hypocritical to campaign for "nobody will look at code anymore" while depending on the hard work of people who carefully look at code.

cmrx64 9 hours ago [-]
You could search “decompilation into logic.”
passive 15 hours ago [-]
This seemed like a high possibility, but since our adoption of LLMs in software so far has mostly been to throw out best practices, I am skeptical that it will lead us to expanded verification.

It's like Bezos talking about how we're going to have 3 day work weeks while he makes his employees piss in a bottle.

regularfry 4 hours ago [-]
Positive note from me: one thing I've had good experience with is following the path from a project that does something similar to what I want; extract a tech-neutral prose spec from the source; convert that prose spec into a formal spec; use that spec to generate valid traces, a language-specific interface layer, and conformance checks to test whether an implementation of the interface generates good traces. Once you've got that, implementing the system is a matter of colouring the interface in by numbers, which is really easy for a model.

The bonus here is that you can cut in at the prose spec stage and change it to whatever you need, as well as being able to target it at specific technical choices at the last couple of steps.

Where I've seen this work really well is with privilege escalation management, where you do actually want to be careful about the states the system can get into, and the APIs available for managing privileges in a system might be super specific to that system. But I can imagine the workflow being quite a useful one any time you've got anything state-machine flavoured.

DenisM 7 minutes ago [-]
Thank you for sharing. Would love to hear more!
scruple 14 hours ago [-]
Automated proofs do sound very neat but I think they'll be constrained to a vanishingly small set of already paranoid domains like cryptography, aerospace, etc. Everywhere else is going to spend the dividends on shipping more unvetted code faster, we're just trading discipline for velocity.
skew-aberration 14 hours ago [-]
Piss bottles are easily explained by rent though. You get more productive, so the landlord ups the rent, and you have to produce more for the people owning the scarce land (your landlord, the grocery store's landlord, the farmer, etc).

Software doesn't have this scarcity dynamic. People will use LLMs to build better sounder foundations (as rust is 'better' than c) and code quality will improve as we migrate to them. You won't get screwed on your rust++ license though to the point you have to piss in bottles.

skydhash 13 hours ago [-]
> Software doesn't have this scarcity dynamic

Time is finite. People’s problems that can be solved by software is also finite. There’s diminishing returns in improving software. Rewriting bash in rust, and then testing the result would barely help anyone. Also the real world (where inputs come from) is messy. You can have the perfect mechanism (memory safety), but that grain of sand (corrupted or unexpected data) can still make it behave erratically (wrong result).

vikramkr 12 hours ago [-]
Llm adoption has just accelerated people's tendencies. Slop generators generate more slop. They're also finding and fixing bugs that have existed for decades. The societal incentives towards slop we will have to figure out but that's not new - for folks not on that wavelength and for when we get over that impulse at some point it's good if it can also do this. Just in general so sure does write a hell of a lot of tests. If it gets good at it this could pretty easily just become part of the agent loop and we get whatever wins we can from that.
DenisM 12 hours ago [-]
AI is the dark energy of engineering - it pushes us further apart, faster. Some of us get pushed towards slop, others towards formal spec validation, and as time goes it will be harder and harder to see each other.

A while back a knowledgeable man was a philosopher, and they could all easily talk to each other and understand. As time went we split up - we have philosophy doctors in various fields who have very little to talk about.

This happened again when the term “engineer” fractured (even before software engineering). Software engineering itself fractured, too.

And it’s happening again now.

yazaddaruvala 16 hours ago [-]
I think somewhat of the opposite will actually occur. LLMs won’t formally verify LLM generated imperative style code. We (including agentic development) will move on from imperative languages, skipping functional and move to deterministic declarative languages.

Likely, a proliferation of experimental languages all somewhat akin to Typescript for SQL with significantly more nuanced operators to tersely capture the same outcomes as imperative languages.

They’ll compile down to be able to run performantly for game development or even for the Linux kernel (as if Linus would ever agree lol) but also they’ll be able to run on distributed execution engines with effectively a shared memory space, etc.

Allows for significantly more terse artifacts. Lower chance of hallucination, fewer output tokens, fewer thinking loop iterations and concise enough for humans to review (for domains that need it).

On top of that, additional theorem like syntax to drastically limit the ability of functions, etc. likely some sort of higher level effect system for verification. Used for many things like “constant time compilation for crypto functions”, and also “ensure acid compliance” for writes and reads in a local context, and things like “ensure only once delivery” for functions on a distributed execution engine.

At which point every program will be formally verified by default. You could think of it as AdaErlangSQL+++

computably 15 hours ago [-]
What you're describing is a language that can effectively take a high-level design doc (limited to a formal language representing a pseudo-English-subset) and compile to almost arbitrarily complex, formally verifiable systems. I say systems because you're also implying these could essentially orchestrate distributed systems.

Which, if that were really possible, would be pretty good evidence of AGI. Or, at least, the end of 6-7 figure software engineer salaries. Conversely, I think it's a pipe dream. Writing a compiler that actually works well across such a broad range of hugely complex behaviors would itself be absurdly complex.

yazaddaruvala 13 hours ago [-]
AGI will accelerate it, but way before agentic development I learned this was the future when I worked at Amazon. I no longer have access to the internal talks about it (amazing to watch) but here is a public link worth reading:

https://aws.amazon.com/blogs/storage/how-automated-reasoning...

tkz1312 12 hours ago [-]
You don't really need compilers anymore. LLM's can write programs over any AST and provide an equivalence proof provided you have good semantics for the source and target.
desterothx 4 hours ago [-]
Yeah, but thats a lower level of abstraction, thus using more tokens, and more importantly occupying a larger chunk of the biggest current limitation, the context
Tanjreeve 12 hours ago [-]
What semantics do you mean here? What are bad semantics in an interpretation/compilation context?
tkz1312 12 hours ago [-]
Semantics of a language describe the behaviour of a sentence in that language when executed. When you have semantics in a theorem prover you can construct equivalence proofs between programs expressed in different languages (or proofs that a compiler from one language to another is semantics preserving).

I was mostly referring to accuracy when I said "good" above, in the sense that they should reflect the actual behaviour of the language they describe.

ulrikrasmussen 10 hours ago [-]
Then we don't really need software anymore, LLMs can just receive every user input and perform the action required.

/s

est31 15 hours ago [-]
Also you would probably want to cache the compiler's output in git because running that compiler would take a long time, and you probably want the compiler's output to still be inspectable to human inspection. In the end that compiled artifact would look a lot like source code.

I think Rust's success in the AI space shows how useful formal proofs are, as Rust provides something very similar to that. Both because it helps with the understanding of LLMs, as well as with trusting the LLMs are not violating any basic properties (like please no nasal demons if the user sends a buffer larger than the allowed amount).

yazaddaruvala 11 hours ago [-]
``` SELECT A, B, Sum(C) FROM Somewhere GROUP BY ALL ```

Very few developers look at the underlying “source code” that this SQL compiles into. Very few people even read the “source code” that tsc outputs.

The reality is the lowest level checkpoint worth looking at and understanding is the highest possible abstraction layer which preserves 100% of the needed precision and flexibility that the product being built requires.

Also, you’d just use something like sscache or just .o files to speed up compilation. It’d be unusual to store compiler MIR/LIR in git.

I think the important part will be figuring out what we need from the higher level language that achieves 100% of the precision and flexibility of Rust for the product being built.

skydhash 5 hours ago [-]
> Very few developers look at the underlying “source code” that this SQL compiles into. Very few people even read the “source code” that tsc outputs.

Only because there’s a group of people that do understand database theory and know how to write a proper implementation and they have a track records of doing so. Themselves relies on compilers maintainers and OS developers, and this goes on down to the semiconductors where people do study how electricity interact with the materials.

Every layers of the tower of abstractions have people that understand the current layers, knows the safe semantics of the layer below, and can provide a safe foundation for the layer above.

gf000 8 hours ago [-]
> formal proofs are, as Rust provides something very similar to that

Since when? Rust just has an ML-like type system, and seemingly many have met that for the first time with Rust, even though it has decadeS of history, and multiple production languages running it just fine (ocaml, scala, etc).

Formal proofs are way way above an ML type system. Like how do you encode mathematical statements in Rust's type system? What about statements about program semantics, like program A is equivalent to program B <- in formal verification THAt is the type of an expression, and the implementation of it is the proof.

est31 5 hours ago [-]
By similar i meant the strong and powerful type system that Rust has, plus its safety guarantees (iterator invalidation is a compiler error etc). That is in the end a proof system: you are proving to the compiler that you really don't mutate the buffer and you can't drop the T in &T, etc.

Of course the Rust language doesn't give you tools to prove that the program is bug-free or such. The proofs only extend to a basic set of properties, but there is a proof system in Rust.

As for other ML languages, they aren't really C/C++ competitors performance wise, Rust is.

anthk 15 hours ago [-]
We've got inform7 with an English like language generating complex inform6 OOP optimized code since a few decades and the i7 compiler might even run under a Pentium II with 128MB of RAM under NetBSD. I6, under 32 and a Pentium. And maybe even less. ZMachine games themselves (the biggest v8 ones) under the Frotz interpreter, under a 486 and 8MB (with FreeDOS and Frotz). Or maybe an Amiga or a m68k Mac with the same amount of RAM.

Now imagine what AMD64 machine can do with 2GB of RAM (minimum baseline for legacy, maybe some C2D computer) today.

freeone3000 12 hours ago [-]
inform7 is closer to a dsl than a general purpose language. We might be looking at something closer to spark/ada.
anthk 15 hours ago [-]
Check Inform7 for text adevntures. No AGI nor AI needed. On Inform6, it's a dumb simple OOP language where the structure it's almost self-evident. Classes, in-game objects with real-life attributes (enterable, a container for other objects, non-movable/pickable scenery and so on).

PD: inform7 can run on an RaspPi B+ or 25 year old PC's like nothing, and i6 down to 30 year old ones. The ZMachine adventures themselves, from any 16 bit computer and up.

wetpaws 11 hours ago [-]
[dead]
gobdovan 15 hours ago [-]
Depends really. I tried some experiments towards a pretty uniform relational language for expressing ordinary logic, temporal logic, requirements etc. It does work, but there's some unexpected obstacles.

You'd think performance would be easy to achieve because you'd just write clear, high-level declarative facts and LLM + good optimiser + proof certification system will get you there in terms of performance. But you'll be surprised that relational/declarative specification gives you so much behaviour 'for free' that choosing what to actually compute from those relations is a very deliberate choice. It starts to look like finding an imperative-like path of demand through the relations. It seems that you get exactly the same problems but one level up.

AlotOfReading 14 hours ago [-]
I've enjoyed embedding declarative syntax inside imperative languages, like LINQ and prolog as a dsl. The imperative code can express temporality much easier, and the declarative code allows you to throw that away when you don't want it.
skew-aberration 14 hours ago [-]
Coming at it from another angle, we have historically made distributed systems manageable / 'verifiable' with RTOSs which give deterministic scheduling and locking primitives. We know that a task's max duration is its uninterrupted duration + max duration of all higher priority tasks which could pre-empt it, and so on. Deterministic pre-emptive scheduling and locking alone could be enough to prove a lot of invariants without full temporal logic, and writing code in 'RTOS logic' might be more natural for humans/LLMs than the more expressive and powerful alternatives.
BobbyTables2 13 hours ago [-]
I needed a chuckle and this delivered - “Typescript for SQL” gives me a mental image of a plane crashing into a train wreck.
pjmlp 8 hours ago [-]
Yes, that was the vision of 4 GLs and Japan's Fifth Generation Computer project.

However just like the uptake in SaaS, iPaaS, serverless, managed cloud environments, this means way smaller teams will be needed, and everyone that doesn't get to press buttons at the software factory, will need to find another occupation.

Animats 10 hours ago [-]
> I think somewhat of the opposite will actually occur. LLMs won’t formally verify LLM generated imperative style code.

This result is exactly the opposite. They're verifying at the machine code level, which is totally imperative.

seer 12 hours ago [-]
I think this is indeed the direction, but am wondering is anyone actually trying it right now? Love to explore it.

I think for now the answer to adaerlangsql+++ is just Rust - but its semantics have always been about human usability.

Humans have this thing where we can only keep 7 things at once and have to juggle our context, but recall seems much more broad than model contexts.

If we were to start designing a language and toolkit based around LLM context sizes, limitations and quirks - how would that look?

Also terseness and operators are one thing, but what if it’s the other way around - English words etc - can have a much bigger vocabulary of things that can be done but can easily be generated on the fly.

For a new LLM language realistically you would need to probably either write or convert a shit ton of software to it first if you are to train an adequate model on top of it …

And also what about “IDEs” for agents? So far they are clumsily using human tools - just looking Claude string along bash loops and greps to try to eek out meaning form code _it itself had written a week ago_ is frankly frustrating.

There must be a better way and some rich agent specific tooling for code exploration and verification.

Anthropic stance has always been “yeah we tested them all, grep is better” but I still am not convinced - just by the fact that it constantly fails one or two attempts before “figuring it out” yeah it’s fast anyway but it could be _faster_ and could allow the agent to “think” in code space more and not have to validate itself at every minute step …

pjmlp 8 hours ago [-]
Yes, plenty of people are.

That is what low code/no code enterprise tools have pivoted to.

Check Boomi, Workato, Optimizely Opal, Sitecore AI, PowerPlatform.

This is why you see my comments regarding the way AI based coding is going to, I have already tasted the future in such tools, and even if they have issues today, they will eventually be ironed out.

yazaddaruvala 8 hours ago [-]
Rust is great! No two ways about it.

What I want tho would be Rust+Akka for example. There has to be a distributed execution mechanism that is as seamless as Java’s GC. Then the distributed execution mechanism needs to evolve to also be as light weight and “zero cost” while being seamless like Rust’s compile time memory management.

pishpash 12 hours ago [-]
Where's the stance that "we tested them all", any links?
Chris_Newton 12 hours ago [-]
I think somewhat of the opposite will actually occur. LLMs won’t formally verify LLM generated imperative style code. We (including agentic development) will move on from imperative languages, skipping functional and move to deterministic declarative languages.

I’m generally cautious/sceptical about the current LLM hype, but if that did ever happen and it worked to a useful degree, it might truly be a significant advance. I’m not saying that just because of the LLMs themselves, though.

To reach that point, we would first need to overcome the classic problems in this area:

1. How can you specify the required behaviour for a system in precise detail without ending up with a specification language that is essentially another programming language with similar complexity to the ones we use today?

2. How do you solve the sufficiently smart compiler problem so that producing reasonably efficient and reliable implementations of those declarative specifications is not only viable but expected?

And then, if you still need someone (let’s call them a “developer”) to carefully specify the required behaviour of the system in detail, and you also know how to reliably generate a good implementation of a specification, how much value is left for LLMs to add in this picture?

Maybe LLMs really could be trained to reliably produce good implementations in that scenario? Never say never, but it seems more likely to me that we would develop deterministic algorithms for doing so. That’s already a very hard problem that a lot of smart people have explored, but if a solution could be found, most likely it would be strictly better than relying on LLMs in this part of the process.

Maybe there would still be a role for LLMs to convert natural language problem statements into specifications? Maybe for systems that don’t really matter, that would be enough and a big time saver. However, I’m sceptical about how much time it would be likely to save for systems that did need to work, where you would still need careful design and review of all the detailed specifications by developers anyway.

Maybe LLMs would end up in a similar role to the scaffolding tools that are popular in some ecosystems today, where you feed in some basic choices and the tool then produces a first pass at the files and code you might need, which you take as a starting point for the real work but without wasting so much time on boilerplate? That seems realistic and useful, but it’s a relatively small part of what would then be the overall development process.

In short, I would love for the existence of LLMs/agents to push us towards those better programming languages and tool chains, but if that did ever happen, I wonder how much benefit LLMs/agents could still offer once developers had the more powerful languages and tools available and could work at a “higher level of abstraction” themselves.

yazaddaruvala 8 hours ago [-]
These are the good good questions. I wish I was smart enough to answer them.

I think the best bet is to let a hundred developers play at it for a bit. There will be a lot of bespoke domain specific declarative languages. They will over time learn from each other to be better and better.

Experiments like GoogleSql’s pipe syntax https://docs.cloud.google.com/bigtable/docs/reference/sql/pi... getting pushed even further and further. That’s where I’d put my money. Cloudflare might be another candidate for building such a programming language for the distributed compute and memory “machine”.

(Also once we are there) I think there will be even better questions: What does programming CRDTs like a blockchain that reconcile across Mars and Earth look like? and in that way, LLMs will constantly be useful helpers to explore the state/latent space.

pjmlp 8 hours ago [-]
See tools like https://boomi.com/platform/agentstudio

Granted this isn't usable for all kinds of problems, however plenty of enterprise CRUD software can be easily tackled with such agentic runtimes.

Chris_Newton 2 hours ago [-]
For what it’s worth, I did have a look at the site you linked, but it seems to be one of those frustrating home pages that is full of buzzwords and devoid of substance, so I am none the wiser about what their product does or who might be interested in it. How do you think it fits in with the kind of hypothetical future programming languages and tools we were discussing above?
skydhash 4 hours ago [-]
> however plenty of enterprise CRUD software can be easily tackled with such agentic runtimes

People love to make such claims, but the actual CRUD part of enterprise system, while it’s the primary interface, isn’t the actual value of that enterprise and most enterprise code I’ve seen rely already on frameworks to take care of the technicalities. Most of my time has been taken by what should happen when you do one the CRUD actions. The specs of that can be quite complicated to gather, easy to build, and difficult to verify.

rowanG077 14 hours ago [-]
I think it won't happen because people just care to much for performance. You already see this now. You see a ton of rewrites moving to rust even from higher level languages.
anthk 15 hours ago [-]
So Inform7 like languages generating Rust code and then binary code and linked against the OS.
pjmlp 8 hours ago [-]
They will skip the generating Rust code part, from my point of view.
anthk 5 hours ago [-]
i7 transpiles to i6 because of convenience. Still, people uses either because the i6's syntax can be easier for traditional programmers. And with the English (or Spanish, with INFSP6, which almost maps 1:1 the English one) creating an adventure it's a breeze, even for Elementary students.

So, in a near future most people will prefer to have both in order to avoid syntax issues/errors.

slopinthebag 12 hours ago [-]
i dont even think that it would be possible to build a declarative language that is flexible enough to do what an imperative language is capable of without being an imperative language itself
yazaddaruvala 8 hours ago [-]
We don’t need “a declarative language flexible enough to do what an imperative language is capable of”

We need “a declarative language flexible enough to do what the product requires”

octoberfranklin 11 hours ago [-]
Buzzword salad, yummy
white_dragon88 14 hours ago [-]
[dead]
giancarlostoro 14 hours ago [-]
> They’ll compile down to be able to run performantly for game development or even for the Linux kernel (as if Linus would ever agree lol) but also they’ll be able to run on distributed execution engines with effectively a shared memory space, etc.

Linus doesn't have to care, MirageOS already exists for OCaml, and I'm pretty sure there's something like MirageOS for Rust...

jaykru 17 hours ago [-]
From the appendix [0]: "The proofs written by agents are just as 'good' as any other proof of the same theorem, in that they prove the equivalence theorem. However, it remains to be seen whether agents can scale this verbose proof style directly to more complex programs. Experience from other agent-based verification projects, such as MachCSL, suggests that the answer might be no: the agents hit a complexity wall with the verbose proof style, and scaling up requires the proofs to be structured around better modular abstractions and reasoning principles. If that is the case, how can we help agents discover and introduce the right abstractions to reduce this complexity? Does this require input from expert proof engineers, or can we extract common principles that can guide agents to discovering good abstractions that will enable scalable proofs?"

Some mathematicians have observed a similar pattern in the recent LLM proof drops, leading them to suggest that LLMs will hit a wall in mathematical capability just beyond the convex hull of human mathematics. The sort of proofs done in formal verification are a pretty interesting litmus test for LLM reasoning since the systems considered aren't necessarily on distribution (compare with math where the "systems" and structures worked with, and proofs about them, make appearances in thousands of individual books) so the advantages in broad domain knowledge pretrained LLMs have over humans doesn't really buy you much. IMO this observation from Anthropic/Theorem lends more credibility to the convex hull hypothesis.

[0] https://www-cdn.anthropic.com/files/4zrzovbb/website/6867ead...

somethingsome 16 hours ago [-]
"leading them to suggest that LLMs will hit a wall in mathematical capability just beyond the convex hull of human mathematics."

This was to be expected, llms are trained on a very large corpus of data, they 'look' like creative from our point of view, as humans don't have that much knowledge, so, if the LLM proposes something that a human does not know, it looks like creative. But they stay neural networks after all, so very good in interpolation, very bad at extrapolation. Building new knowledge is extrapolation if it's truly outside the convex hull how the dataset.

I usually write code and ideas that are at the border of the convex hull, I haven't seen yet an llm being able to propose a really innovative solution. All the time they reuse building blocks that are already there. And I really tried pushing by making them creating proofs.

If I have an insight on some problem and I ask for the proof for it, it will usually be able to generate the proof, but that proof is never creative, and often it will use novel ideas only if I explain the novel idea. It will not come up with it alone. (And sometimes it's very hard to even explain the ideas, as it tends to return to knew waters)

Its only a data point, but I haven't seen a paper that handle this issue yet, and I don't expect them to magically become good at extrapolation due to the theory behind neural networks.

ngl999 13 hours ago [-]
Coz these machines process representation of knowledge, they don't process knowlegde. That part hasn't been figured out by human yet.

EDIT: typo

Davidzheng 11 hours ago [-]
I highly doubt this will happen.
baby 13 hours ago [-]
You’re assuming that we’re doing more than combining ideas we already know when we’re being “creative”
ngl999 13 hours ago [-]
Sorry if this sounds rough, computer science is probably only about combination, but there are many other fields
rustystump 12 hours ago [-]
Sorry if this sounds rough, no.

Saying that is like saying everything is about combination because well, it is even the creative stuff if you are pedantic.

The wibbily wobbly dna of humans is how we keep recombining things into new shit. Comp sci absolutely has deep creativity in it.

gf000 7 hours ago [-]
DNA is so many layers below human cognition, it's a bit like explaining the Moon landing's technology by a stick burning.

There is absolutely no DNA recombination during a thought process.

arecsu 12 hours ago [-]
At least in arts, there is a true "creative" element complicated to replicate at least in the current LLMs. True artistic invention involves a "spirit of rule-breaking" that pushes culture forward. If AI is only being trained on past data, it then struggles to make the non-linear, revolutionary creative jumps we've seen throughout history.

For instance, the transition of music from the 1950s to the Beatles, then to Nirvana, hip-hop, and beyond. Before Beatles, there wasn't such thing as Beatles. Before Nirvana, there wasn't anything that sounded like that. Of course you can point out underground bands doing something like that around that era, but stray way back in time to like 1940s and chances of hearing something like Nirvana are near zero.

True art is not easy to make. It is, rather, difficult. If you lower the difficulty to make art, then it is not already a piece of art. It is just another product down the line of plenty of copy cats. Art involves risk taking that AIs I don't think are capable of producing. Art is a medium to express human emotions, and the inherent concept here is that it will end up being consumed by another human being, and it has value because you know that another human being was on the other side of the table making it. Even if you do something you consider art for yourself with an AI, the human being on the other side was, well... you. You prompted it and you guided it. I don't believe people in general would be contempt with an endless stream of autonomous AI generated stuff (if they invent such loop) because it would not only be generic, repetitive and predictable at some point, but also the fact that you know its AI it destroys the whole vibe. Same as if you get an email and you don't know if it was an AI or human behind it. If it was a human being, great, you feel a connection there. If it was AI, well... that sucks to no end, and I guess that is for a very good reason.

Although I'm using art here as the argument for creativity, I believe there may be something analogous to scientific leaps and discoveries. To my understanding, people who seem to be fairly successful in uncover the truths of the universe via science also happen to be pretty good when it comes to some artistic endeavors, even if its only about consuming and appreciating art and not necessarily creating it. So, there might be some link in creativity there. I'm open to be wrong, of course. Creativity is about risk taking and pushing the edges, not re-iterating upon what's been already there.

sanroot_Owl 5 hours ago [-]
I want to add onto that true art requires true subjective experience, which AI lacks.
nextaccountic 16 hours ago [-]
Writing proofs is just writing code in a niche language (that's what the Curry-Howard isomorphism is all about). Writing modular proofs with better abstractions is just writing modular code with better abstractions.

Yeah agents need to step up their programming game in general. They write too verbose code and are happy with duplicating code. This works up until the code is so big that they can't process the code base effectively.

If I had to guess, if you train agents to write better proofs (better modularized, etc), they will get better at programming in general. Or at very least, better at writing Haskell, since so many theorem provers are just sufficiently powerful functional programming languages. And if you get better at writing Haskell, you probably get a little better at writing Rust too. That's why I think this skill probably generalizes a lot.

So maybe training agents to do math will get them, like, use Creusot [0] or flux [1] or Aenas [2] to write proofs on their Rust code, and even when they don't, they will probably write code in ways that are more amenable for reasoning

[0] https://creusot.rs/

[1] https://flux-rs.github.io/

[2] https://lean-lang.org/use-cases/aeneas/

jaykru 14 hours ago [-]
Curry-Howard doesn't buy you any shortcuts to capability. Surely no expense has been spared in training models to write good (well modularized, robust, generic etc.) code, and yet they still write slop (poorly structured, overfit to specification gaps, etc.) We see the same sloppish habits in their mathematics, perhaps transported along the CH iso. So "train[ing] agents to write better proofs" seems to me like a grand challenge problem for AI research, just like getting them to write good code. It won't be solved just by noticing that the two problems are isomorphic: we'll keep getting models that are a little better at grinding out proofs, hence a little better at grinding out programs, but the abstraction wall won't magically drop in either world just because the same limited behaviors can be transported along CH.
nextaccountic 10 hours ago [-]
The key is to make general intelligence, and train models in regimes that generalize well among many domains, rather than just a bunch of math proof tricks that don't generalize.

I think LLMs have demonstrated tons of generalization already, but I concede that being good at theorem provers don't automatically translate into being good at other forms of programming and vice versa. But the labs should probably focus on generalizing rather than optimizing for each subfield of programming individually.

Also as an aside, I meant that the use of theorem provers for proving theorems is just programming, that is, Lean, Rocq etc. are programming languages. They are functional programming languages and they invoke Curry-Howard as a reason for them to work, like, at all. And that's why their reasoning is essentially intuitionistic

jasongross 13 hours ago [-]
You make a compelling argument, but, empirically, when you optimize code for performance, you end up with an unreadable mess that breaks all abstractions; but every time I've substantially optimized a proof for performance [of proof checking], I've ended up with better abstractions and more modularity.
jaykru 13 hours ago [-]
That's super interesting. I wonder if you've tried optimizing for type-checking duration of a richly dependently typed program and gotten viscerally nicer code out of that.
y1n0 13 hours ago [-]
A little before that was:

> The most striking feature of agent proofs is that they are verbose, repeatedly spelling out details about the program’s execution: specifying the contents of CPU registers, explicitly writing out integer conversions, explicitly spelling out that many different addresses are all distinct from one another, writing out the exact contents of stack addresses, explicitly considering every possible branch in a function, etc.

> To be sure, these details are important to precisely reason about the execution of code. However, human proof engineers would have immediately introduced abstractions to factor out these types of repetitive specifications.

- - -

This matches my experience when I look at the tests LLMs write to check their own work when I’ve given them a task. The tests are almost universally terrible because they hard code everything in the most brittle way possible. They are nearly useless for regression tests because if I change anything about the source, even in non material ways, the tests all break in stupid ways that aren’t checking any important properties.

If I have the LLM make the then it also has to rewrite all the tests in a new episode of brittle concrete hyper-literal tests. The concept of a regression suite is non-existent.

It’s probably just as well. Having the implementer write the verification is generally a bad idea with people, maybe the problem of carrying over assumptions and blind spots and misconceptions applies to LLMs as well.

One might say it’s operator error, and I’m underspecifying things, but if I have to go to such elaborate lengths to get it to do what I need, I’ll just implement it myself.

octoberfranklin 10 hours ago [-]
It’s probably just as well. Having the implementer write the verification is generally a bad idea with people

Nobody (sane) does that.

Lots of people have the implementer write the tests. But this only seems like a bad thing because of an unfortunate terminology collision:

- Microsoft culture: tests are adversarial verification.

- Google culture: tests are executable documentation.

Both of these things are important. It's really unfortunate we call both of them "tests".

At Microsoft, (verification) tests are written by a different engineer than the one who wrote the code under test. VLSI/Hardware works like this too.

At Google, (documentation) tests are written by the person who wrote the code, because it's their job to document it, and because the point of documentation-tests is to make sure other people who modify your code don't break it.

esjeon 15 hours ago [-]
> LLMs will hit a wall in mathematical capability just beyond the convex hull of human mathematics.

I love that “convex hull” analogy. LLMs can certainly serve as a channel for knowledge transfer. They can help spread knowledge and know-how throughout society, enabling breakthroughs that were simply held back by practical limitations (e.g. lack of money, time, or expertise). Personally, I think LLM is more valuable as a tool for democratizing knowledge than as artificial intelligence.

skew-aberration 14 hours ago [-]
I agree with the observation but not the extrapolation. After all, RLing on sufficiently hard problems might cause agents to adopt better proof strategies emergently.
gf000 7 hours ago [-]
> leading them to suggest that LLMs will hit a wall in mathematical capability just beyond the convex hull of human mathematics

I mean, even just that would prove to be a very productive workhorse - potentially being able to automate away almost every white collar job.

octoberfranklin 11 hours ago [-]
Experience from other agent-based verification projects, such as MachCSL, suggests that the answer might be no: the agents hit a complexity wall with the verbose proof style, and scaling up requires the proofs to be structured around better modular abstractions and reasoning principles.

This is not just plausible but in fact the most likely result.

We already have plenty of evidence of this phenomenon in programming. LLMs are awesome for working on human-written or at least human-reviewed codebases.

But when you set them loose without a human around to force them to refactor their code into something that fits in meatbag-brain-sized contexts, they drift into the ghastly nightmare of the Anthropocene (go ahead, take a look at the leaked source code for Claude Code). They can handle this for a while, especially if you're doubling your model's weight count every four months.

But when you stop doing that, they choke on their own spaghetti.

It's like Feynman said about teaching -- great theoretical physicists need to re-explain the basics to students from time to time in order to force them to come up with not just the correct physical laws, but the simplest version of those laws. Take away that constraint -- IAS or LLM -- and eventually it all goes wrong.

metadat 16 hours ago [-]
Sounds like a software problem.
jasongross 16 hours ago [-]
The difference between math and software verification: in math, the convex hull hypothesis implies that you don't go far beyond human capability, because the bottleneck is out of distribution generalization. In software verification, you can verify just about all the software that exists despite the convex hull hypothesis, because the bottleneck is just scale.
pinevale 16 hours ago [-]
Formal verification against what?

The elusive 100%-coverage formal spec that covers every intended and unintended input, the interests of every stakeholder, and every possible user behavior? In the vibecoding era? No, the page has the decency to acknowledge this doesn't exist.

In the end, they settle on finding crashes with a conventional fuzzer, fixing crashes, and then... writing a formal proof that the crash is fixed? That seems... pretty pointless? Am I missing something here?

gr_norm 16 hours ago [-]
From the article:

> Proving that a fuzz test has no more crashes to find is more significant than it sounds. It’s common for fuzz tests in real-world code to test for violations of meaningful high-level properties, such as encode-decode roundtripping, idempotence, algebraic laws, differential testing, self-consistency, or equivalence to reference implementations. For example, a fuzz test for the LZO compression algorithm asserts that if you compress an input, then decompress it, the result is the same as the original. If the property does not hold, the program crashes—so proving the test never crashes is equivalent to proving the property itself.

However, you're correct that this is not formal verification in the sense of a correctness proof against a full specification validated to capture what the program is intended to do. Pretty impressive though.

nemo1618 9 hours ago [-]
In essence this lets you verify any property you want for a given function, as long as it can be expressed as a fuzz test. Specifically, you can express your property with an assert, and then prove that it never fires. This is nice because it keeps everything in one language, rather than having to translate the whole program into Rocq and then express your desired property as a Rocq theorem.
bolt012 7 hours ago [-]
[flagged]
btilly 16 hours ago [-]
That's not what they did.

What they did is tried to prove that the conventional fuzzer won't find crashes. Where they found counterexamples, they fixed the bug and tried again.

In essence, a fuzzer takes random samples out of a space of possible inputs that could crash. They proved that nothing in the space of possible inputs could crash.

This is a strictly more powerful result than a fuzzer could give you.

glennfiedler 16 hours ago [-]
Yes. You are missing something. They are proving that for all possible inputs the program doesn't crash for a given size of potential inputs at the machine code level. The proof extends to an entire set of inputs and all the code it touches, not just the cases the fuzzer covers. In short, they have better coverage than any fuzzer.
randysalami 16 hours ago [-]
Turning buggy software A into buggy software B, with all bells and whistles (and bugs included). This is useful for doing large-scale restructuring of codebases. You can verify you aren’t adding (or removing) bugs.
js8 8 hours ago [-]
Actually, bugs might surface during such restructuring. If the statement you're proving can be greatly simplified to something reasonable, if we omit this one weird special case, that indicates a bug in the specification.
vikramkr 12 hours ago [-]
The main thing they focused on in that is just cybersecurity. Formal verification to try and get rid of surface area for vulnerabilities. Seems like a good idea idk. It also sounds like they're just kinda getting started with it - we'll have to see what opus 5.6 or 5.7 looks like after they've RLed on it a bunch
burcsahinoglu 14 hours ago [-]
[dead]
Olscore 15 hours ago [-]
Building a house has three layers:

1. Vision: what we want (our intent)

2. Blueprint: the spec we wrote (our design)

3. Inspection: checking what we built against the blueprint (the proofs)

This research makes the inspection close to perfect. But an inspection only checks the blueprint, not our vision, so a house built from the wrong blueprint can still pass a perfect inspection. The other half is making sure the blueprint matches our intent and stays that way while agents build. I'm working on that, so I think this is complementary:

https://github.com/pullboard-dev/pullboard

Salparvezml 3 hours ago [-]
[flagged]
sestep 15 hours ago [-]
Been doing this at work for the past couple weeks. Extremely powerful to be able to have an agent open a PR with some experiments showing it makes some function faster using SIMD or CUDA, and just confidently merge it because the PR has a Rocq proof that it's behaviorally equivalent to the original implementation.
mattr03 15 hours ago [-]
How do you gain confidence that your theorem actually applies to your code?
sestep 15 hours ago [-]
My Rocq setup directly reads my actual code. And I fuzz my semantic models against the real machine.
FuckButtons 12 hours ago [-]
Is this closed source?
sestep 4 hours ago [-]
Yeah. I've been considering asking my boss about open-sourcing it but I'm probably gonna flesh it out a lot more first.
hedgehog 15 hours ago [-]
I'm curious about your workflow (or the one in the blog post), I have been doing some experiments proving things about existing binaries and it's been extremely slow progress.
sestep 15 hours ago [-]
Yeah it took a bit to decide which abstraction level to target but I ended up choosing LLVM IR (planning to try PTX soon). It's been pretty successful so far for SIMD stuff, although proving theorems about concurrent programs seems a lot slower so far.
zodiac 14 hours ago [-]
Does this require having a Rocq semantics of LLVM IR? Which one do you use?
sestep 14 hours ago [-]
No existing semantics are enough for my goals, so I'm building my own based on Vellvm, and proving "equivalence" theorems to it and other related work that specify what quirks/discrepancies/idiosyncrasies they have with respect to each other.
hedgehog 12 hours ago [-]
Ah, interesting. I went with Ghidra p-code which seems ok but what I didn't really appreciate going in was how much of the platform API surface you have to describe before you can prove pretty much anything at all.
leafmeal 14 hours ago [-]
Reminds me of this blog post by Martin Kleppmann predicting how AI will make formal verification go mainstream

https://martin.kleppmann.com/2025/12/08/ai-formal-verificati...

pizzafeelsright 16 hours ago [-]
This flows.

All of human knowledge, experience, distilled down to idempotent instructions and code for specific tasks, functions, situations is fully testable against a near infinite amount of fuzz and attacks.

We do not question the strength of steel if properly treated.

Code is no different. We will enter the point where code is finally trusted as a carabiner and rope for the life of a climber.

joshAg 15 hours ago [-]
This doesn't follow. We've had code as trusted as that for _decades_. Common criteria and EAL was certified at the end of the 20th century. Before that there was the rainbow series in the US dating back to the 1980s [1].

It's absolutely cool to see this sort of validation process get cheaper and easier, but it means nothing if no one cares enough to do it. EAL1 certification can be as cheap as a beefy server, but it's not commonly done because effectively no one cares.

As microsoft learned with the zune just because it's cheaper or better at the same price doesn't mean anyone will use it. Culturally, we have to make the effort of verifying code worth it.

[1]: https://en.wikipedia.org/wiki/Rainbow_Series

Stitch4223 15 hours ago [-]
Code needs to run on physical devices, which are prone to undervolting, bit flips, hardware bugs in specific batches, radiation, deterioration, and the like.

Preferably, I wouldn’t trust my life to a calculating device running on AA batteries while dangling from a rope.

pizzafeelsright 15 hours ago [-]
Pace makers, dialysis machines, brake lines.

We also have fully redundant systems. The elevator for example required Otis to do this fantastic demonstration 150 years ago and now we don't think twice about it.

Do you know how elevators work now? Their safety mechanisms? Planes are 10x more likely to cause death.

Stitch4223 8 hours ago [-]
> Pace makers, dialysis machines, brake lines.

That’s fair, including insulin pumps over Bluetooth with known vulnerabilities. Many vulnerabilities might be fixed or formally verified if they are part of the architecture.

> Do you know how elevators work now? Their safety mechanisms? Planes are 10x more likely to cause death.

Both rely on inspections, routine maintenance, procedures, and fail-safe hardware afaik. Just like climbing gear.

Would formally verified software add anything? For example, could it cut the need for inspections or software maintenance? I think neither is going to change.

But what might change is that the specific spelling error on an elevator display is formally verified. It becomes about coziness with impressive amounts of paperwork that only a few people can understand.

Just changing one statement requires new verification, which is why formally verified code currently is not touched but ported verbatim into new projects and “rewrites”. That cost may decrease, which is nice but also not nice: the systems you currently want to formally verify are systems you might not want to alter without high friction in the first place.

I’m hopeful it will produce more robust software, and I’m by no means against it, but I’m skeptical of producing more when we might want to produce less.

pizzafeelsright 2 hours ago [-]
Would formally verified software add anything?

I am very curious about this now. Bad software is now free. Stability and security sell better than ever.

skydhash 15 hours ago [-]
> Do you know how elevators work now? Their safety mechanisms? Planes are 10x more likely to cause death.

There's something called safety regulation. An installed elevator is very likely to have passed all the verification necessary for it to clear the safety bar. Same with the other devices you listed.

As for general code, it's mostly based on trust. But I see practices endorsed by the AI providers and trust is very low on my end.

pizzafeelsright 3 hours ago [-]
I think we are going to be able to say 'this code is AI approved' with levels of certifications that were previously unavailable.

If AI can stress test the code faster, more correctly than humans, the quality and regulation will follow.

3dd3ee 16 hours ago [-]
[flagged]
3dd3ee 15 hours ago [-]
Oh here come the anthropic bot army.
pizzafeelsright 15 hours ago [-]
Oh I wish I saw it!
15 hours ago [-]
svcrunch 11 hours ago [-]
Along these lines, we used Codex to collaboratively build an alloy model for verifying the authorization model of GoodMem. After building the model, we implemented the code based on it, and, while there could be a gap in the translation process, several hours of red-teaming the server (w/attacker source code access) to try and produce a privilege escalation attack using GLM 5.3 failed.

Alloy is a tool I tried to learn many years ago, but I never learned it well enough to use it for formal verification of a complex production system. Credit goes to agentic coding tools for making it a reality.

[1] https://alloytools.org/

[2] https://docs.goodmem.ai/docs/concepts/security-model/

pjmlp 8 hours ago [-]
This is exactly the kind of stuff I am slowly realising with the increased adoption of agentic runtimes in enterprise SaaS products.

We will move into formal verification alongside AI tools, thus generation of executables via translation to 3 GLs is going to be a transition step, just like Assembly coders wary of optimising compilers always wanted to manually check the generated Assembly code.

And yes, many of us will have to search another source of income as an outcome of "progress".

operator-name 14 hours ago [-]
https://knowyourmeme.com/memes/they-feed-us-poison /jk

It’s exciting to see how low the barriers to fuzzing and formal proofs and higher verification standards like property based testing has become! It’s just a shame this LLMs are what it took, and even then adoption in the industry is slow.

whazor 8 hours ago [-]
I've noticed that people (including myself) are becoming too lazy with LLMs.

Trying to become even lazier by skipping code reviews and then vibe-coding formal software verification will get you into trouble.

In my experience with software verification, perfect is the enemy of good. My recommendation is to start with a software design you actually understand, and then try to understand how to map your requirements to something you can prove.

globular-toast 6 hours ago [-]
We were always lazy, but there was no other option before. Nobody does any work that isn't required. If you want to do something that isn't required, then it's not work, it's a pastime.

So why do people work? For the vast majority of people there are three main incentives:

1. Survival. You need food and shelter. Most people don't own anything so have to do whatever the owners want them to do to meet basic needs,

2. We get satisfaction from helping, pleasing and impressing other people,

3. We get personal satisfaction from doing a good job, being proud of our outputs and learning and honing our skills.

A bad job like factory work or unskilled labour only has incentive 1. Nobody takes pride in how well they've cleaned a toilet, nor does anyone appreciate it. Better jobs get 2 and 3 as well. We generally got all three incentives in abundance.

What we're seeing is the loss of incentive 3 and inevitable eventual loss of 2. Those were what drove us to do more than the bare minimum that's required for 1. That's why we would spend time thinking through things, struggling with problems, learning and bettering ourselves in the process. Now there's no personal satisfaction because an LLM could do it. And we know that there's nothing really stopping other people doing to too, so what we did soon won't even be impressive or help others (although we can cling on to it for a little while maybe).

We have a few options going forward. On a personal level we could try searching for something that gives us the satisfaction we once had, or we could just accept that we'll become wage slaves likes so many others. On a societal level we could all decide to minimise the amount of work we do, given that it's much less enjoyable now.

usernametaken29 11 hours ago [-]
If you use LLMs to digest and summarise software maybe it can help to improve formalisation. In contrast if you use LLMs to produce more code this is contra-dictionary. More codes increases the bug surface circa logarithmically and correspondingly makes formalisation much harder as well. I want to see LLMs be used to strip away code. Only then will I believe they’re really actually good at what they’re doing.
gregwebs 13 hours ago [-]
I have a skill for using Verus with Rust [1]. I think they found a nice way to integrate proofs with the language. The verify skill I use lists proofs as a possible technique [2] and the project instructions have instructions on using it, but only a very small fraction of the code base I am using this on has proofs. Anyone can now have an LLM write proofs but its still difficult to know when they are more productive than other techniques and to relay that advice to an LLM.

[1] https://github.com/gregwebs/skills-sdlc/blob/main/skills/rus... [2] https://github.com/gregwebs/skills-sdlc/blob/main/skills/ver...

woggy 15 hours ago [-]
I found that even with LLMs making sure the formal specification covers what you actually want is challenging.

How do you actually know what the LLM proved is what you want?

y1n0 13 hours ago [-]
How do you know any test is checking what you want? You either review it, and/or you run the test on things you know are good and also things you know are bad.
woggy 12 hours ago [-]
Well they are much harder to read than tests.

I was going through an experiment trying to spec out a simple caching system in Lean. I was getting Gemini to help me run through doing this, step by step. At one point it writes out this statement with a proof to show something, the specifics of which I forget, but it was some simple property of the cache. I stare at it for a while thinking to myself this can't be right, it was some sort of plain tautological statement that didn't really say anything, like saying 1 = 1.

I give it to Opus 5.5 and it basically confirmed my gut feeling that it was useless.

I'd like to rely more on formal verification. I like the idea of starting out with specs in a formal setting and designing software that way. The problem is it's hard to do right, and my point is even with AI, it's hard to do right.

y1n0 11 hours ago [-]
I fully agree it’s harder to read. I do chip design and I feel like formal is more common in this area, but I generally restrict it to very simple properties that are easy to understand without having to mentally solve a sudoku puzzle.

It’s to easy to write an assertion that looks like it checks what you want it to, and gives you a false confidence when it passes, only to figure out after a field failure that it wasn’t checking what you thought at all.

But I’d pay for a commercial set of properties and assertions that had guarantees, and not worry about their complexity. For something standard like cache protocols and bus protocols.

Other cases it needs to be pretty straightforward to grasp by a peer reviewer in minutes, or it’s not worth it.

But when you can hit the sweet spot, a set of easily understood properties (or complex but trusted properties), formal can save massive amounts of time.

nemo1618 9 hours ago [-]
That's the nice thing about the approach described in the blog: you use the same Rocq theorem for every binary (it just says "this binary doesn't crash") and then you express the property you want in your language of choice. For example, to prove that your compression algorithm round-trips, you would write something like assert(x == decompress(compress(x))).
mjorgers 16 hours ago [-]
It might be that I’m unfamiliar with the matter, but as I understand it, in order to prove a statement, the statement must correctly model the reality of the code. In that case, how can you be truly sure that, when formally verifying a program, you have correctly modelled the software you’re trying to verify?

Couldn’t it very well be that you proved something that wasn't actually your program?

gizmo686 16 hours ago [-]
If you have a model of the programming language, then you can make proofs about the source code itself. At this point, your assumption is that you are accuratly modelling the compiler.

You can go a step farther and model the instruction set and architecture, and which point you can make proofs about the final binary directly (thereby sidestepping the problem of compiler bugs). At this point, your assumption is just that your physical hardware actually matches your model.

geraneum 16 hours ago [-]
> Couldn’t it very well be that you proved something that wasn't actually your program?

Correct. It can happen, where the actual code, could diverge from a lean representation of it, in a glaring or subtle way.

david-gpu 16 hours ago [-]
> how can you be truly sure that, when formally verifying a program, you have correctly modelled the software you’re trying to verify?

You can do it backwards. You declare the properties you want the resulting program/function to have, using a proof assistant like Lean, then prove that a program exists that meets those requirements, and the proof assistant spits two things: a confirmation that the proof is valid, and a piece of code that implements the proof, in the form of computer code.

At least that's how the proof assistant Coq would often be used. You still have the challenge of ensuring that you have defined the properties you really want in the first place, but at least it solves the part where you want the code to meet the specification.

anon291 9 hours ago [-]
I mean ... The thing about formal verification is that you can write the extremely slow but correct version of your code and then have an optimizer write a much more efficient version with a proof of correctness.

For things like programming languages we often have tedious, but slow, semantics that can be directly implemented in a suitable language. Then really all that a compiler or interpreter is is a faster version of those semantics.

If you are able to show correspondence between the fast and the the correct version, then you can toss the correct and slow version without even ever running it and just defer to the provably correct fast version.

Most software is ultimately like this

akkad33 2 hours ago [-]
I think the hard part of formally verifying something is not writing code. Granted it is hard and LLMs will help with that.You also need to model the user space correctly and this is a bit like causal modeling, there are many confounding factors to be taken into account and if you missed something at modeling time you'll miss bugs
cadamsdotcom 15 hours ago [-]
One wonders how deep is Anthropic's queue of marketorials.
adyavanapalli 14 hours ago [-]
> Claude can write a proof showing that a compiled program’s behavior satisfies the requirements of a formal spec (which is verified by an external proof checker). However, a proof checker can’t tell you whether your spec matches reality.

Imagine having a formal spec for reality!

Animats 10 hours ago [-]
That's a brutal way to do verification, at the machine code level. But it's worth it in today's threat environment.
nemo1618 9 hours ago [-]
I think it's a really illustrative example of how to play to AI's strengths. No human would dream of writing 600,000 lines of Rocq to verify one binary. The whole approach is so insane that it probably wouldn't even occur to them. But Claude has no concept of tedium, and will happily fill out lemmas all day long until the job is done. To me that's what's significant about this result: it's not about scaling up an existing technique, it's about using scale itself as the basis of a new technique.
euroderf 8 hours ago [-]
This is of course Joseph Stalin's First Rule of LLM Assistance:

"Quantity has a quality all its own."

nicce 10 hours ago [-]
I believe that they chose assembly in order to diff against real projects and then see if those real projects have bugs.
lhk931122 7 hours ago [-]
I'm studying coding these days, and I thought I should still be able to read code, but I'm starting to wonder if I really need to read it, and then what I should do.
RugnirViking 7 hours ago [-]
it has always been so that being able to read and write code is the first step on the rung. Once you get experience, you start to focus more on higher level concepts of what won't work, what will be annoying to maintain, what will be slow, what will be annoying to extend, and what will be acceptable to the other groups of humans you work with.

I think learning to code will still help with the other things here - its a good first step, even if its now obsolete on a direct level. Like how its useful for mathematicians to be able to calculate by hand even though calculators exist - it gives intuition for how to operate the tools and check results

braiamp 15 hours ago [-]
TLA mentioned, previous related discussions about the topic:

"What TLA+ can and can't check" https://news.ycombinator.com/item?id=49909056

"The internet discovers TLA+. Now what?" https://news.ycombinator.com/item?id=49863600

gnabgib 15 hours ago [-]
What a tiny subset of all TLA+ articles (a very popular topic on HN)...

2017: Leslie Lamport: Video course on TLA+ (328 points, 74 comments) https://news.ycombinator.com/item?id=13918648 (219 points, 2018, 17 comments) https://news.ycombinator.com/item?id=16956778

2017: Writing correct lock-free and distributed stateful systems in Rust, with TLA+ (374 points, 94 comments) https://news.ycombinator.com/item?id=14373359

2019: TLA+ model checking made symbolic (197 points, 51 comments) https://news.ycombinator.com/item?id=21662484

2019: Introduction to TLA+ Model Checking in the Command Line (176 points, 44 comments) https://news.ycombinator.com/item?id=18937214

2019: Learn TLA+ (387 points, 92 comments) https://news.ycombinator.com/item?id=19661329 (310 points, 2020, 58 comments) https://news.ycombinator.com/item?id=22393653 (254 points, 2022, 64 comments) https://news.ycombinator.com/item?id=33010645 (350 points, 2022, 75 comments) https://news.ycombinator.com/item?id=31952643

2020: Using TLA+ in the Real World to Understand a Glibc Bug (166 points, 76 comments) https://news.ycombinator.com/item?id=24958504

2026: Hunting a 16-year-old SQLite WAL bug with TLA+ (239 points, 29 comments) https://news.ycombinator.com/item?id=48730953

...

https://hn.algolia.com/?dateRange=all&page=0&prefix=true&que...

braiamp 15 hours ago [-]
Yeah... usages of TLA+ within the realm of LLM is kinda newish, wouldn't you agree?
hirako2000 8 hours ago [-]
Getting tiring to read everyday in hackernews about shovels sellers telling us their shovels are so good at finding gold.
j16sdiz 15 hours ago [-]
Did they remember what OpenAI did with Lean and Math Proofs?

OpenAI wrote some lean that pass the validate, write a math paper that feel plausible, but the paper don't match what's in lean.

Anthropic is now translating programs into Rocq proof. The same can happen.

Don't get me wrong -- this process can help catch some bug. but this is far from a proof

ChicagoDave 12 hours ago [-]
I designed Sharpee and generated the code with Claude Code. About six months in I had Claude generate a manual for the language. Then I had this crazy idea of testing the manual with a completely dummy instance of Claude in a VM.

Nothing solidified Sharpee more than “compiling” this manual chapter by chapter.

But even that left gaps. I then designed a true DSL called Chord that compiles to Sharpee and this really ramped up the solidity of Sharpee.

dominotw 12 hours ago [-]
what is sharpee. chord ?

no idea what you are even talking about

ChicagoDave 9 hours ago [-]
You could infer I created two programming languages or you could infer I tested AI generated constructs in a way only AI could.
crabbone 2 hours ago [-]
I was thinking about addressing the issues mentioned (multiple times before, but most recently) a couple days ago by a Facebook employee who was scared of releasing code that nobody understands.

I see two possible ways forward, not necessarily mutually exclusive.

* Make AI work with languages with reduced complexity. A lot of language complexity exists to make it (surprise!) easier for humans to deal with the language. For example, generics in a language like Java make it easier because they allow the programmer to write many similar programs just once. And because people are prone to make mistakes when working on repetitive code, generics are useful for people. AI, on the other hand, doesn't get tired. It doesn't care if it needs to implement the same template for a different type a dozen more times. So, if we give AI a language without generics, it will be just as happy, but it will eliminate a whole class of potential errors related to eg. up/down-casting of generic collections. Similarly, we could remove "dangerous" tools like infinite loops, or outlaw some system calls, producing less generic / more purpose-built languages (like PostScript!) Perhaps projects like OMeta could see some revival in this light?

* Replace, as much as possible, the work of testers with proofs, but not AI-generated proofs! The formal specification (which is another way to look at the proof, at least its statement) is where the human being needs to provide input to AI. If it's not possible to read the whole generated code, we need a tool more reliable than a test to convince ourselves that the code does what we want. Formal verification, or, even better, tests generated dynamically from formal specification (there's no need for AI to do that, this can be an entirely deterministic process) should be the way for the human to stay in the loop.

UncleEntity 15 hours ago [-]
I took a different approach with this JavaCard VM I've been working on, first I had Claude implement the VM from the spec and then I had it implement a proof generator (also from the spec) so an identical bug would have to exist in both of them to make it through. Worked pretty well, the JCVM and bytecode verifier are both statically verified using ESBMC (which found a few bugs in that project so, win, win).

Now I have it working on a verifier for the bytecode transformations the optimizer uses, also using the static verification approach, to discover them all and ensure they are all valid. This one is seeming to be on track to making it fast enough to work on a real grammar as opposed to the 'academic grammars' the literature typically uses to prove the lemmas. Claude seems to be fighting this and has been working on the same refactor for over a week now so, we'll see...

y1n0 13 hours ago [-]
I think you still run the risk of common-mode failure. It might be more robust to pick a different model altogether to do either the VM or the spec.
dolmen 13 hours ago [-]
PandaRider 15 hours ago [-]
I'm curious if increased adoption of formal verifications would increase migration of legacy COBOL to modern systems.
y1n0 13 hours ago [-]
It seems like it’s a good fit. Proving equivalence is much easier than writing a spec without a golden reference.
js8 10 hours ago [-]
Except COBOL systems are often easier to formally verify than modern systems.

They're often simpler, and whole classes of security vulnerabilities are mitigated by design. My favorite example is SQL injection mitigated by having proper access controls in the DB. Why prove about every SQL statement that it cannot be nefarious, when we can just prove it about the connecting user? The user access carries the intent of what the application program wants to do with the database, in a separate channel, independently of the complexity of the application.

lenerdenator 16 hours ago [-]
Strange to see Anthropic making this point. When I use Claude in my daily development and ticketing workflows, it doesn't seem to want to do formal verification of anything without me telling it to. It makes a lot of assumptions about the state of systems when it could very quickly write scripts to formally validate those states.
dvt 15 hours ago [-]
It's why unit tests are worthless when humans write them, and less than worthless when AI writes them. Same concept: you're testing yourself, of course you're going to pass with flying colors.
y1n0 13 hours ago [-]
I wouldn’t call them worthless. I guess it depends on the unit. But also having someone or something independently write tests is generally better than testing your own code.
vikramkr 12 hours ago [-]
If you want it to do that consistently why can't you put it in your Claude.md?
lenerdenator 3 hours ago [-]
I've made code review skills that have it in their files; still hit-or-miss.

I could probably use less stuff in my Claude files tbh. I wonder if that sort of thing is being pushed out. Still, when the marginal cost of running a bunch of stuff in a shell or REPL is 0, it should be the go-to for the LLM, not something it needs reminders to do.

crabbone 3 hours ago [-]
> The Linux kernel—one of the most well-tested pieces of software today,

I feel like these people aren't really experts in the field of testing... Linux is not known for its testing... there's plenty of good things one can say about Linux, but great testing isn't one of those.

Now, things that are well-tested are things that do critical stuff, like avionics, power-plant control, medical equipment, storage... It's software from a different league.

Linux is too big, too dynamic, too distributed between different authors to hope for great testing. And it's OK. I'd rather have more people being able to contribute, not being constrained by the difficulties of the testing than have a very well-tested and borderline useless system.

noiv 10 hours ago [-]
> Specifically, Claude proved that these programs will always exit normally without triggering memory-safety errors or failing assertions, for every input less than 64 MB and ...

Did they solve Halting Problem?

vanschelven 10 hours ago [-]
_these_ programs not _all_ programs
noiv 8 hours ago [-]
Right, 123 libs have been found to behave...
bmacho 9 hours ago [-]
I don't get what you mean? Granted, I didn't even try reading your message, since the language that you're using, English, is not sound, complete, decidable (or even defined).
cmrx64 9 hours ago [-]
About time, too. I studied formal software and hardware verification “before AI” and automated reasoning and cognitive architectures were just in need of scale. People are struggling with the inherent meaningmaking of taking formalism seriously in the world. It’s easy to roll your eyes (and I do a lot of that myself) but I have a lot of sympathy. It took many years of dedicated focus for me to convince myself the validity of automated reasoning / externalized cognition.
fathermarz 15 hours ago [-]
I would disagree that this is not “formal verification” as that discounts the entire software supply chain and how attacks actually show up.

Is this end to end verification? Cause this sounds closer to validation than verification.

anonymous908213 14 hours ago [-]
Talk is cheap, show me the code. Claude generated a formally verified Python interpreter in Rust? Bullshit. Anthropic would have published it if they did, like that dogshit C compiler publicity stunt. That they won't even show it indicates that this is so misleading as to be a lie. They generously give themselves the grace of describing it as a "subset" of Python interpreter, and I believe them -- I can formally verify a "subset" of Python quite easily, but nobody will be impressed when they look at what that really means. Why was it tested with "1.7 million randomly generated" Python programs and not any real-world Python programs that already exist? Because the subset doesn't cover what anybody would consider to actually be Python.
giancarlostoro 14 hours ago [-]
Hmm? I had Claude Opus 4.6 implement a .NET compiled language that is Python-like (we already have IronPython, I wanted something Python-like that treated .NET as its entire runtime) language in about two (maybe three sessions tops?) of 1M token context windows, and the first two times I only used roughly 400 to 600k tokens? When Anthropic dropped the 1M context window update, I put it to the test.

See for yourself:

https://github.com/Giancarlos/Culebral

Anyway, my custom (currently paused because I'm taking on a much more ambitious compiler project with Claude... just to push the limits) language can build ASP .NET applications, and a bunch other things. I also took the Rust approach to types, all method signatures must have types defined, type hints are inferred when declaring new values from the value on the right.

I've also had Claude rewrite legacy C# projects with 100k+ lines of code, fully in Rust, long before Opus 5.0. I've spent the last year pushing the limits with Claude, including reimplementing existing software, which people are catching on to now, and I've managed to get rather far in some cases.

So I wouldn't be surprised if yes, Claude can implement Python, mind you, there's Python interpreter coded in Python in what was it? 500 lines of Python? You can build a Python stack machine bytecode interpreter in like 60 ~ 80 lines of Python code.

Would not surprise me if you can trim a C programming language interpreter down in terms of lines of code when you rewrite it in Rust especially when you have access to a much more functional language, not to mention Rust took the best bits out of OCaml it could to make itself very efficient at writing compilers / languages (so they could write their own compiler in Rust...).

I am also having Claude building me a much smaller compiler, which started out in under 500 lines of Python, but as I got more ambitious it had to write more code for my language, it was meant to be a slightly less restrictive Go, the Python basically converts the syntax to C which then compiles anywhere. Havent put that one on GitHub since I'm still tinkering with it.

anonymous908213 14 hours ago [-]
I notice you haven't touched that repo once since the month you prompted for it. I don't doubt that you generated some cute little prototype that compiles something. I do doubt that it's something actually suitable for anybody to use for programming. My own experiments with having frontier models attempt to implement my own language have all been dire. Even with a rigorous specification and a set of hand-written programs showing both the input of my language and the asm it should output, it managed to create something that compiles exactly those programs and completely fails in real-world use beyond that. So too with Claude's own C compiler experiment; even with C's unbelievably rigorous test suites that give it a deterministic guideline and actionable feedback every time it fucks up, it was still shit. If they merely gave it a C specification, without the decades of human-written tests, there is a snowball's chance in hell it would produce anything worth using.
giancarlostoro 13 hours ago [-]
I think you answered your own problem: telling it what assembly you're expecting, get it to build the foundation before you start asking it how the tiles should look.

Right now I'm working on a compiler / runtime for a more complicated language than Python or C and while its "slower" I know that once it's done through this run I'll be able to have it focus on optimizations, especially with rigorous tests that some languages have to test their compilers. I have plans to run back to Culebral, but I have to scratch a bigger itch I've had, people like you who've told me repeatedly that an LLM cannot be used to build a compiler. So here I am, slowly chugging at it, getting decades of developer effort worked through every week.

If I'm wrong, so be it, if I'm right, it'll be fun to release. :)

anonymous908213 13 hours ago [-]
It doesn't take a decade to write a compiler for a language. If you're putting months of your own effort into it, it's not clear that the LLM is even increasing your productivity.
giancarlostoro 1 hours ago [-]
Some compilers take a long time to achieve the performance they're currently at, and many engineers. I'm soloing a runtime similar to an existing one with the goal of matching or beating the performance, right now I'm beating on memory usage alone, the "months" is only because I'm not investing more than the weekly tokens Claude will give me for $100 a month, plus dividing it out of my other projects I use Claude for.

I looked at a similar project to mine, done by someone for several years now, they're working 100% solo, I'm already where they're at, with several things they don't yet have.

sylware 5 hours ago [-]
If it is formal, you don't need LLM.

If you need LLM, it is not formal.

Formal software are not LLMs.

LLMs/agents can use formal software.

The limit of formal software is the formal model itself, roughly speaking the binary specification is designed by humans. If the formal model is "wrong", bravo, you have formally proven a "wrong" model...

paxy 15 hours ago [-]
All this is going to do is move the problem up one layer. Sofware is fundamentally a representation of human expectations for the computer. How do you formally verify that?
perching_aix 15 hours ago [-]
Nohow, because the real world is informal. This is as far as coding can and will ever go, basically.

And like yes, it does just launder defects to a layer higher, but another way to phrase that in this case (and in many other cases) is that it raises the bar.

Instead of defects being mostly about nonsense minutia (relative to business logic), they are about actual design decisions and their correspondence to reality, i.e. the actual original goal and point of this god forsaken, navel-gazing field.

y1n0 13 hours ago [-]
You do it by comparing to something that is “known” to be good.

I didn’t read the whole article, just the appendix. There they talked about having Claude write a python interpreter. Then they had it write a set of properties to test and they vetted the properties against accepted existing python interpreters.

Proving two things are equivalent is a major component of formal.

For everything else, formal is only as good as the properties you specify. A long standing problem. But it’s a problem for all verification. If you write a shitty tests, you get shitty verification.

A key difference I think is that the same skills used for evaluating and reviewing application code apply to reviewing test code. That’s not really true for formal.

thinkindie 8 hours ago [-]
is it just me, or is Anthropic posting more articles like this (and similar other topics) in the past few days than before? And more of them are ending up in HN front page?

If I recall correctly the only news they used to post were new models updates, while now they have expanded their topics, or so I feel.

whateveracct 11 hours ago [-]
in heavy air quotes, yeah
waffletower 14 hours ago [-]
I think these developments should be done with care and cognizance of the user. I worry that formalism may have trouble scaling and interacting with user intent. LLMs will (and already do in my experience) construct a formalism for your application that may be provable to some archetype -- but separate from reality and separate from your conception. The Claude user experience of rulings is already at a cultural limit among users -- the excitement over the linguistic 'improvements' of the Opus 5.5 release are a case in point. Formalism is only one axis here and usability is another. This could be a problematic development if done lopsidedly.
m3kw9 13 hours ago [-]
code changes 1000 times a day, and you want to "formally" verify it?
zer00eyz 13 hours ago [-]
> “Formally verified” does not mean “bug-free.”

Is formal verification the path forward? Meh... I dont think so. Does it have applications in some areas: yes. But this is just more robust "unit testing".

Anthropic keeps trying to convince you that "one agent" will do the job. It does so with the statement "We built 36 small verification tasks from real OSS-Fuzz code. Opus 5.5 proves half of them with about 40% fewer tokens than Opus 5. We expect this trend to continue as models are trained on long verification tasks."

But this is not the path forward. Robust E2E, durable (can your app go from python to rust with out loosing tests) Simulation/Emulation tests are the way. This is an "in bulk" and "brute force" activity. Go look at TigerBeetle for an example of this in practice. Go look at how oxide is doing testing.

Can a swarm of cheaper agents write these tests more effectively that Anthropics premium products. I assure you that it can.

If you look at OAI's actions (hugging face hack) and anthropic own publication on its version control AI is not a best of breed solution its a brute force hammer at it till you get what you need solution.

3 hours ago [-]
nghiemphucminh7 7 hours ago [-]
[flagged]
favori995749721 13 hours ago [-]
[flagged]
bogomind 16 hours ago [-]
[flagged]
ravivarmat 9 hours ago [-]
[flagged]
scsoi 12 hours ago [-]
[flagged]
scsoi 13 hours ago [-]
[flagged]
prompter_note 13 hours ago [-]
[flagged]
CurbStomper4 16 hours ago [-]
[dead]
lutusp 13 hours ago [-]
> Ideally, such techniques could find and patch all bugs, and then provide some proof that there are no more to be found.

I wish people would learn a little computer science before making this kind of impossible claim. And I wonder how many people read claims like this and accept them without investigation.

The Turing Halting Problem (THP) invalidates the above claim, on all nontrivial software systems, forever.

The THP (1937) is derived from Gödel's Incompleteness Theorems (1931), and the latter are not a matter of opinion.

For those with limited attention spans, ask yourself this: How does the foolproof program checker check itself?

3uruiueijjj 12 hours ago [-]
The halting problem applies when you are trying to check the properties of arbitrary programs. However, we are not writing arbitrary programs, we are writing very specific (hopefully useful) programs. The two are very different.

Pop-sci explanations of the halting problem have probably done incredible damage to formal verification as a whole. Mostly because it makes people with only the most cursory understanding of it go "why bother, it won't work anyway."

krackers 11 hours ago [-]
I think incompleteness theorem means that you can't guarantee the agents will always be able to converge on a proof, since you can't have both completeness and soundness (and we obviously need soundness since that's the whole point of a theorem prover).

But most real-world programs are maybe not that "expressive" since we don't even want them to be capable of infinite loops (since those would often be denial of service vectors). So you should usually be able to prove that they halt (and presumably other properties as well), especially when you allow agents to rewrite things to pull out invariants that make proofs easier (as they did).

And for cases where getting clean invariants are difficult, I imagine you can just hack it by having some cutoff which trivially ensures things always halt. (Not sure what the equivalent would be for "no bug" proofs, probably rejecting things that are technically valid input per spec but seem unusual?)

js8 10 hours ago [-]
While I completely agree with 3uru, where it can get stuck is if your system contains a pseudorandom generator or some other cryptographic shenanigans. These are programs deliberately made difficult to analyze and reason about.

I would say, in practice, you are more likely to encounter complexity barrier (we don't know how to decide some NP-hard problem fast enough) to proving things about your program than you're to encounter a true undecidability barrier (Rice theorem).

krackers 9 hours ago [-]
That's a good point, although couldn't you usually black-box those and assume the invariants we expect of those primitives are in fact true? E.g. you don't need to bother trying to prove properties about your prng itself, you can just prove how your program behaves under a random oracle model.
js8 8 hours ago [-]
If you're able to detect where you use these hard-to-analyse functions, then yes. This is feasible on source level, and maybe known compiler binary level. I think ultimately people will want to validate properties of binary code against the model specification of their hardware.

Although the prover might be smart enough to say, "this function is getting kinda complicated, let me model it as a random variable and see if it's enough". I think LLMs can kinda do it but not sure if your typical theorem provers can (it's on the level of being able to employ probabilistic proof techniques).

12 hours ago [-]
lutusp 12 hours ago [-]
> The halting problem applies when you are trying to check the properties of arbitrary programs. However, we are not writing arbitrary programs, we are writing very specific (hopefully useful) programs. The two are very different.

No, they aren't -- they are all Turing-complete, look it up. The THP applies to all non-trivial programs, meaning programs that support Peano arithmetic or anything more involved. That limitation certainly applies to all the programs you're describing.

> Pop-sci explanations of the halting problem have probably done incredible damage to formal verification as a whole.

That's pretty funny. It's not every day I hear Alan Turing and Kurt Gödel described as purveyors of "pop-sci".

> Mostly because it makes people with only the most cursory understanding of it go "why bother, it won't work anyway."

I won't try to list all the logical fallacies in your argument. You could do that if you were so inclined.

Dragon-Hatcher 11 hours ago [-]
The language is Turing-complete, not the program. Rice's theorem says that we can't have a program that verifies a non-trivial property for all other programs. It doesn't say we can't verify that property for some programs. That would imply you could never know anything about a program.
9 hours ago [-]
Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact
Rendered at 16:11:56 GMT+0000 (UTC) with Wasmer Edge.