跳到正文
EasyXiv 检索
投稿 关于 登录

按回车检索 · 直接输入编号(如 1706.03762)可跳转到论文

计算机科学 > 软件工程

arXiv:2501.06283 (cs)
[提交于 2025年1月10日]

标题:Dafny as Verification-Aware Intermediate Language for Code Generation

作者:Yue Chen Li, Stefan Zetzsche, Siva Somayyajula
查看论文《Dafny as Verification-Aware Intermediate Language for Code Generation》的 PDF
查看原文 PDF 中文 PDF (下批处理) EasyResearch 阅读
摘要:Using large language models (LLMs) to generate source code from natural language prompts is a popular and promising idea with a wide range of applications. One of its limitations is that the generated code can be faulty at times, often in a subtle way, despite being presented to the user as correct. In this paper, we explore ways in which formal methods can assist with increasing the quality of code generated by an LLM. Instead of emitting code in a target language directly, we propose that the user guides the LLM to first generate an opaque intermediate representation, in the verification-aware language Dafny, that can be automatically validated for correctness against agreed on specifications. The correct Dafny program is then compiled to the target language and returned to the user. All user-system interactions throughout the procedure occur via natural language; Dafny code is never exposed. We describe our current prototype and report on its performance on the HumanEval Python code generation benchmarks.
主题: 软件工程 (cs.SE); 人工智能 (cs.AI); 计算与语言 (cs.CL); 计算机科学中的逻辑 (cs.LO); 程序设计语言 (cs.PL)
引用方式: arXiv:2501.06283 [cs.SE]
  (或者 arXiv:2501.06283v1 [cs.SE] 对于此版本)
  https://doi.org/10.48550/arXiv.2501.06283

提交历史

来自:Stefan Zetzsche
[v1] 2025年1月10日 星期五 17:23:14 UTC
全文链接:

访问论文:

  • 查看原文 PDF
  • 中文 PDF (下批处理)
  • EasyResearch 阅读
  • TeX 源文件
  • arXiv 原文页面
查看许可

当前浏览上下文:

cs.SE
< 上一篇   |   下一篇 >
最新 | 近期 | 2025-01
切换浏览方式为:
cs
cs.AI
cs.CL
cs.LO
cs.PL

参考文献与引用

  • Google Scholar
  • Semantic Scholar

BibTeX 格式的引用

EasyXiv 是独立运营的中文预印本站点,与 arXiv 及康奈尔大学无隶属关系。 论文元数据与原文来自 arXiv.org,感谢 arXiv 提供开放获取服务。
关于 · 帮助 · 投稿指南 · 版权 · arXiv 原站