Skip to content
Business Efficiency Talking point

AI may turn leaving old code unverified into a choice, though not a free one

Stanford's Clark Barrett argued AI agents could prove or rewrite old code once the tooling is built.

W
WebPulse Newsroom
AI-assisted · 2 min read
Share on X LinkedIn
AI may turn leaving old code unverified into a choice, though not a free one
In brief
  • Clark Barrett laid out a plan to prove old code correct or translate it into a safer language, and hoped verification gets easy within a couple of years.
  • A speaker put the token cost at $100 to $1,000, but that excludes experts, tooling and the still-hard job of writing specifications.

Clark Barrett, a Stanford professor and co-director of the Stanford Center for AI Safety, argued on Y Combinator's Paper Club that AI agents could prove old code correct. They could also rewrite it in a safer language, once the tooling is built. A speaker on the show put the token cost at roughly $100 to $1,000. That figure covers tokens only. If the full cost falls far enough, leaving legacy code unchecked becomes a decision, not a given.

What was said

Barrett said AI threatens software from two sides. It creates large amounts of buggy code. It also sharply raises what hackers can do against legacy systems.

Another guest, Francois, gave the everyday version. He had worked in retail, where old systems go untouched for years. Breaches often start with a default password nobody changed.

Asked what he would do as security chief at a large bank, Barrett gave a plan. First, hire formal-methods experts, who prove code correct with mathematics, and build the tooling. Then give theorem-proving agents all the bank's code and many GPUs. They would either prove the code as it stands or translate it into a language like Rust or Lean. He said it is a lot of work, but work we know how to do.

A proof differs from a test. A speaker described usual software practice as write something, test it and hope. Lean, the proof tool, checks every step and lets no mistake through. In the plan, programs are rewritten in a common form and turned into statements for Lean to prove.

Some specifications, or statements of what code must do, are universal. Being memory safe means code never touches uninitialized or out-of-bounds memory. That can be written once for everyone's code, and it blocks buffer overflow attacks. A bank could add its own: total funds stay the same across a series of transactions.

A speaker said critics once argued you would need 150 Lean PhDs for something like Google's code. You no longer do, the speaker said: "You need like, I don't know, $100, $1,000 in tokens."

Why it matters

Our reading: this changes the question for anyone who runs or buys old software. Saying that checking it is out of reach was once a fair answer. That answer weakens if the cost keeps falling.

But the token figure is not a budget. Barrett's plan also needs hired experts, new infrastructure, many GPUs and written specifications. Managers can ask what the full cost would be for their oldest systems. They can also ask vendors what they have verified.

The other side

The $1,000 figure was an offhand guess from a speaker who said they did not know. The excerpts show no project that cost that. It may not be Barrett's number.

Barrett conceded that the hard part remains. He said the thing left that is hard is the specification. Agents can help draft specs, but a gap remains between what an agent writes and what a developer intends.

His fellow co-director, Mykel Kochenderfer, said there is no single silver bullet. Formal methods probably will not take you the whole way. Another speaker noted that the typical way into a system is human engineering, which proofs about code do not cover.

Written by the WebPulse Newsroom with AI assistance, and checked by our editorial review: every quotation was verified against the recording's transcript. How we use AI.

The conversation this talking point comes from

Share this insight