Synthesizing data structure refinements from integrity constraints
Shankara Pailoor, Yuepeng Wang, Xinyu Wang, Isil Dillig
Abstract
Implementations of many data structures use several correlated fields to improve their performance; however, inconsistencies between these fields can be a source of serious program errors. To address this problem, we propose a new technique for automatically refining data structures from integrity constraints. In particular, consider a data structure D with fields F and methods M, as well as a new set of auxiliary fields F′ that should be added to D. Given this input and an integrity constraint Φ relating F and F′, our method automatically generates a refinement of D that satisfies the provided integrity constraint. Our method is based on a modular instantiation of the CEGIS paradigm and uses a novel inductive synthesizer that augments top-down search with three key ideas. First, it computes necessary preconditions of partial programs to dramatically prune its search space. Second, it augments the grammar with promising new productions by leveraging the computed preconditions. Third, it guides top-down search using a probabilistic context-free grammar obtained by statically analyzing the integrity checking function and the original code base. We evaluated our method on 25 data structures from popular Java projects and show that our method can successfully refine 23 of them. We also compare our method against two state-of-the-art synthesis tools and perform an ablation study to justify our design choices. Our evaluation shows that (1) our method is successful at refining many data structure implementations in the wild, (2) it advances the state-of-the-art in synthesis, and (3) our proposed ideas are crucial for making this technique practical.
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.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext 191b2864-98bb-4f43-8cc9-790e15fa5b6cCited by top-tier papers9
- WebRobot: web robotic process automation using interactive programming-by-demonstrationRui Dong, Zhicheng Huang, Ian Iong Lam, Yan Chen et al.PLDI 2022 · 24 citations
- Inductive Program Synthesis via Iterative Forward-Backward Abstract InterpretationYongho Yoon, Woosuk Lee, Kwangkeun YiPLDI 2023 · 15 citations
- Synthesis-powered optimization of smart contracts via data type refactoringYanju Chen, Yuepeng Wang, Maruth Goyal, James Dong et al.OOPSLA 2022 · 14 citations
- Semantic Code Refactoring for Abstract Data TypesShankara Pailoor, Yuepeng Wang, Isil DilligPOPL 2024 · 13 citations
- Complexity-guided container replacement synthesisChengpeng Wang, Peisen Yao, Wensheng Tang, Qingkai Shi et al.OOPSLA 2022 · 11 citations
Builds on1
Related papers
- Synthesizing Formal Semantics from Executable InterpretersJiangyi Liu, Charlie Murphy, Anvay Grover, Keith J. C. Johnson et al.OOPSLA 2024
- Recursion synthesis with unrealizability witnessesAzadeh Farzan, Danya Lette, Victor NicoletPLDI 2022 · 19 citations
- Decision Tree Learning in CEGIS-Based Termination AnalysisSatoshi Kura, Hiroshi Unno, Ichiro HasuoCAV 2021 · 6 citations
- Combining the top-down propagation and bottom-up enumeration for inductive program synthesisWoosuk LeePOPL 2021 · 34 citations
- Provenance-guided synthesis of Datalog programsMukund Raghothaman, Jonathan Mendelson, David Zhao, Mayur Naik et al.POPL 2020 · 49 citations
