This paper introduces Inductive Predicate Synthesis Modulo Programs (IPS-MP), a new synthesis framework designed to bridge the gap between high-level program analysis tools and low-level verification solvers. By allowing developers to embed "unknown" predicates directly into program code via assume and assert statements, the authors provide a way to communicate complex proof strategies—like compositional invariants—to off-the-shelf verifiers without the overhead of general-purpose synthesis.
TL;DR
IPS-MP is a novel synthesis problem that allows developers to guide program verifiers by embedding unknown predicates directly into source code. The authors demonstrate that this approach can fully automate complex verification tasks, such as smart contract analysis, while remaining as computationally efficient as standard verification in the Boolean case.
What Problem Does This Paper Address?
In modern software verification, there is a persistent "impedance mismatch" between analysis tools and the solvers they rely on. High-level tools (like those for concurrent or object-oriented programs) often operate using specific proof rules—such as Owicki-Gries or class invariants. However, underlying solvers (like SMT or CHC solvers) operate on raw verification conditions.
When a tool designer tries to encode these proof rules into the input program, the verifier’s own optimizations often strip them away before they ever reach the solver. While general-purpose synthesis frameworks (like Sketch or SyGuS) could theoretically fill these gaps, they are often too computationally expensive and lack the ability to prove that a solution doesn't exist (unrealizability). IPS-MP addresses this by providing a specialized, more tractable synthesis target that is "modulo the program," meaning the synthesis is constrained by the program's own semantics.
Methods
The authors define IPS-MP as a problem involving a program with specifications and predicate templates—partial implementations with "holes" to be filled.
Key methodological contributions include:
- Reduction to CHCs: The authors show that IPS-MP can be reduced to the satisfiability of Constrained Horn Clauses (CHCs). This allows them to leverage powerful, off-the-shelf solvers like Spacer and Eldarica.
- Boolean Decidability: They prove that for Boolean programs, IPS-MP is decidable with the same time complexity as standard verification (polynomial in the number of states), whereas general synthesis is typically exponential.
- Proof-Rule Reductions: The paper provides formal reductions for several challenging verification tasks into the IPS-MP format, including:
- Class invariant inference.
- Array-manipulating program verification.
- Parameterized Compositional Model Checking (PCMC) for ring networks.
The architecture for this approach is built atop the SeaHorn verification framework, as illustrated below:
Datasets
The authors evaluated their implementation using a suite of 92 IPS-MP problems involving linear integer arithmetic:
- Standard Benchmarks: 22 problems drawn from existing literature on loop invariants, class invariants, array abstractions, and procedure summarization.
- Smart Contract Benchmarks: 70 problems generated by extending SmartACE, a tool for Solidity smart contract verification. These represent real-world decentralized finance (DeFi) applications.
- Fault Injection: To test the ability to detect "unrealizability," they injected 29 faults into these benchmarks.
Key Insights and Ideas
- Synthesis as a Communication Channel: Instead of using synthesis to generate code, IPS-MP uses it as a language to communicate how to prove a program correct. This allows the solver to infer the specific invariants needed by a high-level proof strategy.
- Functional Constraints: Unlike specification synthesis, which often requires extra "non-vacuity" or "maximality" checks to find useful solutions, IPS-MP naturally constrains solutions through both
assume(strongest possible) andassert(weakest possible) statements. - Complexity Parity: The finding that Boolean IPS-MP is no harder than Boolean verification is a significant theoretical result, suggesting that adding "holes" to a program doesn't necessarily make it harder to analyze, provided those holes are restricted to predicates.
Key Results
- Efficiency: The IPS-MP solver (using SeaHorn + Spacer) solved all small benchmarks in an average of under one minute.
- Superiority over General Synthesis: In head-to-head comparisons, general-purpose synthesis tools like CVC4 (SyGuS) and HornSpec failed to solve any of the smart contract benchmarks within a 30-minute timeout, while the IPS-MP approach solved 58 out of 62 realizable instances.
- Smart Contract Automation: The authors successfully automated the verification of smart contracts that previously required manual, user-provided compositional invariants in the SmartACE tool. The overhead for this automation was roughly 18x compared to manual verification, which the authors deem "tolerable" for the benefit of full automation.
Limitations and Future Work
- Domain Specificity: The current evaluation is heavily weighted toward smart contract verification. While representative of compositional verification, the authors acknowledge that design patterns in other domains might present different challenges.
- Solver Timeouts: Four smart contract benchmarks remained unsolved by Spacer, eventually returning "unknown" after an hour.
- Future Directions: The authors plan to explore IPS-MP for other decidable models, such as timed automata, and investigate how data-driven invariant generation techniques could be adapted to the IPS-MP framework.
Summary updated