Verifying Catamorphism-Based Contracts using Constrained Horn Clauses
Emanuele De Angelis (1), Fabio Fioravanti (2), Alberto Pettorossi (3),, Maurizio Proietti (1) ((1) IASI-CNR, Rome, Italy, (2) DEc, University 'G., d'Annunzio', Chieti-Pescara, Pescara, Italy, (3) DICII, University of Rome, 'Tor Vergata', Rome, Italy)

TL;DR
This paper presents a novel transformation technique for verifying contracts specified by catamorphisms on algebraic data types using constrained Horn clauses, improving the effectiveness of satisfiability checking tools.
Contribution
It introduces a transformation that removes ADT terms from CHCs, enabling more effective verification of catamorphism-based contracts without induction rules.
Findings
Transformation is sound and always terminates for catamorphism contracts.
Experimental results show improved verification success on non-trivial ADT programs.
Abstract
We address the problem of verifying that the functions of a program meet their contracts, specified by pre/postconditions. We follow an approach based on constrained Horn clauses (CHCs) by which the verification problem is reduced to the problem of checking satisfiability of a set of clauses derived from the given program and contracts. We consider programs that manipulate algebraic data types (ADTs) and a class of contracts specified by catamorphisms, that is, functions defined by simple recursion schemata on the given ADTs. We show by several examples that state-of-the-art CHC satisfiability tools are not effective at solving the satisfiability problems obtained by direct translation of the contracts into CHCs. To overcome this difficulty, we propose a transformation technique that removes the ADT terms from CHCs and derives new sets of clauses that work on basic sorts only, such as…
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.
