ZICQ
中 Log in / Sign up
Newsroom Research & Papers #LLMs & Foundation Models #Formal Verification #PETSc #CIVL #Automated Verification

arXiv Introduces LLM-based PETSc Function Verification Method: Uncovering a 1997 Bug

Avatar of Mr.Xu

By Mr.Xu Compiled & Reviewed by Editorial

Published: · 9 views

中文阅读 (Chinese) English Version
Co-reading Select any sentence in the article to highlight, annotate, or copy a quote card. Join discussion ↓

Summary:arXiv has released a research paper on using Large Language Models (LLMs) to generate formal verification contracts. The approach leverages LLMs to create small, human-certifiable ACSL contracts, combined with a deterministic toolchain and the CIVL verifier, to verify functions in the PETSc library. The study demonstrates the pipeline on three PETSc functions: MatAXPY, MatAYPX, and the non-compressing mode of MatFilter, and successfully uncovers a previously undiscovered bug in MatAYPX that has


Background and Challenges

Numerical libraries like PETSc are critical in scientific and engineering applications, but they are rarely formally verified. The traditional verification process requires experts to manually write specifications and apply verification tools, which is time-consuming and prone to introducing additional errors, leading to false positives or false negatives in verification results.

Methodology and Innovation

This study proposes an automated verification approach using Large Language Models (LLMs) with the following steps:

  1. ACSL Contract Generation: LLMs generate small, human-certifiable ACSL contracts from function documentation.
  2. Deterministic Toolchain: A deterministic toolchain that supports a restricted ACSL profile generates a driver.
  3. CIVL Verifier: The CIVL verifier compares the implementation against the contract and leverages existing reference models for validation.

Experiments and Results

The study demonstrates the pipeline on three PETSc functions:

  • MatAXPY: With an existing reference model, the verification process was successful.
  • MatAYPX: Without a reference model, the verification relied solely on the generated contract and uncovered a previously undiscovered bug present since 1997.
  • MatFilter (non-compressing mode): Without a reference model and with complex, conditional behavior, the verification was also successful.

Technical Highlights

  • LLM Application Innovation: This is the first time LLMs have been applied to the formal verification of numerical libraries, showcasing their potential in automating the generation of verification contracts.
  • Combination of Automation and Accuracy: The use of LLMs to generate human-certifiable contracts avoids the unreliability of traditional automated generation methods.
  • Bug Discovery: The successful discovery of a long-standing bug in PETSc demonstrates the effectiveness of the approach.

Industry Impact and Future Directions

This research offers a new path for the automated verification of numerical libraries, promising to significantly improve the efficiency and accuracy of software verification. The application of LLMs in formal verification has broad potential, and future work could extend this approach to the verification of other types of software systems. Developers can leverage this method to enhance the quality and reliability of their projects by integrating LLM-based verification into their workflows.


Source: ArXiv NLP/LLM (cs.CL) (2026-09-29)

— END —

Tags: #LLMs & Foundation Models #Formal Verification #PETSc #CIVL #Automated Verification

Editorial & Fact-Checking Note: This article is compiled from primary research, official release documentation, and source papers by the ZICQ Newsroom pipeline with automated entity verification and human editorial review. If you notice any technical inaccuracy, please submit a correction via our corrections policy or email our editorial desk directly.

What's your take on this story?
🚀 Explore & Submit Works

Community Comments

Loading live comments and annotations…