# Verification Modulo Tested Library Contracts

arXiv: https://arxiv.org/abs/2604.15533 · HTML: https://mlsanity.com/paper/2604.15533/

## Key facts

- No citing papers in the map yet (data through 14 Oct 2026).
- Builds on 9 of its 57 references that are in the map.
- First posted on arXiv 16 Apr 2026.

## Builds on (most cited first, 9 of 9)

- [Gemini 1.5: Unlocking multimodal understanding across millions of tokens of context](https://mlsanity.com/paper/2403.05530/) (2024)
- [Enchanting Program Specification Synthesis by Large Language Models using Static Analysis and Program Verification](https://mlsanity.com/paper/2404.00762/) (2024)
- [SMT-based Model Checking for Recursive Programs](https://mlsanity.com/paper/1405.4028/) (2014)
- [Horn-ICE Learning for Synthesizing Invariants and Contracts](https://mlsanity.com/paper/1712.09418/) (2017)
- [RustHorn: CHC-based Verification for Rust Programs (full version)](https://mlsanity.com/paper/2002.09002/) (2020)
- [Data-Driven Inference of Representation Invariants](https://mlsanity.com/paper/2003.12106/) (2020)
- [Compositional Verification of Procedural Programs using Horn Clauses over Integers and Arrays](https://mlsanity.com/paper/1508.01288/) (2015)
- [Fifty years of Hoare's Logic](https://mlsanity.com/paper/1904.03917/) (2019)
- [Data-Driven Abductive Inference of Library Specifications](https://mlsanity.com/paper/2108.04783/) (2021)

## Abstract (arXiv)

We consider the problem of verification modulo tested library contracts as a step towards automating the verification of client programs that use complex libraries. We formulate this problem as the synthesis of modular contracts for the library methods used by the client that are adequate to prove the client correct, and that also pass the scrutiny of a testing engine that tests the library against these contracts. We also consider a new form of method contracts called contextual contracts that arise in this setting that hold in the context of the client program, and can often be simpler and easier to infer than classical modular contracts. We provide a counterexample-guided learning framework to solve this problem, in which the synthesizer interacts with a constraint solver as well as the testing engine in order to infer adequate modular/contextual method contracts and inductive invariants for the client. The main synthesis engines we use are generalizing CHC solvers that are realized using ICE learning algorithms. We realize this framework in a tool called DUALIS and show its efficacy on benchmarks where clients call large libraries.
