Counterexample-Guided Inference of Modular Specifications
William T. Hallahan, Ranjit Jhala, Ruzica Piskac
Abstract
Modular verification tools allow programmers to compositionally specify and prove function specifications. When using a modular verifier, proving a specification about a function f requires additional specifications for the functions called by f . With existing state of the art tools, programmers must manually write the specifications for callee functions. We present a counterexample guided algorithm to automatically infer these specifications. The algorithm is parameterized over a verifier, counterexample generator, and constraint guided synthesizer. We show that if each of these three components is sound and complete over a finite set of possible specifications, our algorithm is sound and complete as well. Additionally, we introduce size-bounded synthesis functions, which extends our completeness result to an infinite set of possible specifications. In particular, we describe a size-bounded synthesis function for linear integer arithmetic constraints. We conclude with an evaluation demonstrating our technique on a variety of benchmarks.
Ask about this paper
Ask your agent about it.
Lune has read the top-tier papers around this one, so every answer names the papers it rests on.
Your agent calls
Lunesearch_papers
Free to start. No credit card required.
Terminal
Install the CLIlune papers get 32acd72f-ee2a-4610-80c2-0e6fe3508b22Related papers
- Verification Modulo Tested Library ContractsAbhishek Uppar, Omar Muhammad, Sumanth Prabhu S, Deepak D'Souza et al.PLDI 2026 · 1 citation
- Synthesizing Formal Semantics from Executable InterpretersJiangyi Liu, Charlie Murphy, Anvay Grover, Keith J. C. Johnson et al.OOPSLA 2024
- Data-driven inference of representation invariantsAnders Miltner, Saswat Padhi, Todd D. Millstein, David WalkerPLDI 2020 · 33 citations
- Data-driven abductive inference of library specificationsZhe Zhou, Robert Dickerson, Benjamin Delaware, Suresh JagannathanOOPSLA 2021 · 15 citations
- Decision Tree Learning in CEGIS-Based Termination AnalysisSatoshi Kura, Hiroshi Unno, Ichiro HasuoCAV 2021 · 6 citations
