Nonlinear Craig Interpolant Generation
Interpolation-based techniques have become popularized in recent years because of their inherently modular and local reasoning, which can scale up existing formal verification techniques like theorem proving, model-checking, abstraction interpretation, and so on, while the scalability is the bottleneck of these techniques. Craig interpolant generation plays a central role in interpolation-based techniques, and therefore has drawn increasing attentions. In the literature, there are various works done on how to automatically synthesize interpolants for decidable fragments of first-order logic, linear arithmetic, array logic, equality logic with uninterpreted functions (EUF), etc., and their combinations. But Craig interpolant generation for non-linear theory and its combination with the aforementioned theories are still in infancy, although some attempts have been done. In this paper, we first prove that a polynomial interpolant of the form $h(\mathbf{x})>0$ exists for two mutually contradictory polynomial formulas $\phi(\mathbf{x},\mathbf{y})$ and $\psi(\mathbf{x},\mathbf{z})$, with the form $f_1\ge0\wedge\cdots\wedge f_n\ge0$, where $f_i$ are polynomials in $\mathbf{x},\mathbf{y}$ or $\mathbf{x},\mathbf{z}$, and the quadratic module generated by $f_i$ is Archimedean. Then, we show that synthesizing such interpolant can be reduced to solving a semi-definite programming problem (${\rm SDP}$). In addition, we propose a verification approach to assure the validity of the synthesized interpolant and consequently avoid the unsoundness caused by numerical error in ${\rm SDP}$ solving. Finally, we discuss how to generalize our approach to general semi-algebraic formulas.
💡 Research Summary
This paper addresses the challenging problem of automatically generating Craig interpolants for nonlinear polynomial formulas, a crucial task for scaling up interpolation-based formal verification techniques like model checking and abstract interpretation. While efficient interpolant synthesis exists for linear arithmetic and other decidable theories, the nonlinear case remains underdeveloped.
The core contribution is a theoretical and computational framework for interpolant generation between two mutually contradictory polynomial formulas in conjunctive normal form: φ(x,y) = (f₁(x,y) ≥ 0 ∧ … ∧ f_m(x,y) ≥ 0) and ψ(x,z) = (g₁(x,z) ≥ 0 ∧ … ∧ g_n(x,z) ≥ 0). Under the key assumption that the quadratic modules generated by the polynomials in each formula are Archimedean (which implies all variables are bounded, a reasonable condition in practice), the authors first prove the existence of a polynomial interpolant of the form h(x) > 0. The proof leverages fundamental results from real algebraic geometry, particularly Putinar’s Positivstellensatz, to show that the projections of the sets defined by φ and ψ onto their common variables x can be separated by a polynomial hypersurface h(x)=0.
The paper then translates this existential theorem into a practical algorithm. The conditions for h(x) to be an interpolant are encoded as constraints requiring certain polynomials to be sum-of-squares (SOS). This SOS formulation is subsequently transformed into a Semidefinite Programming (SDP) problem, a convex optimization paradigm for which efficient numerical solvers exist. Solving this SDP yields the numerical coefficients of the interpolating polynomial h(x).
A significant practical concern addressed is the potential unsoundness introduced by numerical errors from the SDP solver. To ensure reliability, the authors propose a post-verification step. The candidate interpolant h(x) generated by SDP is formally checked using symbolic computation tools (e.g., REDUCE) to validate the two key properties: φ ⇒ h>0 and (h>0 ∧ ψ) is unsatisfiable. This step guarantees the mathematical correctness of the final interpolant, immunizing the method against numerical inaccuracies.
The methodology is further discussed in the context of general semi-algebraic formulas (involving disjunctions and negations), showing the potential for broader application. Finally, the paper demonstrates the utility of this nonlinear interpolant generation by integrating it into a framework for program verification. It revises existing interpolation-based techniques for invariant generation, enabling the synthesis of nonlinear loop invariants through both forward interpolation (using strongest postconditions) and backward interpolation (using weakest preconditions). This application underscores the practical value of the proposed techniques in enhancing the power of automated verification tools for systems with nonlinear constraints.
Comments & Academic Discussion
Loading comments...
Leave a Comment