cs.SEMar 31, 2026

WybeCoder: Verified Imperative Code Generation

Authors: Fabian Gloeckle, Mantas Baksys, Darius Feher, Kunhao Zheng, Amaury Hayat, Sean B. Holden, Gabriel Synnaeve, Peter O'Hearn

Organizations: FAIR, Meta · CERMICS, ENPC, Institut Polytechnique de Paris, CNRS · Computer Lab, University of Cambridge · University College London · Miles, LAMSADE, Université Paris-Dauphine-PSL, Paris · Korea Institute for Advanced Study

Abstract

Recent progress in large language models (LLMs) has substantially advanced automatic code generation and formal theorem proving, yet software verification has not seen comparable gains. To address this gap, we propose WybeCoder, an agentic code verification framework that enables prove-as-you-generate development, in which code, invariants, and proofs co-evolve. WybeCoder builds on a recent framework that combines automatic verification condition generation and SMT solving with interactive proofs in Lean. To enable systematic evaluation, we translate two benchmarks for functional verification in Lean, Verina and Clever, into equivalent imperative code specifications. On complex algorithms such as Heapsort, we observe consistent performance improvements as we scale our approach, synthesizing dozens of valid invariants and dispatching dozens of subgoals, ultimately producing hundreds of lines of verified code and overcoming plateaus reported in previous work. Our best system solves 74% of Verina tasks and 62% of Clever tasks at moderate compute budgets, substantially surpassing previous evaluations and paving the way for the automated construction of large-scale datasets of verified imperative code.

Explore similar work

CardsList
  1. Goedel-Code-Prover: Hierarchical Proof Search for Open State-of-the-Art Code Verification

    Mar 18, 2026Zenan Li, Ziran Yang, Deyuan He +7Formal VerificationAutomated Theorem Proving

  2. P3^{3}: Joint Program-and-Proof Planning for Verified Code Generation

    Aug 10, 2026Zenan Li, Ziran Yang, Peiyang Song +2Code GenerationFormal Verification

  3. Self-Spec Verifiable Code Generation

    Sep 30, 2026Jiaru Qian, Yihong Dong, Yongmin Li +3LLM Self-CorrectionCode Generation