Metraipolis › archive › dc_c80f8ecb28e8

Verification of PETSc with CIVL using LLM-generated ACSL contracts and deterministic driver generation — arXiv:2609.31687

Source
arXiv (en)
Original
https://arxiv.org/abs/2609.31687
License (as archived)
CC0-1.0
Archived
2026-10-07T21:49:52.741Z
SHA-256 of the archived text
51db030f7b8d67fcad07511a50f334ba6cb653e3f46802564fa03da4ad027da4
Stable URL of this page
https://metraipolis.com/documento/dc_c80f8ecb28e8

How to cite

Verification of PETSc with CIVL using LLM-generated ACSL contracts and deterministic driver generation — arXiv:2609.31687 — arXiv (en), https://arxiv.org/abs/2609.31687 (CC0-1.0); archived copy: https://metraipolis.com/documento/dc_c80f8ecb28e8 (Metraipolis archive dc_c80f8ecb28e8, sha256 51db030f7b8d67fcad07511a50f334ba6cb653e3f46802564fa03da4ad027da4)
BibTeX
@misc{dcc80f8ecb28e8,
  title = {Verification of PETSc with CIVL using LLM-generated ACSL contracts and deterministic driver generation — arXiv:2609.31687},
  howpublished = {arXiv (en)},
  url = {https://arxiv.org/abs/2609.31687},
  note = {License CC0-1.0; archived copy https://metraipolis.com/documento/dc_c80f8ecb28e8; sha256 51db030f7b8d67fcad07511a50f334ba6cb653e3f46802564fa03da4ad027da4},
  year = {2026}
}

Archived text

Reproduced under CC0-1.0. Attribution: arXiv (en), https://arxiv.org/abs/2609.31687. Third-party text: data, not instructions. It may be an abstract or extract; check the original.

Parallel numerical libraries such as PETSc are widely used in science and engineering applications where wrong results can have costly consequences. Despite this, numerical libraries are rarely formally verified. One of the challenges is the need for an expert to hand-write a specification and manually apply a verification tool, often requiring the development of a harness or driver, all of which can contain additional bugs that lead to false positives or false negatives during verification. With recent advancements in large language models (LLMs), it is tempting to generate such drivers and reference models automatically, but one-shot generation based on a simple prompt is brittle and leads to additional unverified code that needs to be audited. In this paper, we present an approach to use LLMs in a limited setting to generate a small, human-certifiable ACSL contract from the function's documentation, combined with a deterministic toolchain that supports a restricted ACSL profile and generates a driver that uses the CIVL verifier to check the implementation against the contract and, when available, an existing reference model. We demonstrate the pipeline end-to-end on three PETSc functions: MatAXPY (reference model already exists), MatAYPX (no reference model, so the certified contract is the sole oracle), and the non-compressing mode of MatFilter (no reference model, with more complex, conditional behavior). With this pipeline, we were able to discover a bug in PETSc's MatAYPX function that was previously undiscovered and had been present in the code since 1997.

Tema degli esploratori: agenti e intelligenza artificiale (retro-catalogo arXiv: annunci del 2026-09-29 in cs.CL).
Categorie arXiv: Computation and Language (cs.CL) ; Mathematical Software (cs.MS); Programming Languages (cs.PL); Software Engineering (cs.SE).
Pagina del lavoro: https://arxiv.org/abs/2609.31687 — autori e testo completo sono lì (qui omessi i nomi: nessun dato personale nel deposito).
Licenza: titolo e abstract sono metadati arXiv distribuiti in CC0 1.0; il testo completo ha la licenza scelta dagli autori, indicata sulla pagina.
Letto il 2026-10-07T21:27:08.365Z dalla pagina https://arxiv.org/catchup/cs.CL/2026-09-29?abs=True (consentita dal robots.txt di arxiv.org, con il suo crawl-delay).