arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2410.19736cs.SEcs.LGcs.LO
收藏

将 LLM 代码生成与形式化规范及反应式程序综合相结合

Combining LLM Code Generation with Formal Specifications and Reactive Program Synthesis

William Murphy, Nikolaus Holzer, Feitong Qiao, Leyi Cui, Raven Rothkopf, Nathan Koenig, Mark Santolucito

AI总结:

本文提出将 LLM 代码生成与基于形式化方法的反应式程序综合结合,通过分工处理复杂逻辑,并构建基准验证其可解决以往 LLM 难以完成的代码生成问题。

摘要:

在过去几年中,大型语言模型(LLM)在代码生成任务中的实用性和受欢迎程度呈爆发式增长。然而,LLM 在准确性方面仍存在困难,如果没有额外的监督与验证,并不适合高风险应用。特别是,它们在为高度复杂系统生成代码时表现不佳,尤其是涉及不寻常或样本外逻辑的情况。对于此类系统,验证 LLM 生成的代码可能比手工编写代码耗时更长。我们提出一种解决方案,将代码生成划分为两部分:一部分由 LLM 处理,另一部分由基于形式化方法的程序综合处理。我们开发了一个基准来测试该解决方案,并表明我们的方法使该流水线能够解决以往 LLM 代码生成难以处理的问题。

英文摘要:

In the past few years, Large Language Models (LLMs) have exploded in usefulness and popularity for code generation tasks. However, LLMs still struggle with accuracy and are unsuitable for high-risk applications without additional oversight and verification. In particular, they perform poorly at generating code for highly complex systems, especially with unusual or out-of-sample logic. For such systems, verifying the code generated by the LLM may take longer than writing it by hand. We introduce a solution that divides the code generation into two parts; one to be handled by an LLM and one to be handled by formal methods-based program synthesis. We develop a benchmark to test our solution and show that our method allows the pipeline to solve problems previously intractable for LLM code generation.

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

↑