Table of Contents
Fetching ...

EcoSearch: A Constant-Delay Best-First Search Algorithm for Program Synthesis

Théo Matricon, Nathanaël Fijalkow, Guillaume Lagarde

TL;DR

Eco Search addresses the efficiency bottleneck of best-first search in program synthesis by achieving constant delay between outputs under a pre-generation cost model. It introduces cost-tuple representations, per-non-terminal data structures, frugal expansion, and bucketing to enable bottom-up enumeration in exact cost order. The method outperforms prior approaches on standard DSL domains, solving more tasks in less time, with the bucketing variant offering additional practical gains. This work points toward scalable cost-guided synthesis on larger grammars and provides public code for replication.

Abstract

Many approaches to program synthesis perform a combinatorial search within a large space of programs to find one that satisfies a given specification. To tame the search space blowup, previous works introduced probabilistic and neural approaches to guide this combinatorial search by inducing heuristic cost functions. Best-first search algorithms ensure to search in the exact order induced by the cost function, significantly reducing the portion of the program space to be explored. We present a new best-first search algorithm called EcoSearch, which is the first constant-delay algorithm for pre-generation cost function: the amount of compute required between outputting two programs is constant, and in particular does not increase over time. This key property yields important speedups: we observe that EcoSearch outperforms its predecessors on two classic domains.

EcoSearch: A Constant-Delay Best-First Search Algorithm for Program Synthesis

TL;DR

Eco Search addresses the efficiency bottleneck of best-first search in program synthesis by achieving constant delay between outputs under a pre-generation cost model. It introduces cost-tuple representations, per-non-terminal data structures, frugal expansion, and bucketing to enable bottom-up enumeration in exact cost order. The method outperforms prior approaches on standard DSL domains, solving more tasks in less time, with the bucketing variant offering additional practical gains. This work points toward scalable cost-guided synthesis on larger grammars and provides public code for replication.

Abstract

Many approaches to program synthesis perform a combinatorial search within a large space of programs to find one that satisfies a given specification. To tame the search space blowup, previous works introduced probabilistic and neural approaches to guide this combinatorial search by inducing heuristic cost functions. Best-first search algorithms ensure to search in the exact order induced by the cost function, significantly reducing the portion of the program space to be explored. We present a new best-first search algorithm called EcoSearch, which is the first constant-delay algorithm for pre-generation cost function: the amount of compute required between outputting two programs is constant, and in particular does not increase over time. This key property yields important speedups: we observe that EcoSearch outperforms its predecessors on two classic domains.

Paper Structure

This paper contains 21 sections, 5 theorems, 16 equations, 4 figures, 10 algorithms.

Key Result

Lemma 1

There exists a constant $M \geq 0$ such that for any program $\textsc{p}$ we have $\textsc{cost-succ}(\textsc{p}) - \textsc{cost}(\textsc{p}) \leq M$.

Figures (4)

  • Figure 1: A simple DSL.
  • Figure 2: String manipulations from SyGuS using FlashFill's DSL
  • Figure 3: Integer List Manipulation using DeepCoder's DSL
  • Figure 4: Scaling against the three parameters: throughput and scaling laws.

Theorems & Definitions (7)

  • Lemma 1
  • Lemma 2
  • Theorem 1
  • Lemma 2
  • proof
  • Lemma 2
  • proof