arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2406.15540cs.SEcs.FLcs.LG
收藏

Specify What? 基于符号方法增强神经规约合成

Specify What? Enhancing Neural Specification Synthesis by Symbolic Methods

Chalmers University of Technology(查尔姆斯理工大学)

George Granberry, Wolfgang Ahrendt, Moa Johansson

AI总结:

本研究结合大语言模型与Frama-C生态的Pathcrawler、EVA符号分析工具,增强ACSL格式C程序规约合成质量,且方法更倾向推断程序意图而非实际行为。

摘要:

我们研究了大语言模型(Large Language Models, LLMs)与符号分析相结合的组合方法可用于合成C程序规约的问题。我们通过Frama-C生态中的两款形式化方法工具Pathcrawler和EVA的输出来增强LLM的提示,以生成采用规约语言ACSL的C程序注解。我们展示了在工作流中加入符号分析对注解质量的影响:来自Pathcrawler的输入/输出示例信息可生成更具上下文感知能力的注解,而纳入EVA报告则能生成更适配运行时错误的注解。此外,我们通过为有缺陷的程序生成规约并观察结果对缺陷的鲁棒性,表明该方法更倾向于推断程序的意图而非其行为。

英文摘要:

We investigate how combinations of Large Language Models (LLMs) and symbolic analyses can be used to synthesise specifications of C programs. The LLM prompts are augmented with outputs from two formal methods tools in the Frama-C ecosystem, Pathcrawler and EVA, to produce C program annotations in the specification language ACSL. We demonstrate how the addition of symbolic analysis to the workflow impacts the quality of annotations: information about input/output examples from Pathcrawler produce more context-aware annotations, while the inclusion of EVA reports yields annotations more attuned to runtime errors. In addition, we show that the method infers rather the programs intent than its behaviour, by generating specifications for buggy programs and observing robustness of the result against bugs.

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

↑