[Paper Review] Program Verification via Predicate Constraint Satisfiability Modulo Theories
This paper introduces a new verification framework based on $μ$CLP, an extension of Constraint Logic Programming with nested inductive and co-inductive predicates, and $π$CSP$^{\Downarrow\lambda}$, a generalized class of predicate constraint satisfaction problems that extends Constrained Horn Clauses (CHCs) with arbitrary clauses, function variables, and well-foundedness constraints. The framework enables expressive encoding of complex verification tasks—such as termination, non-termination, and full modal mu-calculus model checking—via a sound and complete reduction from $μ$CLP to $π$CSP$^{\Downarrow\lambda}$, solved using stratified CounterExample-Guided Inductive Synthesis (CEGIS), achieving relative completeness and stable convergence.
This paper presents a verification framework based on a new class of predicate Constraint Satisfaction Problems called pCSP where constraints are represented as clauses modulo first-order theories over function variables and predicate variables that may represent well-founded predicates. The verification framework generalizes an existing one based on Constrained Horn Clauses (CHCs) to arbitrary clauses, function variables, and well-foundedness constraints. While it is known that the satisfiability of CHCs and the validity of queries for Constrained Logic Programs (CLP) are inter-reducible, we show that, thanks to the added expressiveness, pCSP is expressive enough to express muCLP queries. muCLP itself is a new extension of CLP that we propose in this paper. It extends CLP with arbitrarily nested inductive and co-inductive predicates and is equi-expressive as first-order fixpoint logic. We show that muCLP can naturally encode a wide variety of verification problems including but not limited to termination/non-termination verification and even full modal mu-calculus model checking of programs written in various languages. To establish our verification framework, we present (1) a sound and complete reduction algorithm from muCLP to pCSP and (2) a constraint solving method for pCSP based on stratified CounterExample-Guided Inductive Synthesis (CEGIS) of (co-)inductive invariants, ranking functions, and Skolem functions witnessing existential quantifiers. Stratified CEGIS combines CEGIS with stratified families of templates to achieve relative completeness and faster and stable convergence of CEGIS by avoiding the overfitting problem. We have implemented the proposed framework and obtained promising results on diverse verification problems that are beyond the scope of the previous verification frameworks based on CHCs.
Motivation & Objective
- To generalize the CHC-based verification framework to support a broader class of verification problems beyond safety and refinement types.
- To introduce $μ$CLP, a new extension of CLP with arbitrarily nested inductive and co-inductive predicates, to express complex verification tasks uniformly.
- To develop a sound and complete reduction from $μ$CLP to $π$CSP$^{\Downarrow\lambda}$, enabling the use of existing CHC solving techniques for more expressive problems.
- To design a constraint solving method for $π$CSP$^{\Downarrow\lambda}$ that ensures relative completeness and stable convergence through stratified CEGIS.
- To demonstrate the practical applicability of the framework on diverse verification problems beyond the reach of prior CHC-based systems.
Proposed method
- Proposes $μ$CLP as an extension of CLP with arbitrary nesting of inductive and co-inductive predicates, equi-expressive with first-order fixpoint logic.
- Introduces $π$CSP$^{\Downarrow\lambda}$ as a generalization of CHCs, allowing arbitrary clauses, function variables, and well-founded predicate variables.
- Develops a sound and complete reduction from $μ$CLP queries to $π$CSP$^{\Downarrow\lambda}$ constraints, preserving validity through symbolic manipulation of predicate and function variables.
- Employs stratified CounterExample-Guided Inductive Synthesis (CEGIS) to iteratively synthesize invariants, ranking functions, and Skolem functions over stratified template families.
- Uses unsatisfiable cores from validation checks to refine templates and avoid overfitting, ensuring stable and faster convergence.
- Integrates existing CHC solving techniques with template-based synthesis, extending them to handle non-Horn and higher-order constraints.
Experimental results
Research questions
- RQ1Can a generalized predicate constraint satisfaction framework express complex verification problems such as termination, non-termination, and full modal mu-calculus model checking?
- RQ2Is there a sound and complete reduction from $μ$CLP to $π$CSP$^{\Downarrow\lambda}$ that enables uniform verification via constraint solving?
- RQ3Can stratified CEGIS achieve relative completeness and stable convergence in synthesizing (co-)inductive invariants and ranking functions for $π$CSP$^{\Downarrow\lambda}$?
- RQ4Does the proposed framework scale to practical verification tasks beyond the expressiveness of standard CHCs?
- RQ5Can the framework be extended to support richer first-order theories such as arrays, heaps, and algebraic data types?
Key findings
- The framework successfully encodes a wide range of verification problems, including full modal mu-calculus model checking, which are beyond the scope of standard CHC-based systems.
- The reduction from $μ$CLP to $π$CSP$^{\Downarrow\lambda}$ is both sound and complete, ensuring correctness of the verification process.
- Stratified CEGIS enables relative completeness and faster, more stable convergence by avoiding overfitting to counterexamples through hierarchical template families.
- The implementation demonstrates promising results on diverse verification tasks, including termination and non-termination analysis, that were previously infeasible with CHC-only frameworks.
- The framework is extensible to richer theories such as arrays, heaps, and algebraic data types, with future work targeting support for higher-order and probabilistic predicates.
- The full class of $π$CSP$^{\Downarrow\lambda}$ is strictly more expressive than $μ$CLP, suggesting potential for further applications beyond current verification needs.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.