一句话:构建 60 万行 F* 程序与证明数据集,并探索用微调小模型和检索增强进行类型导向的程序与证明合成。
证明导向程序混合计算内容与正确性证明;尽管 F* 等语言可用 SMT 求解器自动证明,人工编程与证明成本仍很高。为促进 AI 自动构建此类程序,作者整理了约 60 万行开源 F* 程序与证明数据集,含约 3.2 万个顶层定义,每个定义对应一个由类型规约出发的程序与证明合成问题,并提供可复现的片段检查器。基于该数据集,他们研究用 AI 合成 F* 程序及证明,发现微调小模型(如 Phi-2、StarCoder)性能可与 GPT-4 等大模型相媲美且计算成本更低;基于类型的检索增强能显著提升效果。错误分析与案例研究进一步总结了模型与技术的优劣及未来方向。
Proof-oriented programs mix computational content with proofs of program correctness. However, the human effort involved in programming and proving is still substantial, despite the use of Satisfiability Modulo Theories (SMT) solvers to automate proofs in languages such as F*. Seeking to spur research on using AI to automate the construction of proof-oriented programs, we curate a dataset of 600K lines of open-source F* programs and proofs, including software used in production systems ranging from Windows and Linux, to Python and Firefox. Our dataset includes around 32K top-level F* definitions, each representing a type-directed program and proof synthesis problem-producing a definition given a formal specification expressed as an F* type. We provide a program-fragment checker that queries F* to check the correctness of candidate solutions. We believe this is the largest corpus of SMT-assisted program proofs coupled with a reproducible program-fragment checker. Grounded in this dataset, we investigate the use of AI to synthesize programs and their proofs in F*, with promising results. Our main finding in that the performance of fine-tuned smaller language models (such as Phi-2 or StarCoder) compare favorably with large language models (such as GPT-4), at a much lower computational cost. We also identify various type-based retrieval augmentation techniques and find that they boost performance significantly. With detailed error analysis and case studies, we identify potential strengths and weaknesses of models and techniques and suggest directions for future improvements.
DOI 原文 ·
@inproceedings{paperbot8734,
title = {Towards Neural Synthesis for SMT-Assisted Proof-Oriented Programming},
author = {Saikat Chakraborty and Gabriel Ebner and Siddharth Bhat and Sarah Fakhoury and Sakina Fatima and Shuvendu Lahiri and Nikhil Swamy},
booktitle = {ICSE},
year = {2025},
doi = {10.1109/icse55347.2025.00002}
}