arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2401.00963cs.SEcs.LOcs.PL
收藏

利用大语言模型提升 Dafny 开发者的生产力

Leveraging Large Language Models to Boost Dafny's Developers Productivity

Álvaro Silva, Alexandra Mendes, João F. Ferreira

AI总结:

本文提出利用大语言模型开发Dafny插件,通过自动生成缺失引理及计算证明来辅助开发者,降低形式化验证门槛并提升生产力。

摘要:

本研究理念论文提出利用大语言模型(LLMs)来提升 Dafny 开发者的生产力。尽管在过去十年中,诸如 Dafny 等具备验证意识的语言的使用量有了显著增加,但它们仍未被广泛采用。通常,使用此类语言的成本过高,这是由于对开发者的专业水平要求较高,且他们在尝试证明程序正确时常常面临挑战。尽管 Dafny 自动化了大量验证过程,但有时某些步骤过于复杂,Dafny 无法独立完成。其中一种情况是缺失引理,即如果不以能够辅助证明该步骤的定理形式提供进一步帮助,Dafny 便无法证明某个结果。在本文中,我们描述了一款新 Dafny 插件的初步工作,该插件利用 LLMs 来辅助开发者,为其生成 Dafny 无法自行发现并使用的相关引理建议。此外,对于无法自动证明的引理,该插件还尝试提供相应的计算证明。我们还探讨了未来的工作构想,描述了一项研究议程,旨在通过使用 LLMs 来提高开发者的生产力,并降低编写形式化规范和证明程序属性所需的专业水平,从而普遍促进具备验证意识的语言的采用。

英文摘要:

This research idea paper proposes leveraging Large Language Models (LLMs) to enhance the productivity of Dafny developers. Although the use of verification-aware languages, such as Dafny, has increased considerably in the last decade, these are still not widely adopted. Often the cost of using such languages is too high, due to the level of expertise required from the developers and challenges that they often face when trying to prove a program correct. Even though Dafny automates a lot of the verification process, sometimes there are steps that are too complex for Dafny to perform on its own. One such case is that of missing lemmas, i.e. Dafny is unable to prove a result without being given further help in the form of a theorem that can assist it in the proof of the step. In this paper, we describe preliminary work on a new Dafny plugin that leverages LLMs to assist developers by generating suggestions for relevant lemmas that Dafny is unable to discover and use. Moreover, for the lemmas that cannot be proved automatically, the plugin also attempts to provide accompanying calculational proofs. We also discuss ideas for future work by describing a research agenda on using LLMs to increase the adoption of verification-aware languages in general, by increasing developers productivity and by reducing the level of expertise required for crafting formal specifications and proving program properties.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑