News for hackers. Stuff that matters.
Re:AlphaProof Code by andai on Tuesday November 10, 2026 @10:13AM (#50441544)
Earlier this year I was doing some major refactors of an old project. At the time coding agents were really taking off where you could increasingly trust them for more autonomous work, so I was excited to give it a go.

It did the refactor, running for several hours, and ended up volunteering an extensive test suite as well. All tests green!

I was very impressed, until I squinted a little. It had implemented the whole thing backwards, in a way which was not only pointless (didn't achieve any of the stated goals) but actually made things worse than before!

Until that moment I'd been quite bullish about formal verification, then I realized, it might as well have written me a mathematical proof for the code it wrote, and the proof would have passed, and the code would still be wrong!

Re:AlphaProof Code by auggierose on Tuesday November 10, 2026 @10:22AM (#50441664)
Because, people keep confusing proofs with theorems. The proof can be correct, while the theorem is the wrong one. And if you got the wrong theorem, you might not be interesting in its proof (sometimes you are, anyway).
Re:AlphaProof Code by hedora on Tuesday November 10, 2026 @10:30AM (#50441776)
This.

Now, write a theorem describing a non-trivial piece of software. Is your theorem longer or shorter than the source code? Easier or harder to read?

Re:AlphaProof Code by miloignis on Tuesday November 10, 2026 @10:36AM (#50441865)
The nice thing is that a theorem doesn't have to completely describe the software, it can just describe some property you care about.

Say, no crashes, no dead or livelocks, O(n log n) in the size of the input, same number of instructions executed & memory accessed no matter what the encryption key is, etc etc.

These type of theorems are significantly smaller than the source code, pretty re-usable across different applications, and extremely useful properties.

Re:AlphaProof Code by kylestanfield on Tuesday November 10, 2026 @05:44PM (#50447360)
That’s true, but the theorem prover still needs a model of your code to check the theorem against. So how do we know it’s checking the theorems against an accurate model.
Re:AlphaProof Code by konart on Tuesday November 10, 2026 @11:19AM (#50442492)
Well, property tests exist and in some cases they are better soslution than other types of test.

Obviously you don't write "a theorem" describing a big piece, but just a fuinction, for example.

Say you have a function that takes in 3 Points (x,y coords) and returns a Triangle (T) object. Than you can have a property test that will confirm that T is actually a triangle and not something else.

Re:AlphaProof Code by mkoryak on Tuesday November 10, 2026 @10:55AM (#50442160)
This is why I think tests are useless if written by AI. They will always pass and look reasonable.
Re:AlphaProof Code by nicce on Tuesday November 10, 2026 @01:50PM (#50444506)
ALL TESTS ARE GREEN, ALL GOOD.

And then you need to remind that it does not matter, if they are empty.

Re:AlphaProof Code by andai on Wednesday November 11, 2026 @06:21AM (#50452109)
Oh it gets even stupider. When Claude web introduced the "computer" stuff last year, I had it port an interpreter to a different language. It did it in one shot, I was very impressed.

It even volunteered tests.

Then I read the tests. It was just a bunch of console log statements saying "Test passed!" and didn't actually test anything...