Sharper and Simpler Nonlinear Interpolants for Program Verification

Takamasa Okudono, Yuki Nishida, Kensuke Kojima, Kohei Suenaga, Kengo Kido, Ichiro HasuoarXiv 2017

Introduction

In the domain of automated program verification, Craig interpolation serves as a cornerstone for synthesizing invariants and refining abstractions. When a program analysis tool identifies a path to an "unsafe" state, an interpolant provides a mathematical witness explaining why that specific path is unreachable. While linear interpolants are well-understood and widely used, nonlinear (polynomial) interpolants are significantly more difficult to generate, yet essential for verifying programs with complex dynamics, such as those found in control systems or physics-based simulations.

This paper introduces SSINT, a tool that generates "sharper" and "simpler" nonlinear interpolants. By refining theoretical results from real algebraic geometry and implementing a novel multi-dimensional rounding algorithm, the authors overcome the limitations of previous numerical solvers that struggle with "barely disjoint" sets and imprecise floating-point coefficients.

The Challenge of Nonlinear Interpolation

A recent breakthrough in the field utilized Semidefinite Programming (SDP) solvers and Stengle’s Positivstellensatz—a fundamental result from real algebraic geometry—to find polynomial interpolants. However, two major hurdles remained:

  1. Sharpness: Previous methods often fail when the "safe" and "unsafe" regions are "barely disjoint," meaning their boundaries touch at a single point or along a curve. Theoretically, the standard framework using non-strict inequalities cannot find an interpolant in these edge cases.
  2. Simplicity and Soundness: SDP solvers are inherently numerical. They produce polynomials with high-precision floating-point coefficients (e.g., $0.000123x^2 + 0.99998y$). These are not only difficult for humans to interpret but may also be invalid when checked against exact symbolic logic due to numerical noise.

Technical Innovations in SSINT

The authors propose two main technical innovations to address these issues:

Sharpened Positivstellensatz

The authors move from a framework of non-strict inequalities ($\ge$) to one using strict inequalities ($>$). They introduce a new mathematical construct called a strict cone to adapt Stengle’s Positivstellensatz. This theoretical shift allows the system to synthesize "sharp" interpolants that sit exactly on the boundary where two regions touch, providing a valid separation where previous methods would return no result.

Rounding-Validation Loop and Extended CFE

To handle the "messy" output of numerical solvers, the authors implement a loop that iteratively rounds coefficients and validates them using exact symbolic methods. A key component is the Extended Continued Fraction Expansion (CFE). While standard rounding handles one number at a time, the authors developed a generalized CFE algorithm that simplifies the ratio between $n$ real numbers simultaneously. This ensures that the entire polynomial structure is simplified into clean, integer-like ratios while staying as close as possible to the solver's original suggestion.

Experimental Evaluation

The authors evaluated SSINT on a set of 9 challenging geometric benchmarks designed to test "barely disjoint" scenarios and two imperative programs involving nonlinear dynamics.

Figure 1: A visual representation of "barely disjoint" regions (red and blue) touching at a single point. SSINT is designed to find sharp interpolants for such scenarios.

Key Results

  • Success in Edge Cases: SSINT successfully found sharp interpolants for all "barely disjoint" geometric examples. In contrast, the previous state-of-the-art tool, aiSat, was theoretically guaranteed to fail in these instances.
  • Coefficient Simplification: The rounding loop proved highly effective. In one instance, a complex polynomial from aiSat with coefficients like $284.3340$ was simplified by SSINT to $5y + 2 > 0$. Such simple predicates are far more useful for formal verification and human audit.
  • Verification Performance: In CEGAR (Counterexample-Guided Abstraction Refinement) benchmarks, SSINT generated simple invariants (like $xa + 2ya \ge 0$) in a few seconds, proving the safety of programs that previously required manual intervention.

Discussion and Future Work

The authors' work suggests that simplicity is a proxy for "essential truth." By forcing coefficients into simple integer ratios, they often recover the "correct" invariant that a numerical solver only vaguely approximated. To improve efficiency, they also utilize matrix minors to check for positive semidefiniteness, avoiding expensive Quantifier Elimination (QE).

Future work includes scaling the tool to larger industrial benchmarks and tightening the integration between the SDP solver and the rounding phase. Passing additional information, such as gradients, from the solver to the rounding algorithm could further optimize the search for simple, valid interpolants.

Summary updated

BibTeX
@misc{okudono2017sharper,
  author = {Takamasa Okudono and Yuki Nishida and Kensuke Kojima and Kohei Suenaga and Kengo Kido and Ichiro Hasuo},
  title = {{Sharper and Simpler Nonlinear Interpolants for Program Verification}},
  year = {2017},
  eprint = {1709.00314},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1709.00314},
}
Figure