[Paper Review] Program Synthesis using Abstraction Refinement
This paper introduces Synthesis using Abstraction Refinement (SYNGAR), a program synthesis technique that uses abstract finite tree automata (AFTA) to reduce the search space by grouping programs with equivalent abstract behavior. By iteratively refining abstractions using proofs of incorrectness, SYNGAR efficiently finds correct programs or proves their nonexistence, achieving up to 90x speedup over state-of-the-art tools in matrix manipulation and favorable performance against FlashFill in string transformations.
We present a new approach to example-guided program synthesis based on counterexample-guided abstraction refinement. Our method uses the abstract semantics of the underlying DSL to find a program $P$ whose abstract behavior satisfies the examples. However, since program $P$ may be spurious with respect to the concrete semantics, our approach iteratively refines the abstraction until we either find a program that satisfies the examples or prove that no such DSL program exists. Because many programs have the same input-output behavior in terms of their abstract semantics, this synthesis methodology significantly reduces the search space compared to existing techniques that use purely concrete semantics. While synthesis using abstraction refinement (SYNGAR) could be implemented in different settings, we propose a refinement-based synthesis algorithm that uses abstract finite tree automata (AFTA). Our technique uses a coarse initial program abstraction to construct an initial AFTA, which is iteratively refined by constructing a proof of incorrectness of any spurious program. In addition to ruling out the spurious program accepted by the previous AFTA, proofs of incorrectness are also useful for ruling out many other spurious programs. We implement these ideas in a framework called ool. We have used the BLAZE framework to build synthesizers for string and matrix transformations, and we compare BLAZE with existing techniques. Our results for the string domain show that BLAZE compares favorably with FlashFill, a domain-specific synthesizer that is now deployed in Microsoft PowerShell. In the context of matrix manipulations, we compare BLAZE against Prose, a state-of-the-art general-purpose VSA-based synthesizer, and show that BLAZE results in a 90x speed-up over Prose.
Motivation & Objective
- Address the scalability challenge in example-guided program synthesis due to massive search spaces.
- Reduce the search space by grouping programs with equivalent abstract semantics rather than concrete semantics.
- Develop a domain-agnostic synthesis framework that supports various DSLs through customizable semantics.
- Ensure correctness by iteratively refining abstractions using proofs of incorrectness for spurious programs.
- Achieve both soundness and completeness in synthesis while significantly improving performance over existing techniques.
Proposed method
- Use abstract finite tree automata (AFTA) to represent equivalence classes of programs based on their abstract semantics.
- Initialize synthesis with a coarse abstraction and construct an initial AFTA to represent programs with the same abstract behavior.
- Apply counterexample-guided abstraction refinement (CEGAR) by detecting spurious programs that satisfy examples under abstraction but not in concrete semantics.
- Construct proofs of incorrectness for spurious programs using symbolic execution and predicate strengthening to rule out not only the spurious program but also related ones.
- Refine the abstraction by extending the set of predicates used in the AFTA, ensuring the spurious program is excluded in the next iteration.
- Use a cost-based ranking function to prioritize program exploration, ensuring termination and completeness.
Experimental results
Research questions
- RQ1Can abstraction refinement significantly reduce the search space in program synthesis compared to concrete semantics?
- RQ2Can proofs of incorrectness be used not only to eliminate individual spurious programs but also to rule out entire classes of similar programs?
- RQ3Can a domain-agnostic framework based on AFTA and CEGAR achieve both soundness and completeness in program synthesis?
- RQ4How does the performance of abstraction-based synthesis compare to state-of-the-art tools like FlashFill and Prose in practical domains?
- RQ5Can the method scale effectively to complex domains such as matrix transformations, where existing tools face performance bottlenecks?
Key findings
- Blaze, the implementation of SYNGAR, achieves a 90x speedup over Prose, a state-of-the-art VSA-based synthesizer, in matrix manipulation tasks.
- In the string transformation domain, Blaze outperforms FlashFill, a widely deployed synthesizer in Microsoft PowerShell, by at least an order of magnitude.
- SYNGAR consistently improves performance over two other existing techniques by at least an order of magnitude across both string and matrix domains.
- The method is sound and complete: if a correct program exists, SYNGAR will eventually find it by iteratively refining abstractions.
- Proofs of incorrectness are effective not only in eliminating the specific spurious program but also in excluding many other programs with similar abstract behavior.
- The use of abstract finite tree automata enables efficient representation and refinement of program equivalence classes, drastically reducing the number of programs explored.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.