Syntax-guided program synthesis relies on domain-specific languages (DSLs) to constrain the search space and improve efficiency. However, manually designing optimal DSLs is challenging and often results in suboptimal performance. In this paper, we propose AMAZE, a novel framework that automatically optimizes DSLs to accelerate synthesis. AMAZE iteratively refines a DSL by identifying key program fragments, termed feature components, whose enumeration ranks correlate with synthesis time. Using a dynamic-programming-based algorithm to calculate enumeration ranks of feature components and a machine learning model based on them, AMAZE estimates synthesis cost instead of directly invoking the synthesizer, which is impractical due to high computational cost. We evaluate AMAZE on state-of-the-art synthesizers, including DRYADSYNTH, DUET, POLYGEN, and EUsOLVER, across multiple domains. Empirical results demonstrate that AMAZE achieves up to 4.35x speedup, effectively reducing synthesis time while maintaining expressiveness.
更多
查看译文
关键词
Program Synthesis,Domain-Specific Languages,Optimization