<div class="csl-bib-body">
<div class="csl-entry">King, D., Koutavas, V., & Kovacs, L. (2025). LLM-based Generation of Weakest Preconditions and Precise Array Invariants. In <i>Proceedings of the 13th International Conference on Formal Methods in Software Engineering (FormaliSE)</i> (pp. 96–100). IEEE. https://doi.org/10.1109/FORMALISE66629.2025.00016</div>
</div>
-
dc.identifier.uri
http://hdl.handle.net/20.500.12708/225668
-
dc.description.abstract
The weakest precondition (WP) of a program describes the largest set of initial states from which all terminating executions of the program satisfy a given postcondition. The generation of WPs is an important task with practical applications in areas such as software verification and runtime error-checking. For programs containing loops, WP generation critically depends upon synthesizing loop invariants that are inductive in nature; these WPs then essentially embed the inductive properties required for program verification. This paper investigates the use of Large Language Models (LLMs) to generate WPs (and accompanying loop invariants) in order to prove the correctness of non-deterministic programs containing arrays, loops, and arithmetic. Specifically, we employ several models of ChatGPT to derive the WPs and invariants for the aforementioned programs. We then compare these LLM-derived WPs and invariants to their provable counterparts obtained by the MaxPrANQ tool. We find that the quality of the LLM-derived results can vary greatly and is highly dependent on the underlying model used by ChatGPT. This variance in performance propels us to outline directions for future work and discuss how LLMs and formal-tools can complement one another in generating valid WPs and strong invariants.
en
dc.description.sponsorship
European Commission
-
dc.language.iso
en
-
dc.subject
Array processing
en
dc.subject
program correctness
en
dc.subject
invariants
en
dc.subject
LLMs
en
dc.subject
weakest preconditions
en
dc.subject
program verification
en
dc.title
LLM-based Generation of Weakest Preconditions and Precise Array Invariants
en
dc.type
Inproceedings
en
dc.type
Konferenzbeitrag
de
dc.contributor.affiliation
Trinity College Dublin, Ireland
-
dc.contributor.affiliation
Computer Science - Trinity College Dublin (Dublin, IE)
-
dc.relation.isbn
979-8-3315-0176-1
-
dc.relation.doi
10.1109/FormaliSE66629.2025
-
dc.relation.issn
2380-873X
-
dc.description.startpage
96
-
dc.description.endpage
100
-
dc.relation.grantno
ERC Consolidator Grant 2020
-
dc.type.category
Full-Paper Contribution
-
dc.relation.eissn
2575-5099
-
tuw.booktitle
Proceedings of the 13th International Conference on Formal Methods in Software Engineering (FormaliSE)
-
tuw.peerreviewed
true
-
tuw.relation.publisher
IEEE
-
tuw.project.title
Automated Reasoning with Theories and Induction for Software Technologies
-
tuw.researchTopic.id
I1
-
tuw.researchTopic.name
Logic and Computation
-
tuw.researchTopic.value
100
-
tuw.publication.orgunit
E192-04 - Forschungsbereich Formal Methods in Systems Engineering
-
tuw.publication.orgunit
E056-10 - Fachbereich SecInt-Secure and Intelligent Human-Centric Digital Technologies
-
tuw.publication.orgunit
E056-13 - Fachbereich LogiCS
-
tuw.publication.orgunit
E056-17 - Fachbereich Trustworthy Autonomous Cyber-Physical Systems
-
tuw.publication.orgunit
E056-26 - Fachbereich Automated Reasoning
-
tuw.publisher.doi
10.1109/FORMALISE66629.2025.00016
-
dc.description.numberOfPages
5
-
tuw.author.orcid
0009-0001-8519-8970
-
tuw.author.orcid
0000-0002-3970-2486
-
tuw.author.orcid
0000-0002-8299-2714
-
tuw.event.name
2025 IEEE/ACM 13th International Conference on Formal Methods in Software Engineering (FormaliSE)
-
tuw.event.startdate
27-04-2025
-
tuw.event.enddate
28-04-2025
-
tuw.event.online
Hybrid
-
tuw.event.type
Event for scientific audience
-
tuw.event.place
Ottawa
-
tuw.event.country
CA
-
tuw.event.presenter
King, Daragh
-
wb.sciencebranch
Informatik
-
wb.sciencebranch.oefos
1020
-
wb.sciencebranch.value
100
-
item.openairecristype
http://purl.org/coar/resource_type/c_5794
-
item.fulltext
no Fulltext
-
item.languageiso639-1
en
-
item.grantfulltext
none
-
item.openairetype
conference paper
-
item.cerifentitytype
Publications
-
crisitem.author.dept
Trinity College Dublin, Ireland
-
crisitem.author.dept
Computer Science - Trinity College Dublin (Dublin, IE)
-
crisitem.author.dept
E192-04 - Forschungsbereich Formal Methods in Systems Engineering