Effectively Propositional Interpolants

Samuel Drews, Aws Albarghouthi

Abstract

This paper presents a novel sampling-based algorithm for computing Craig interpolants in Effectively Propositional Logic (EPR). By leveraging the small-model property of EPR, the approach iteratively samples finite models and generalizes them into quantified formulas. This technique enables the discovery of alternation-free inductive invariants, facilitating the automated verification of complex systems with unbounded structures, such as linked lists and distributed protocols.

Introduction

In formal verification, proving program correctness often involves finding Craig interpolants. These are intermediate formulas that serve as a witness for the unreachability of error states from initial states. While interpolation is well-established for propositional logic and linear arithmetic, it remains a significant challenge for more expressive fragments like Effectively Propositional Logic (EPR).

EPR is highly valued in verification because it is decidable yet expressive enough to model unbounded data structures. However, existing interpolation techniques often produce formulas with complex quantifier alternations (e.g., $\forall \exists$), which can lead to undecidability during subsequent verification steps. This paper addresses the need for alternation-free interpolants to ensure efficient automated reasoning.

The Sampling and Generalization Framework

The authors propose a "sampling and generalization" strategy to construct interpolants. The primary algorithm, Unidirectional Interpolation (UITP), operates by iteratively refining a candidate interpolant.

The sampling and generalization process for computing interpolants.

As illustrated in the figure above, the process follows three main steps:

  1. Sampling: An SMT solver (such as Z3) is used to find a finite model of the "good" state space ($A$).
  2. Generalization: This specific model is generalized into a diagram—a quantified formula representing an infinite set of structurally similar models. This diagram must not overlap with the "bad" state space ($B$).
  3. Iteration: The algorithm continues to sample and generalize until the union of these diagrams subsumes all of $A$. If a generalization ever overlaps with $B$, it indicates that no simple interpolant exists in the current search space.

For cases where a simple existential formula is insufficient, the authors introduce Bidirectional Interpolation (BITP). BITP alternates sampling between both sides ($A$ and $B$), using recursive calls to find universal formulas that "carve out" overlaps, maintaining the alternation-free property.

Key Insights: Diagrams and Small Models

The effectiveness of this approach relies on two critical logical properties:

  • The Small-Model Property: EPR formulas have the property that if they are satisfiable, they possess a model of a bounded, finite size. This allows the algorithm to focus on manageable finite structures rather than abstract infinite ones.
  • Model-Theoretic Diagrams: Instead of treating models as opaque objects, the authors use diagrams as templates. By using existential variables to represent anonymous elements, they create formulas that describe the shape of data (e.g., the structure of a linked list) rather than specific instances.

Experimental Evaluation

The proposed method was implemented in a tool called ITPV and evaluated on a variety of benchmarks, including operations on singly- and doubly-linked lists (e.g., reverse, bubble-sort, insert-at).

Key results include:

  • Competitive Performance: ITPV demonstrated performance comparable to or better than state-of-the-art Property Directed Reachability (PDR) tools. It was particularly superior to predicate-abstraction-based methods on standard list benchmarks.
  • New Capabilities: ITPV successfully solved benchmarks like shared-tail that require alternation-free invariants, which were previously beyond the reach of automated tools. For instance, it found a solution for shared-tail in approximately 3.5 seconds, whereas prior tools failed to prove the property.

Conclusion and Future Work

This work provides the first comprehensive technique for discovering alternation-free inductive invariants in EPR. By bridging the gap between specific finite models and general logical rules through sampling and generalization, the authors have significantly expanded the scope of automated verification for complex software systems. Future research will focus on improving sampling heuristics and addressing SAT solver bottlenecks that arise when unrolling deep transition relations.

Summary updated

BibTeX
@inproceedings{drews2016effectively,
  author = {Samuel Drews and Aws Albarghouthi},
  title = {{Effectively Propositional Interpolants}},
  booktitle = {CAV},
  year = {2016},
  doi = {10.1007/978-3-319-41540-6\_12},
}
Figure