Contract Strengthening through Constrained Horn Clause Verification
Emanuele De Angelis (IASI-CNR, Italy), Fabio Fioravanti (DEc,, University of Chieti-Pescara, Italy), Alberto Pettorossi (DICII, University, of Rome "Tor Vergata", Italy), Maurizio Proietti (IASI-CNR, Italy)

TL;DR
This paper introduces a technique to strengthen function postconditions via constrained Horn clause verification, enhancing the ability of verification tools to prove program correctness, especially when initial contracts are insufficient.
Contribution
The paper presents a novel method that transforms programs and contracts into CHCs, derives strengthened postconditions through model construction, and improves verification success.
Findings
Successfully applied to a Scala list reversal example.
Enhanced verification success with strengthened postconditions.
Demonstrated improvement over existing contract verification methods.
Abstract
The functional properties of a program are often specified by providing a contract for each of its functions. A contract of a function consists of a pair of formulas, called a precondition and a postcondition, which, respectively, should hold before and after execution of that function. It might be the case that the contracts supplied by the programmer are not adequate to allow a verification system to prove program correctness, that is, to show that for every function, if the precondition holds and the execution of the function terminates, then the postcondition holds. We address this problem by providing a technique which may strengthen the postconditions of the functions, thereby improving the ability of the verifier to show program correctness. Our technique consists of four steps. First, the translation of the given program, which may manipulate algebraic data structures (ADTs),…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
