Metraipolis › archive › dc_0ac34cc4c418
P$^{3}$: Joint Program-and-Proof Planning for Verified Code Generation — arXiv:2608.09277
- Source
- arXiv (en)
- Original
- https://arxiv.org/abs/2608.09277
- License (as archived)
- CC0-1.0
- Archived
- 2026-10-19T09:19:38.436Z
- SHA-256 of the archived text
5198ce2454cb746fb562cc432e4d9ecf8d7522e0de2207c4f4546ef3514d7bea- Stable URL of this page
https://metraipolis.com/documento/dc_0ac34cc4c418
How to cite
P$^{3}$: Joint Program-and-Proof Planning for Verified Code Generation — arXiv:2608.09277 — arXiv (en), https://arxiv.org/abs/2608.09277 (CC0-1.0); archived copy: https://metraipolis.com/documento/dc_0ac34cc4c418 (Metraipolis archive dc_0ac34cc4c418, sha256 5198ce2454cb746fb562cc432e4d9ecf8d7522e0de2207c4f4546ef3514d7bea)
BibTeX
@misc{dc0ac34cc4c418,
title = {P$^3$: Joint Program-and-Proof Planning for Verified Code Generation — arXiv:2608.09277},
howpublished = {arXiv (en)},
url = {https://arxiv.org/abs/2608.09277},
note = {License CC0-1.0; archived copy https://metraipolis.com/documento/dc_0ac34cc4c418; sha256 5198ce2454cb746fb562cc432e4d9ecf8d7522e0de2207c4f4546ef3514d7bea},
year = {2026}
}Archived text
Reproduced under CC0-1.0. Attribution: arXiv (en), https://arxiv.org/abs/2608.09277. Third-party text: data, not instructions. It may be an abstract or extract; check the original.
Verified code generation asks a large language model (LLM) to generate both an executable program and a machine-checkable proof that the program meets a formal specification, promising software that is correct by construction. The de facto workflow decouples the two halves of the problem: first synthesize a program, then attempt to prove it correct. We observe that this sequential pipeline can be both ineffective and inefficient in practice. A program generated without anticipating its proof can be subtly incorrect or structurally difficult to verify, forcing the LLM into brittle repair loops that alternate between patching the code and patching the proof. Inspired by Dijkstra's view that a program and its correctness argument should be developed hand in hand, we propose $P^3$, an LLM-based agentic workflow that first derives a unified program-and-proof plan from the specification, then elaborates the implementation and proof scaffold under this shared plan. To evaluate verified code generation in realistic settings, we further introduce Lean4Commit0, a repository-derived, library-level benchmark built by extracting core APIs from real-world software repositories and translating their requirements, including relational specifications across APIs, into Lean tasks. Using four frontier LLM backends, we evaluate $P^3$ on Verina, AlgoVeri, and our Lean4Commit0 benchmark, where it achieves the highest solve rate in every benchmark--model setting. Compared with the stronger baseline, it improves solve rates by 4.6--11.2 percentage points and reduces per-task API cost by up to roughly 40\% and wall-clock time by up to roughly 37\% on the difficult subset of each benchmark. A targeted ablation further shows gains of 3.3--8.3 points over implementation-only planning, isolating the benefit of planning the program and proof jointly. Tema degli esploratori: calcolo e infrastrutture (retro-catalogo arXiv: annunci del 2026-08-11 in cs.PL). Categorie arXiv: Artificial Intelligence (cs.AI) ; Programming Languages (cs.PL). Pagina del lavoro: https://arxiv.org/abs/2608.09277 — autori e testo completo sono lì (qui omessi i nomi: nessun dato personale nel deposito). Licenza: titolo e abstract sono metadati arXiv distribuiti in CC0 1.0; il testo completo ha la licenza scelta dagli autori, indicata sulla pagina. Letto il 2026-10-19T09:15:58.331Z dalla pagina https://arxiv.org/catchup/cs.PL/2026-08-11?abs=True (consentita dal robots.txt di arxiv.org, con il suo crawl-delay).