Formal methods and the future of programming
Jane Street had long skipped full-on formal methods despite using advanced type systems, but the rise of agent-driven coding cut proof costs and widened access. They’re now forming a team to integrate formal verification into their OCaml toolchain, tweaking the language and tapping their experienced user base while collaborating with external proof ecosystems.
- seL4's formal verification cost 25 person-years for 8,700 lines of C (23 lines of proof per code line, half a person-day per line), illustrating why Jane Street long saw full formal methods as impractical.
- Agentic AI coding flips that math: it lowers the cost of generating proofs and widens access to formal methods, but also produces messy code that creates a new "verification bottleneck."
- Jane Street is building an internal formal-methods team to extend OCaml itself (modular specs, ownership/mutability typing, embedded tactics) rather than switch to tools like Lean, Dafny, or Coq, while still integrating those ecosystems where useful.
- The plan is to use formal verification both to catch bugs in AI-generated code and to feed precise feedback back into training/improving the coding agents.
For a quarter-century, Jane Street steered clear of heavyweight formal methods, convinced that the costs outweighed the benefits except in niche areas like hardware synthesis. The team points to seL4, the formally verified microkernel: verifying 8,700 lines of C took 25 person-years, producing 23 lines of proof per code line and half a person-day to check each. Despite their faith in strong type systems, they saw full formal verification as too slow and rigid for most of their trading infrastructure.
Now, agentic coding—using AI models that write and refine code—has shifted that balance. Models cut into the expense of proof generation and lower the barrier for nonexperts. But ML-generated code still arrives messy: tangled logic, hidden bugs, violated invariants. That creates a “verification bottleneck.” Jane Street believes formal methods can automate much of the review work and feed precise, universal feedback back into the agents, speeding both correctness checks and agent training.
Jane Street plans to build an internal formal-methods team. They already control OCaml, their primary language, and can extend it with proof-friendly features: modular property specs, ownership and mutability constraints at the type level, even embedded proof tactics. Their developer community is unusually receptive. Engineers here grumble when advanced type features lag behind requests, and they’ve built a culture that prizes code quality and rigorous reasoning.
They don’t intend to reinvent tools like Lean, Dafny or Coq. Instead, they’ll integrate those ecosystems where it makes sense while pushing OCaml forward in tandem. The goal is a spectrum of improvements: quick wins in testing and property checks, and longer-term explorations of deep proof automation within the language. Jane Street is hiring in London and New York to tackle this, hoping to blend academic proof techniques with the realities of high-stakes trading software.