English
Related papers

Related papers: Automatic Generation of Formal Specification and V…

200 papers

Program refinement involves correctness-preserving transformations from formal high-level specification statements into executable programs. Traditional verification tool support for program refinement is highly interactive and lacks…

Software Engineering · Computer Science 2024-06-28 Yufan Cai , Zhe Hou , Xiaokun Luan , David Miguel Sanan Baena , Yun Lin , Jun Sun , Jin Song Dong

Automatically generating formal specifications including loop invariants, preconditions, and postconditions for legacy code is critical for program understanding, reuse and verification. However, the inherent complexity of control and data…

Software Engineering · Computer Science 2026-01-21 Fanpeng Yang , Xu Ma , Shuling Wang , Xiong Xu , Qinxiang Cao , Naijun Zhan , Xiaofeng Li , Bin Gu

In the past few years LLMs have emerged as a tool that can aid programmers by taking natural language descriptions and generating code based on it. However, the reliability of LLM code generation and current validation techniques for it are…

Programming Languages · Computer Science 2025-11-24 Aaron Councilman , David Jiahao Fu , Aryan Gupta , Chengxiao Wang , David Grove , Yu-Xiong Wang , Vikram Adve

Fully automated verification of large-scale software and hardware systems is arguably the holy grail of formal methods. Large language models (LLMs) have recently demonstrated their potential for enhancing the degree of automation in formal…

Software Engineering · Computer Science 2026-03-11 Zhongyi Wang , Tengjie Lin , Mingshuai Chen , Haokun Li , Mingqi Yang , Xiao Yi , Shengchao Qin , Yixing Luo , Xiaofeng Li , Bin Gu , Liqiang Lu , Jianwei Yin

Autoformalization, the process of translating informal statements into formal logic, has gained renewed interest with the emergence of powerful Large Language Models (LLMs). While LLMs show promise in generating structured outputs from…

Computation and Language · Computer Science 2025-11-18 Mihir Gupte , Ramesh S

We introduce DafnyBench, the largest benchmark of its kind for training and evaluating machine learning systems for formal software verification. We test the ability of LLMs such as GPT-4 and Claude 3 to auto-generate enough hints for the…

Although formal methods are capable of producing reliable software, they have seen minimal adoption in everyday programming. Automatic code generation using large language models is becoming increasingly widespread, but it rarely considers…

Software Engineering · Computer Science 2025-03-19 Aleksandr Shefer , Igor Engel , Stanislav Alekseev , Daniil Berezun , Ekaterina Verbitskaia , Anton Podkopaev

Recent frontier large language models (LLMs) have shown strong performance in identifying security vulnerabilities in large, mature open-source systems. As LLM-generated code becomes increasingly common, a natural goal is to prevent such…

Software Engineering · Computer Science 2026-05-13 Zhaorui Li , Chengyu Song

Formal specifications play a pivotal role in accurately characterizing program behaviors and ensuring software correctness. In recent years, leveraging large language models (LLMs) for the automatic generation of program specifications has…

Software Engineering · Computer Science 2026-02-03 Zehan Chen , Long Zhang , Zhiwei Zhang , JingJing Zhang , Ruoyu Zhou , Yulong Shen , JianFeng Ma , Lin Yang

Contract assertions, such as preconditions, postconditions, and invariants, play a crucial role in software development, enabling applications such as program verification, test generation, and debugging. Despite their benefits, the…

Software Engineering · Computer Science 2026-04-14 Agustín Balestra , Agustín Nolasco , Facundo Molina , Diego Garbervetsky , Renzo Degiovanni , Nazareno Aguirre

Dafny is a verification-aware programming language that comes with a compiler and static program verifier. However, neither the compiler nor the verifier is proved correct; in fact, soundness bugs have been found in both tools. This paper…

Programming Languages · Computer Science 2025-12-08 Daniel Nezamabadi , Magnus O. Myreen , Yong Kiam Tan

Large language models show great promise in many domains, including programming. A promise is easy to make but hard to keep, and language models often fail to keep their promises, generating erroneous code. A promising avenue to keep models…

Software Engineering · Computer Science 2024-06-12 Md Rakib Hossain Misu , Cristina V. Lopes , Iris Ma , James Noble

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…

Software Engineering · Computer Science 2024-04-03 Cheng Wen , Jialun Cao , Jie Su , Zhiwu Xu , Shengchao Qin , Mengda He , Haokun Li , Shing-Chi Cheung , Cong Tian

Formal postconditions precisely characterize program behavior and support debugging, testing, and verification, but writing them requires substantial expertise and effort. This has motivated recent work on automatically generating…

Software Engineering · Computer Science 2026-05-06 Gehao Zhang , Juan Zhai

We present DafnyPro, an inference-time framework that enhances LLMs for generating verification annotations in Dafny. DafnyPro comprises three key components: a diff-checker that prevents modifications to base program logic, a pruner that…

Software Engineering · Computer Science 2026-01-12 Debangshu Banerjee , Olivier Bouissou , Stefan Zetzsche

Program verification is a formal technique to rigorously ensure the correctness and fault-freeness of software systems. However, constructing comprehensive interprocedural specifications for full verification obligations is time-consuming…

Software Engineering · Computer Science 2026-04-24 Lezhi Ma , Shangqing Liu , Yi Li , Qiong Wu , Han Wang , Lei Bu

Formal program specifications play a crucial role in various stages of software development. However, manually crafting formal program specifications is rather difficult, making the job time-consuming and labor-intensive. It is even more…

Software Engineering · Computer Science 2025-02-26 Lezhi Ma , Shangqing Liu , Yi Li , Xiaofei Xie , Lei Bu

Students in computing education increasingly use large language models (LLMs) such as ChatGPT. Yet, the role of LLMs in supporting cognitively demanding tasks, like deductive program verification, remains poorly understood. This paper…

Software Engineering · Computer Science 2025-09-09 Carolina Carreira , Álvaro Silva , Alexandre Abreu , Alexandra Mendes

The paper studies how code generation by LLMs can be combined with formal verification to produce critical embedded software. The first contribution is a general framework, spec2code, in which LLMs are combined with different types of…

Software Engineering · Computer Science 2024-11-21 Minal Suresh Patil , Gustav Ung , Mattias Nyberg

LLMs excel at reasoning, but validating their steps remains challenging. Formal verification offers a solution through mechanically checkable proofs. Interactive theorem provers (ITPs) dominate mathematical reasoning but require detailed…

Machine Learning · Computer Science 2026-02-03 Mantas Baksys , Stefan Zetzsche , Olivier Bouissou , Sean B. Holden