Multiple Query Satisfiability of Constrained Horn Clauses
Emanuele De Angelis, Fabio Fioravanti, Alberto Pettorossi, Maurizio Proietti
TL;DR
The paper tackles satisfiability checking for sets of constrained Horn clauses (CHCs) that include multiple queries by introducing a transformation ${\mathcal{T}}_{\mathit{mq}}$ that yields an equisatisfiable CHC program in which inter-query dependencies are encoded and exploitable by solvers. Grounded in generalized catamorphisms for algebraic data types, the method constructs new definitions that fuse program predicates with catamorphism constraints, enabling mutual reasoning across queries. The authors prove soundness and completeness of the transformation, show termination for catamorphism-based queries, and demonstrate substantial practical gains: a benchmark of CHCs encoding ADT-manipulating programs is solved more effectively than by a state-of-the-art solver alone. The approach extends prior contracts-based transformations and Artefacts VeriCaT, providing a robust tool for verifying properties across multiple related verifications. Overall, ${\mathcal{T}}_{\mathit{mq}}$ enhances CHC-based verification by compiling query interactions into the CHC set, improving satisfiability proving for complex, multi-query verification problems.
Abstract
We address the problem of checking the satisfiability of a set of constrained Horn clauses (CHCs) possibly including more than one query. We propose a transformation technique that takes as input a set of CHCs, including a set of queries, and returns as output a new set of CHCs, such that the transformed CHCs are satisfiable if and only if so are the original ones, and the transformed CHCs incorporate in each new query suitable information coming from the other ones so that the CHC satisfiability algorithm is able to exploit the relationships among all queries. We show that our proposed technique is effective on a non trivial benchmark of sets of CHCs that encode many verification problems for programs manipulating algebraic data types such as lists and trees.
