证明中有什么?分析 F* 和 Verus 中专家证明编写过程
What's in a Proof? Analyzing Expert Proof-Writing Processes in F* and Verus
AI总结:
本研究通过用户研究分析八位专家在 F* 和 Verus 中的证明编写过程,识别出三种策略和多种非正式实践,并将其转化为 AI 证明助手的设计指导,案例研究显示改进的 F* 证明代理性能优于基线 LLM。
摘要:
面向证明的编程语言(POPLs)使开发者能够将代码与形式化正确性证明一同编写,从而提供代码符合指定要求的正式保证。尽管功能强大,POPLs 却具有陡峭的学习曲线,尚未被更广泛的软件社区所采纳。对证明开发过程以及专家证明开发者如何与 POPLs 交互的缺乏理解,阻碍了有效证明工程和证明合成模型/工具的进步。在本工作中,我们进行了一项用户研究,涉及从八位使用 F* 和 Verus 两种语言的专家那里收集和分析细粒度的源代码遥测数据。结果揭示了关于专家如何推理证明以及证明开发过程中遇到的关键挑战的有趣趋势和模式。我们识别出三种不同的策略和多种非正式实践,这些实践并未被最终代码快照捕获,却对任务结果具有预测性。我们将这些发现转化为对 AI 证明助手的具体设计指导:倾向于早期规范起草、显式子目标分解、有界主动错误以及有纪律的验证器交互。我们还展示了一个基于这些建议的 F* 证明代理的案例研究,并证明了其性能优于基线 LLM。
英文摘要:
Proof-oriented programming languages (POPLs) empower developers to write code alongside formal correctness proofs, providing formal guarantees that the code adheres to specified requirements. Despite their powerful capabilities, POPLs present a steep learning curve and have not yet been adopted by the broader software community. The lack of understanding about the proof-development process and how expert proof developers interact with POPLs has hindered the advancement of effective proof engineering and the development of proof-synthesis models/tools. In this work, we conduct a user study, involving the collection and analysis of fine-grained source code telemetry from eight experts working with two languages, F* and Verus. Results reveal interesting trends and patterns about how experts reason about proofs and key challenges encountered during the proof development process. We identify three distinct strategies and multiple informal practices that are not captured final code snapshots, yet are predictive of task outcomes. We translate these findings into concrete design guidance for AI proof assistants: bias toward early specification drafting, explicit sub-goal decomposition, bounded active errors, and disciplined verifier interaction. We also present a case study of an F* proof agent grounded in these recommendations, and demonstrate improved performance over baseline LLMs
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。