CompCert4Lean: one expert directing parallel Codex agents ports the CompCert verified C compiler from Rocq to Lean in about six weeks, closing all 4,908 proof obligations
Cong Wang, Zhiyang Chen, Fan Long and Martin Rinard report porting the verified compiler core of CompCert 3.17 from Rocq to Lean. One author directed the main migration with parallel LLM agents running in Codex (GPT-5.6 Sol, then GPT-6-astra from 17 September 2026, at extra-high reasoning). The workflow partitioned the development along its dependencies (166 units), ran small executable experiments to settle representation choices, translated definitions and theorem statements first, audited them in eleven broad review rounds before large-scale proof work, then reconstructed proofs in parallel against stable interfaces, tracked in a declaration map and later a simple status ledger. The 154 Rocq modules in scope (149,038 lines) became 173 Lean modules with 391,963 physical lines; with a native register allocator and toolchain integration the result is 189 Lean files and 396,160 lines, and it produces executable Linux x86-64 binaries. All 4,908 recorded proof obligations are discharged without project-specific axioms. Recorded usage was 83.53 billion tokens across 12,435 sessions, about 79% by external workers. Of 1,071 human messages, 88.8% concerned workflow and coordination and three supplied technical direction. In follow-up optimization campaigns of 24 active hours, GPT-6-astra cut generated-program runtime by 11.7% on the Lean port versus 2.3% on Rocq CompCert, while keeping the end-to-end correctness theorem. Source is public on GitHub.
The numbers (as reported)
| Duration | Approximately six weeks (phase activity 11 Aug - 24 Sep 2026 UTC) |
|---|---|
| Human developers | One expert directing parallel agents |
| Source → port size | 154 Rocq modules, 149,038 lines → 173 Lean modules, 391,963 physical lines (189 files, 396,160 lines with allocator and toolchain) |
| Proof obligations discharged | 4,908 of 4,908, without project-specific axioms |
| Recorded LLM usage | 83.53 billion tokens across 12,435 sessions (93.75% of input cached; partial coverage) |
| Human interaction | 1,071 messages; 88.8% workflow and coordination; 3 supplied technical direction; 29,565 prompt tokens |
| Optimization campaign (24 active hours, GPT-6-astra) | 11.7% lower runtime on Lean vs 2.3% on Rocq (29 small-tests programs); 6.9% vs 2.2% (ten SPEC inputs) |
Facts
- Company / subject
- Tsinghua University, University of Toronto, MIT (CompCert4Lean)
- Tools
- OpenAI Codex
- Models
- GPT-5.6 Sol, GPT-6-astra
- Codebase
- brownfield
- Work type
- Language port
- Stack
- Rocq, Lean, CompCert 3.17, C, x86-64
- Published
- 2026-11-16
- Last checked
- 2026-11-27
What the source claims Practitioner (own blog/paper)
Claimed by the builder, writing about their own work. Not checked independently.
- Ported CompCert's verified compiler core from Rocq to Lean in about six weeks with one expert ~6 weeks, 1 expert
“completed in approximately six weeks by one expert directing parallel LLM agents”
- Discharged all 4,908 recorded proof obligations without project-specific axioms 4,908 / 4,908
- Only three of 1,071 human interactions supplied technical direction 3 of 1,071
“Of 1,071 human interactions, 88.8% concerned workflow and coordination, while only three supplied technical direction.”
- An agent optimized the Lean port more effectively than the Rocq original under the same 24-hour budget 11.7% vs 2.3% lower runtime
Caveats
Research paper by the people who did the work; not peer-reviewed as far as the arXiv listing shows. The authors say token accounting is incomplete and only partly covers provider billing, so no cost is given. Review and repair took about 59% of recorded tokens and the authors say stopping review earlier might have been possible. The Lean port compiles more slowly than Rocq CompCert (compilation-time ratio about 2.05 for the Astra candidate). Optimization gains are on the benchmark programs and are not claimed for unseen workloads. Comparisons to past human effort (several dozen person-years) are the authors' estimates.
More stories by tool: OpenAI Codex
Related topics: Language portsBrownfield codebases