🤖 AI Summary
This work addresses the problem of program synthesis in domain-specific languages (DSLs) that involve numeric constants and require optimization of quantitative objectives such as accuracy. The authors propose a provably optimal search method that constructs a search graph over program subsets and integrates A* search with a heuristic derived from abstract interpretation to efficiently prune suboptimal subtrees. The key innovation lies in the design of abstract transformers tailored to DSL components with monotonic semantics, enabling a pruning mechanism that guarantees optimality. Experimental evaluation on two real-world DSLs demonstrates that the approach substantially outperforms existing state-of-the-art synthesizers, achieving significant improvements in scalability while maintaining correctness and optimality guarantees.
📝 Abstract
We consider the problem of synthesizing programs with numerical constants that optimize a quantitative objective, such as accuracy, over a set of input-output examples. We propose a general framework for optimal synthesis of such programs in a given domain specific language (DSL), with provable optimality guarantees. Our framework enumerates programs in a general search graph, where nodes represent subsets of concrete programs. To improve scalability, it uses A * search in conjunction with a search heuristic based on abstract interpretation; intuitively, this heuristic establishes upper bounds on the value of subtrees in the search graph, enabling the synthesizer to identify and prune subtrees that are provably suboptimal. In addition, we propose a natural strategy for constructing abstract transformers for monotonic semantics, which is a common property for components in DSLs for data classification. Finally, we implement our approach in the context of two such existing DSLs, demonstrating that our algorithm is more scalable than existing optimal synthesizers.