Hacker News new | ask | show | jobs
by tsimionescu 24 days ago
Have you ever looked at seL4 sources? I think that it might make you temper your expectations on what formal verification can practically achieve.

Specifically, seL4 formal verification took multiple (5+?) years by computer science PhDs treating it as novel research. And it's less than 50k lines of code total (might have actually been around 20k, if I remember correctly?), excluding the proof, with no dependencies at all outside the CPU.

Now look at Linux, or at Angular, or at any other piece of code you actually care about, and you'll see that even if we assumed simple linear scaling (which is obviously not a safe assumption as complexity increases rapidly with size), and even if LLMs can 10x the productivity, you'd still need decades or a team of dozens or hundreds of PhDs.

And also consider how much of that effort would have had to be redone when Linux added io_uring, for example.

2 comments

I think even more to the point, seL4 architecture is heavily influenced by wanting to be formally verified.

Quick, name all the kernels that do not contain memory allocators and where syscalls never block and run in a guaranteed number of cycles.

That's also a good point - obviously a piece of code design for formal verification from the get go is going to be much easier to verify than one that wasn't. So this makes the scaling factor even more non-linear.
I don't think that's really a good comparison - bugs in Linux because of a larger code base and a mathematically verified OS or two separate (but possibly overlapping) things no ?
GP's argument was, as far as I understand it, "we already have one formally verified OS being used in practice, seL4, so formally verifying Linux or other real projects shouldn't be that far behind". As such, pointing out that the scale of Linux or other common pieces of infrastructure is so much more complex than seL4 is I think very to the point.