Enchanting Program Specification Synthesis by Large Language Models using Static Analysis and Program Verification

程序设计语言 计算机科学 静态分析 规范语言 程序设计语言规范 程序设计范式 归纳程序设计 程序设计域
作者
Chuang Wen,Jialun Cao,Jie Su,Zhiwu Xu,Shengchao Qin,Mengda He,Haokun Li,Shing-Chi Cheung,Cong Tian
出处
期刊:Cornell University - arXiv
标识
DOI:10.48550/arxiv.2404.00762
摘要

Formal verification provides a rigorous and systematic approach to ensure the correctness and reliability of software systems. Yet, constructing specifications for the full proof relies on domain expertise and non-trivial manpower. In view of such needs, an automated approach for specification synthesis is desired. While existing automated approaches are limited in their versatility, i.e., they either focus only on synthesizing loop invariants for numerical programs, or are tailored for specific types of programs or invariants. Programs involving multiple complicated data types (e.g., arrays, pointers) and code structures (e.g., nested loops, function calls) are often beyond their capabilities. To help bridge this gap, we present AutoSpec, an automated approach to synthesize specifications for automated program verification. It overcomes the shortcomings of existing work in specification versatility, synthesizing satisfiable and adequate specifications for full proof. It is driven by static analysis and program verification, and is empowered by large language models (LLMs). AutoSpec addresses the practical challenges in three ways: (1) driving \name by static analysis and program verification, LLMs serve as generators to generate candidate specifications, (2) programs are decomposed to direct the attention of LLMs, and (3) candidate specifications are validated in each round to avoid error accumulation during the interaction with LLMs. In this way, AutoSpec can incrementally and iteratively generate satisfiable and adequate specifications. The evaluation shows its effectiveness and usefulness, as it outperforms existing works by successfully verifying 79% of programs through automatic specification synthesis, a significant improvement of 1.592x. It can also be successfully applied to verify the programs in a real-world X509-parser project.
最长约 10秒,即可获得该文献文件

科研通智能强力驱动
Strongly Powered by AbleSci AI
更新
大幅提高文件上传限制,最高150M (2024-4-1)

科研通是完全免费的文献互助平台,具备全网最快的应助速度,最高的求助完成率。 对每一个文献求助,科研通都将尽心尽力,给求助人一个满意的交代。
实时播报
夏侯伟宸发布了新的文献求助10
刚刚
JevonCheung完成签到 ,获得积分10
1秒前
zyw完成签到 ,获得积分10
2秒前
2秒前
3秒前
3秒前
聪明的怜晴完成签到,获得积分0
4秒前
郭郭完成签到,获得积分10
5秒前
tiger完成签到,获得积分10
5秒前
可可完成签到,获得积分20
6秒前
Rjj完成签到,获得积分10
6秒前
fofo完成签到,获得积分10
6秒前
红桃K完成签到,获得积分10
6秒前
kk完成签到,获得积分10
8秒前
迪迦奥特曼完成签到,获得积分10
8秒前
jin发布了新的文献求助10
8秒前
MY发布了新的文献求助10
9秒前
丘山完成签到,获得积分10
10秒前
10秒前
全一斩完成签到,获得积分10
10秒前
hugebear完成签到,获得积分10
11秒前
王京华完成签到,获得积分10
12秒前
小王完成签到,获得积分10
12秒前
在远方发布了新的文献求助10
12秒前
啵清啵完成签到,获得积分10
14秒前
zzx396完成签到,获得积分10
16秒前
彪壮的幻丝完成签到 ,获得积分10
16秒前
小蜜蜂完成签到,获得积分10
17秒前
17秒前
共享精神应助科研通管家采纳,获得10
17秒前
17秒前
思源应助科研通管家采纳,获得10
17秒前
17秒前
笨笨烨华完成签到 ,获得积分10
17秒前
honger完成签到,获得积分10
17秒前
19秒前
史迪仔完成签到,获得积分10
19秒前
曲夜白完成签到 ,获得积分10
20秒前
drizzling完成签到,获得积分10
21秒前
医生小白完成签到 ,获得积分10
22秒前
高分求助中
Sustainable Land Management: Strategies to Cope with the Marginalisation of Agriculture 1000
Corrosion and Oxygen Control 600
Yaws' Handbook of Antoine coefficients for vapor pressure 500
Python Programming for Linguistics and Digital Humanities: Applications for Text-Focused Fields 500
Heterocyclic Stilbene and Bibenzyl Derivatives in Liverworts: Distribution, Structures, Total Synthesis and Biological Activity 500
重庆市新能源汽车产业大数据招商指南(两链两图两池两库两平台两清单两报告) 400
Division and square root. Digit-recurrence algorithms and implementations 400
热门求助领域 (近24小时)
化学 材料科学 医学 生物 有机化学 工程类 生物化学 纳米技术 物理 内科学 计算机科学 化学工程 复合材料 遗传学 基因 物理化学 催化作用 电极 光电子学 量子力学
热门帖子
关注 科研通微信公众号,转发送积分 2551441
求助须知:如何正确求助?哪些是违规求助? 2177614
关于积分的说明 5609737
捐赠科研通 1898547
什么是DOI,文献DOI怎么找? 947863
版权声明 565519
科研通“疑难数据库(出版商)”最低求助积分说明 504201