Synthesizing Specifications
Kanghee Park, Loris D'Antoni, Thomas W. Reps
Abstract
Every program should be accompanied by a specification that describes important aspects of the code's behavior, but writing good specifications is often harder than writing the code itself. This paper addresses the problem of synthesizing specifications automatically, guided by user-supplied inputs of two kinds: i) a query posed about a set of function definitions, and ii) a domain-specific language L in which the extracted property is to be expressed (we call properties in the language L-properties). Each of the property is a best L-property for the query: there is no other L-property that is strictly more precise. Furthermore, the set of synthesized L-properties is exhaustive: no more L-properties can be added to it to make the conjunction more precise. We implemented our method in a tool, Spyro. The ability to modify both the query and L provides a Spyro user with ways to customize the kind of specification to be synthesized. We use this ability to show that Spyro can be used in a variety of applications, such as mining program specifications, performing abstract-domain operations, and synthesizing algebraic properties of program modules.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Cited by top-tier papers4
- Inductive Synthesis of Inductive Heap PredicatesZiyi Yang, Ilya SergeyOOPSLA 2025 · 1 citation
- LOUD: Synthesizing Strongest and Weakest SpecificationsKanghee Park, Xuanyu Peng, Loris D'AntoniOOPSLA 2025 · 1 citation
- Computing Precise Control Interface SpecificationsEric Hayden Campbell, Hossein Hojjat, Nate FosterOOPSLA 2024 · 1 citation
- Nice to Meet You: Synthesizing Practical MLIR Abstract TransformersXuanyu Peng, Dominic Kennedy, Yuyou Fan, Ben Greenman et al.POPL 2026
Builds on9
- Syntia: Synthesizing the Semantics of Obfuscated CodeTim Blazytko, Moritz Contag, Cornelius Aschermann, Thorsten HolzUSENIX Security 2017 · 99 citations
- Data-driven inference of representation invariantsAnders Miltner, Saswat Padhi, Todd D. Millstein, David WalkerPLDI 2020 · 33 citations
- Semantics-guided synthesisJinwoo Kim, Qinheping Hu, Loris D'Antoni, Thomas W. RepsPOPL 2021 · 31 citations
- Exact and approximate methods for proving unrealizability of syntax-guided synthesis problemsQinheping Hu, John Cyphert, Loris D'Antoni, Thomas W. RepsPLDI 2020 · 22 citations
- Synthesizing abstract transformersPankaj Kumar Kalita, Sujit Kumar Muduli, Loris D'Antoni, Thomas W. Reps et al.OOPSLA 2022 · 21 citations
Related papers
- C2S: translating natural language comments to formal program specificationsJuan Zhai, Yu Shi, Minxue Pan, Guian Zhou et al.FSE 2020 · 44 citations
- Explainable Program Synthesis by Localizing SpecificationsAmirmohammad Nazari, Yifei Huang, Roopsha Samanta, Arjun Radhakrishna et al.OOPSLA 2023 · 12 citations
- Synthesizing Graph Queries from DemonstrationsXiaoyu Liu, Qikang Liu, Evan Dyce, Keval Vora et al.OOPSLA 2026
- Expecto: Extracting Formal Specifications from Natural Language Description for Trustworthy OraclesDongjae Lee, Kihong HeoPLDI 2026
- Synthesizing MILP Constraints for Efficient and Robust OptimizationJingbo Wang, Aarti Gupta, Chao WangPLDI 2023 · 4 citations
