Movatterモバイル変換


[0]ホーム

URL:


Skip to main content
Cornell University
We gratefully acknowledge support from the Simons Foundation,member institutions, and all contributors.Donate
arxiv logo>cs> arXiv:2310.09342
arXiv logo
Cornell University Logo

Computer Science > Programming Languages

arXiv:2310.09342 (cs)
[Submitted on 13 Oct 2023 (v1), last revised 12 Feb 2024 (this version, v3)]

Title:Ranking LLM-Generated Loop Invariants for Program Verification

View PDFHTML (experimental)
Abstract:Synthesizing inductive loop invariants is fundamental to automating program verification. In this work, we observe that Large Language Models (such as gpt-3.5 or gpt-4) are capable of synthesizing loop invariants for a class of programs in a 0-shot setting, yet require several samples to generate the correct invariants. This can lead to a large number of calls to a program verifier to establish an invariant. To address this issue, we propose a {\it re-ranking} approach for the generated results of LLMs. We have designed a ranker that can distinguish between correct inductive invariants and incorrect attempts based on the problem definition. The ranker is optimized as a contrastive ranker. Experimental results demonstrate that this re-ranking mechanism significantly improves the ranking of correct invariants among the generated candidates, leading to a notable reduction in the number of calls to a verifier. The source code and the experimental data for this paper are available in \url{this https URL}.
Comments:Findings of The 2023 Conference on Empirical Methods in Natural Language Processing (EMNLP-findings 2023)
Subjects:Programming Languages (cs.PL); Artificial Intelligence (cs.AI); Computation and Language (cs.CL); Software Engineering (cs.SE)
Cite as:arXiv:2310.09342 [cs.PL]
 (orarXiv:2310.09342v3 [cs.PL] for this version)
 https://doi.org/10.48550/arXiv.2310.09342
arXiv-issued DOI via DataCite

Submission history

From: Saikat Chakraborty [view email]
[v1] Fri, 13 Oct 2023 18:13:52 UTC (813 KB)
[v2] Wed, 18 Oct 2023 18:18:43 UTC (811 KB)
[v3] Mon, 12 Feb 2024 20:25:31 UTC (811 KB)
Full-text links:

Access Paper:

Current browse context:
cs.PL
Change to browse by:
export BibTeX citation

Bookmark

BibSonomy logoReddit logo

Bibliographic and Citation Tools

Bibliographic Explorer(What is the Explorer?)
Connected Papers(What is Connected Papers?)
scite Smart Citations(What are Smart Citations?)

Code, Data and Media Associated with this Article

CatalyzeX Code Finder for Papers(What is CatalyzeX?)
Hugging Face(What is Huggingface?)
Papers with Code(What is Papers with Code?)

Demos

Hugging Face Spaces(What is Spaces?)

Recommenders and Search Tools

Influence Flower(What are Influence Flowers?)
CORE Recommender(What is CORE?)

arXivLabs: experimental projects with community collaborators

arXivLabs is a framework that allows collaborators to develop and share new arXiv features directly on our website.

Both individuals and organizations that work with arXivLabs have embraced and accepted our values of openness, community, excellence, and user data privacy. arXiv is committed to these values and only works with partners that adhere to them.

Have an idea for a project that will add value for arXiv's community?Learn more about arXivLabs.

Which authors of this paper are endorsers? |Disable MathJax (What is MathJax?)

[8]ページ先頭

©2009-2025 Movatter.jp