<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>Syntax-Guided Synthesis with Counterexample-Guided E-graphs: A Work-in-Progress Report</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Guy Frankel</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Rudi Schneider</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Michel Steuwer</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Elizabeth Polgreen</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Technische Universität Berlin</institution>
          ,
          <addr-line>Berlin</addr-line>
          ,
          <country country="DE">Germany</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>University of Edinburgh</institution>
          ,
          <addr-line>Edinburgh</addr-line>
          ,
          <country country="UK">UK</country>
        </aff>
      </contrib-group>
      <pub-date>
        <year>2025</year>
      </pub-date>
      <fpage>77</fpage>
      <lpage>90</lpage>
      <abstract>
        <p>Program synthesis algorithms sufer serious scalability issues due to the exponential growth of the space of solutions as programs grow longer. A common way to tame this search space in programming-by-example is to use observational equivalence. In this work in progress report we discuss a method for using equivalence graphs (e-graphs) to lift observational equivalence to more general program synthesis problems. We first present a naive synthesis algorithm using an e-graph to perform bottom-up enumeration. We also propose an extension of e-graphs, using approximate equivalence guided by counterexamples. We evaluate a preliminary implementation of both approaches against a state-of-the-art solver, and further outline scope for improvements and further research.</p>
      </abstract>
      <kwd-group>
        <kwd>eol&gt;Program Synthesis</kwd>
        <kwd>Equivalence Graphs</kwd>
        <kwd>CEGIS</kwd>
        <kwd>Observational Equivalence</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. Introduction</title>
      <p>
        Given a grammar and a logical specification program synthesis methods attempt to find a program
within the grammar that satisfies the logical specification. Program synthesis is hard [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ] because it
requires a search over an intractable program space [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ].
      </p>
      <p>
        A common method used to reduce this intractable search space is Observational Equivalence [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ]. That
is, in bottom-up enumerative search, which iteratively constructs new programs by combining previously
generated programs, we can discard programs from the pool of programs used for construction if we
observe that they behave equivalently on the specification. This is extremely efective when the
specification is input-output examples, i.e., it reasons about a finite number of concrete values. For
instance, given the single input-output example 2 → 4; x+y and x*y are observationally equivalent
programs. However, showing that two programs are equivalent for a specification given as an arbitrary
ifrst order formula is significantly more challenging, and, as a result, equivalence has rarely been used
for pruning for synthesis with logical specifications reasoning about infinite domains.
      </p>
      <p>
        In this work, we leverage equivalence graphs (e-graphs) to lift equivalence based pruning to synthesis
with logical specifications over infinite domains. E-graphs are well suited to compactly storing large
sets of terms, and have been used for quantifier instantiation via e-matching [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ], learning program
optimizations [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ] and abstractions [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ], and synthesizing rewrite rules [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ]. In this work, we present
a synthesis algorithm that performs enumeration directly over an e-graph, eliminating the need to
enumerate spurious terms by fully leveraging the grouping of symbolically equivalent terms captured
by equality saturation. To the best of our knowledge, this is the first exploration of using e-graphs to
solve general purpose program synthesis problems.
      </p>
      <p>
        However, despite the compact representation aforded by e-graphs, the algorithm is still overwhelmed
by combinatorial explosion. In an attempt to overcome this, we use equivalence relations that only hold
under certain assumptions. A common method for synthesis over symbolic variables is
Counterexample Guided Inductive Synthesis [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ], CEGIS, whereby a synthesis phase enumerates through possible
candidate programs, which are passed to a verification oracle which either validates that the candidate
is a solution to the synthesis problem or returns a counterexample that invalidates the candidate. The
counterexamples are used to reduce the number of candidate solutions that need to be passed to the
verifier, as each candidate can be quickly tested against the counterexamples first. Inspired by this, we
present an algorithm that leverages counterexamples to generate counterexample e-graphs (CE-graphs),
which capture equivalence relations that hold true under the counterexample. These CE-graphs
allow us to aggressively prune the search space by discarding sets of programs that fail to satisfy each
counterexample, and use the counterexamples to guide the growth of new programs constructed using
recursive production rules to be only as deep as precisely needed by the counterexamples obtained so
far.
      </p>
      <sec id="sec-1-1">
        <title>1.1. Running Example</title>
        <p>In this work, we consider syntax-guided synthesis problems, where a logical specification is given
alongside a grammar expressing the space of possible solutions. An example is shown in Fig. 1, which
gives a specification for a program that computes the maximum of 3 numbers. In the worst case, a
traditional CEGIS loop would need to generate ∼ 50, 000, 000 programs before finding one that satisfies
the specification, with each of these needing to be checked against the counterexamples and a subset
needing to be checked over the whole specification. It is evident that some method to reduce the number
of programs generated is required in order to make such synthesis feasible.</p>
      </sec>
    </sec>
    <sec id="sec-2">
      <title>2. Preliminaries</title>
      <sec id="sec-2-1">
        <title>2.1. Syntax-Guided Synthesis</title>
        <p>
          A syntax-guided synthesis (SyGuS) [
          <xref ref-type="bibr" rid="ref9">9</xref>
          ]
problem consists of a context-free grammar, which
defines the search space of possible solutions,
and a logical specification. The task is to find a
function from within that search space that
satisfies the specification. First we define
contextfree grammars:
Definition 2.1 (Context-Free Grammar, CFG).
        </p>
        <p>A context-free grammar is a 4-tuple  =
(Ω , Σ , , ). Ω is a finite set of variables
also known as non-terminal symbols. Σ with
Σ ∩Ω = ∅ is called the set of terminal symbols or
alphabet.  ⊆ Ω × (Ω ∪ Σ) * is a finite relation
describing the production rules of the grammar.
 ∈ Ω is the start symbol of the grammar .
(set-logic LIA)
(synth-fun max3 ((x Int) (y Int) (z Int)) Int
((Start Int) (StartBool Bool))
((Start Int (x y z</p>
        <p>(ite StartBool Start Start)))
(StartBool Bool ((&gt;= Start Start)))))
(declare-var a Int)
(declare-var b Int)
(declare-var c Int)
(constraint (&gt;= (max3 a b c) a))
(constraint (&gt;= (max3 a b c) b))
(constraint (&gt;= (max3 a b c) c))
(constraint (or
(= a (max3 a b c))
(= b (max3 a b c))
(= c (max3 a b c))))
(check-synth)</p>
        <p>Given a context-free grammar  =
(Ω , Σ , , ) with ,  ∈ (Ω ∪Σ) * and (,  ) ∈
 we say that  yields  , written  →
 . We say that  derives  written  → *  if either  =  or  → 1 → . . .  →  for  ≥ 0.
Finally, we define the language of a grammar (which gives the space of possible solutions for our SyGuS
problem). ℒ = { ∈ Σ * |  → * }.</p>
        <p>Definition 2.2 (Syntax-Guided Synthesis). A syntax-guided synthesis problem is a 4-tuple ⟨ , , ,  ⟩,
where  is a context-free grammar,  is a first-order formula in the background theory  , and  is a
function symbol that occurs in . A valid solution to the SyGuS problem ⟨ , , ,  ⟩ is a function  such
that the formula [ / ] is  -valid, according to the background theory, and  ∈ ℒ .</p>
        <p>We use [/ ] to indicate the result of substituting the symbol  with a defined function  , and we
use ⃗ = 1, 2, . . . to represent the set of free (nullary) variables in .</p>
        <p>In this work, we assume the background theory is Linear Integer Arithmetic, and the grammar
contains one non-terminal symbol of type integer, and one non-terminal symbol of type bool.</p>
      </sec>
      <sec id="sec-2-2">
        <title>2.2. CounterExample Guided Inductive Synthesis</title>
        <p>The most common algorithm for solving program synthesis problems is CounterExample Guided
Inductive Synthesis, CEGIS, shown in Fig. 2.</p>
      </sec>
      <sec id="sec-2-3">
        <title>2.3. Equivalence Graphs</title>
        <p>
          The e-graph data structure captures symbolic equivalence between terms through equivalence relations
defined as rewrite rules. It also supports equality saturation; a non-destructive compositional method
for propagating equivalences [
          <xref ref-type="bibr" rid="ref13 ref14">13, 14</xref>
          ].
        </p>
        <p>In order to use e-graphs to express the space of possible solutions to a synthesis problem, let us first
map the production rules in our grammar into function symbols. Given a production rule  → ℎ,
where  ∈ Ω and ℎ ∈ (Ω ∪ Σ) * , we say the production rule is an -ary production rule if ℎ
contains  occurrences of a non-terminal symbol.</p>
        <p>Intuitively, an e-graph representing the space of terms within our context-free grammar can be given
as:
• A set of e-classes, which consist of groups of e-nodes determined to be equivalent terms in the
underlying language.
• An e-node is an -ary production rule  → ℎ from our grammar, with  associated child
eclasses. An e-node represents the set of terms obtained by substituting the non-terminal symbols
in ℎ with any node from within the corresponding child e-classes. An e-node representing
applications of  → ℎ is annotated with its corresponding non-terminal symbol .</p>
        <p>Given a synthesis problem ⟨, , ,  ⟩, we can define an e-graph which represents the space of
possible solutions as follows:
Definition 2.3 (e-graphs). An e-graph  is as a tuple ( , ∼=) where  is a set of terms in a ℒ , and
∼=⊂  ×  is an equivalence relation, such that, for any 1, 2 ∈  if (1, 2) ∈∼=, then 1 = 2 is  -valid.
Each term is annotated with its corresponding non-terminal symbol.</p>
        <p>Rewrite rules An e-graph is equipped with rewrite rules, that define the equivalence relation as
patterns of the form ℓ → . If a rewrite rule finds a term matching the pattern ℓ, it will create a e-node
representing the expression generated by the substitution defined by the rule. If the new e-node already
exists in the e-graph, the e-class of this node and the e-node representing the original term are merged,
otherwise the new e-node is added to the e-class of the original e-node. We assume that all rewrite
rules result in programs that abide by the syntactic restriction of the SyGuS problem, i.e., rewrite rules
cannot result in terms that are not contained within ℒ .</p>
        <p>For instance, take an e-graph of the term (+  ) with the rewrite rule (+ ? ?) → (× ? 2), where
? is a pattern that captures any term. The equivalence relation defines that (+ ? ?) ∼= (× ? 2).
Applying the rewrite will add the two new e-nodes required to represent (×  2) with the relevant
children, namely 2 and × , to the e-graph. Rewrite rules are applied until no further changes occur,
referred to as equality saturation.</p>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>3. Bottom-up Equivalence Graph Synthesis</title>
      <p>The first approach we present is a naive bottom-up enumerative algorithm using e-graphs to represent
and eficiently prune the pool of possible programs. This enables us to lift the notation of observational
equivalence, which has been used successfully to prune the search space of programs in
programmingby-example, to more general synthesis specifications.</p>
      <p>
        Bottom-up enumeration has been used as the synthesis phase in many CEGIS implementations [
        <xref ref-type="bibr" rid="ref12 ref15 ref9">15, 9,
12</xref>
        ]. It searches the space of solutions by growing a pool of programs from the grammar, starting with
the terminals in the language. At each iteration, new programs are constructed by combining programs
from the pool, using production rules from the grammar.
      </p>
      <p>
        The pool of programs grows exponentially large as the length of the programs increases. For
specifications over finite inputs, like programming-by-example, this exponential growth is tamed by observational
equivalence [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ]: if any programs in the pool behave the same on all inputs in the specification as others
in the pool, we can discard all but one of those programs. However, for specifications which contain
free variables that can take an infinite number of values, this equivalence check is expensive.
      </p>
      <sec id="sec-3-1">
        <title>3.1. Naive Bottom-up Enumeration with Equivalence Graphs</title>
        <p>In our approach, we lift this equivalence-based pruning to general synthesis specifications (even those
reasoning about infinite inputs), by using e-graphs to represent the pool of programs and eficiently
perform the equivalence check. The synthesis proceeds as follows:
Constructing the initial e-graph Given a syntax-guided synthesis problem ⟨, , ,  ⟩, we initially
construct an e-graph  = ( , ∼=), where  is the set of terms on ℒ that can be obtained from the
start symbol  with 1 derivation, and ∼= is initially empty.</p>
        <p>Equality saturation At the start of each growing iteration, we iteratively apply a set of rewrite rules
to saturation, adding equivalence relations to ∼=, and resulting in an e-graph where each e-class
represents groups of equivalent terms in the background theory. That is, for any two terms 1, 2 ∈ ,
(1, 2) ∈∼= implies that 1 = 2 is  -valid, according to the background theory  .
Checking the pool As before, we check the pool of programs against the counterexamples. However,
this time, instead of iteratively checking all programs, we instead iterate through the e-classes and
then extract and check the canonical form from each e-class.
Growing the e-graph Once we have checked all the e-classes in the pool, we grow the pool. To do
this, we add all terms to the e-graph that can be obtained by combining e-classes from  with a
single production rule from the grammar. By using e-classes to replace the non-terminal symbols in
the production rules instead of e-nodes, we tame the exponential growth of the search space.
The full algorithm is shown in Appendix A.1 - Algorithm 2, along with an algorithm showing standard
bottom-up enumeration, Algorithm 1.</p>
        <p>
          Optimizations: Since rewrite rules in e-graphs are non-destructive, i.e., e-nodes for both the left and
right hand side of the rule are retained within the e-graph, we implement two optimizations: First, before
adding a new program, during the growing phase, we check whether it already exists in a previously
explored e-class in  at a rewrite distance of one. This slows the growth of the program pool. Specifically,
we use compactive rewrites, whereby we do not add new e-nodes generated by rules and instead only
use them to merge e-classes already present in the e-graph, this ensures equality saturation does not
add unnecessary e-nodes. Additionally, when checking programs we use structural generalization,
described in [
          <xref ref-type="bibr" rid="ref15">15</xref>
          ]. This method removes the need to check spurious programs in the following way:
given a program  of the form ( ite c l r ) that has been invalidated by a counterexample that evaluated
c as true, structural generalization ensures that no other program of the form ( ite c l ?a) needs to
be checked, where we know the program will be invalidated by the counterexample, regardless of the
sub-program represented by the right-hand branch.
        </p>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>4. Synthesis using CounterExample Guided Equivalences</title>
      <p>Bottom-up enumeration with e-graphs significantly reduces the number of programs we have to send
to the verifier, but the program space still grows impractically large. For our second synthesis approach,
we introduce the notion of counterexample e-graphs, or CE-graphs, which capture the sets of programs
that behave equivalently under a given counterexample. We exploit CE-graphs for two purposes: firstly,
they enable us to prune the space of candidates using equivalence rules that are conditioned on the
counterexample; second, they allow us to guide the growth of the program pool, based on the needs of
the counterexamples obtained so far. In this section, we first define CE-graphs, and how to construct
them, before presenting a CE-graph based synthesis algorithm.</p>
      <sec id="sec-4-1">
        <title>4.1. Defining CE-graphs</title>
        <p>Recall that a counterexample ⃗ is an assignment to all the free variables ⃗ which caused a previous
candidate solution  * to violate the specification .</p>
        <p>Definition 4.1 (CE-graph). Given a counterexample ⃗, a counterexample e-graph is defined as ⃗ =
( ∼=⃗), where  is a set of terms in the language , and the congruence relation ∼=⃗ is defined such that,
for any two terms 1 ∼= 2 if and only if 1[⃗/⃗] = 2[⃗/⃗] is  -valid under the background theory  .</p>
        <p>Given a CE-graph, ⃗, we can now group the e-classes into invalid e-classes and valid e-classes. An
invalid e-class is an e-class that contains only programs that fail to satisfy the specification on the given
counterexample. A valid e-class is an e-class that contains only programs that satisfy the specification
for the given counterexample.</p>
      </sec>
      <sec id="sec-4-2">
        <title>4.2. Synthesis with CE-graphs</title>
        <p>Synthesis with CE-graphs proceeds through two stages: first, building the CE-graph, which allows us to
obtain an infinite set of terms which satisfy the specification under the current counterexample; second,
pruning the search space by joining the current CE-graph with the previously obtained CE-graphs. This
pruning restricts the set of infinite terms to only the depth required by the counterexamples obtained
so far. This implicit e-graph growth, achieved through counterexample guided rewrite rules, allows us
to avoid the explicit growth of the e-graph that is necessary in Section 3.</p>
        <p>As an overview, the synthesis proceeds as follows:
Initialization We initialise the algorithm by constructing a base e-graph, 0, which contains all
terminal symbols in , and an application of each production rule in , applied to all possible
terminal symbol combinations. We do this using bottom-up enumeration, as before, to a depth of 2.
We then select a term randomly from the e-graph, and pass this to the verifier. We assume this term
will fail verification, and a counterexample will be returned.</p>
        <p>Build Given a counterexample ⃗′, we build ⃗′ from 0. If the valid set of ⃗′ is empty, we grow 0,
adding one more layer of programs.</p>
        <p>Join Join the new CE-graph, ⃗′ to the previous ⃗, and set this to be the current CE-graph, i.e.,
⃗ = ⃗′ ⊔ ⃗. If this is the first CE-graph we have seen, simply set ⃗ = ⃗′.</p>
        <p>Verify Sample a program from the valid e-classes of ⃗, and pass this to the verifier. If it passes
verification, return this solution to the user. If it fails, return the counterexample to the Build step
and repeat.</p>
        <p>Pseudocode for the full algorithm is included in Appendix A.1, Algorithm 4. We will now discuss the
build and join phases in more detail.</p>
        <p>Building the CE-graph Given a counterexample, ⃗, we encode the counterexample equivalence
relation ∼=⃗ using a set of rewrites derived from the counterexample; for instance, given the
counterexample [ ↦→ 1,  ↦→ 0], we generate the rewrites such as (&gt;  ) → ⊤. For example, when considering
a grammar involving equivalence relations, we may generate the following rules:
• For each pair of variables in the assignment we have a set of rewrites for the lt, gt and eq
comparators.
• If the specific constants 0 and 1 are within the assignment, we define rewrite sets for assignments
that assign free variables to either.</p>
        <p>This allows us to construct the e-graph ⃗, as defined above, by applying these rewrite rules to
the base e-graph 0. Note that ∼=⃗ introduces recursive edges to the e-graph, efectively representing
infinite sets of terms that behave equivalently under the counterexample, as shown in Fig. 3.</p>
        <p>We test one term from each e-class against the current counterexample, and if [/, ⃗/⃗] = ⊤, we
mark the e-class as . If there are no valid terms, we grow the base e-graph by one iteration. The
pseudocode for building the CE-graph is in Appendix A.1 - Algorithm 3.</p>
        <p>Pruning via Join We note that any valid solution to the synthesis problem must be in a valid e-class
on every counterexample e-graph. Thus, by performing the join of the current counterexample e-graph
with the previous one, we can reduce our search space to only terms in the intersection of the valid
e-classes. Further optimisations of this join are possible, in which unnecessary e-nodes are removed,
however, our current implementation defines join as e-graph intersection, defined below:
Definition 4.2 (Join of CE-graph). Given two CE-graphs, ⃗1 = (⃗1 , ∼=⃗1 ) and ⃗2 = (⃗2 , ∼=⃗2 ), the
join of the two e-graphs, ⃗1 ⊔ ⃗2 is an e-graph ⃗1⊔⃗2 = (⃗1 ∩ ⃗2 , ∼=⃗1⊔⃗2 ), where (1, 2) ∈∼=⃗1⊔⃗2
⇐⇒ (1, 2) ∈∼=⃗1 ∧(1, 2) ∈∼=⃗2 .</p>
        <p>At each iteration, we join the most recent CE-graph to the CE-graph representing the current search
space, . The result of this join is then set to be the new . We then sample a program from
the valid e-class of  and send this to verification, repeating the loop.</p>
        <p>Note that this join discards equivalence relations that are not valid under both counterexamples,
efectively pruning the terms represented in the CE-graph by unrolling recursion not supported by all
counterexamples obtained so far.
Running Example: To more clearly describe the algorithm let us follow an example of a possible
path this method may take, visualised in Fig. 3. Assume that we are searching for a program that returns
the maximum of three values, as in Fig. 1. In line with the motivating example, the algorithm provides
a guess from the grammar’s terminal symbols, x, to which the oracle returns the counterexample,
⃗1 = [ ↦→ 1,  ↦→ 2,  ↦→ 0]. Using 0, a CE-graph ⃗1 is built rewrite rules derived from the
counterexample, including, but not limited to:</p>
        <p>(≥  ) → ⊥ (≥  ) → ⊤ (≥  ) → ⊥
(×  ?) → ? (×  ?) → 0  → 1</p>
        <p>We use ⃗1 to generate a new candidate which satisfies the specification for ⃗1, y. The counterexample
⃗2 = [ ↦→ 2,  ↦→ 1,  ↦→ 0] is returned and used to create ⃗2 . We then generate a new CE-graph,
 = ⃗1 ⊔ ⃗2 , representing the subset of ℒ that satisfies both ⃗1 and ⃗2. The remaining satisfying
terms in  are made up of those that compare  and , returning the largest of the two, for instance
( ite (&gt;= x y) x y). Providing this as a candidate yields ⃗3 = [ ↦→ 0,  ↦→ 1,  ↦→ 2], used to generate
 =  ⊔ ⃗3 . The satisfying terms in  now only contains terms that compare the three
variables and returns the largest of the three, the set of all satisfying terms.</p>
      </sec>
    </sec>
    <sec id="sec-5">
      <title>5. Evaluation</title>
      <p>
        We implement preliminary versions of both approaches. We use the rust egg crate [
        <xref ref-type="bibr" rid="ref13">13</xref>
        ] as our e-graph
data structure, and carry out validation using rust bindings to Z3 [
        <xref ref-type="bibr" rid="ref16">16</xref>
        ]. The e-graph in the naive
enumerator has 49 symbolically equivalent rewrites, the CE-graphs have an additional 44 conditional
rewrites. Both these sets of rewrites are incomplete. The current CE-graph method uses a total
e-graph intersection as the join, specifically the e-graph intersection defined in egg. We compare
against cvc5 [
        <xref ref-type="bibr" rid="ref17">17</xref>
        ], which implements synthesis via CEGIS, using various highly tuned enumerative
approaches for searching the grammar [
        <xref ref-type="bibr" rid="ref15">15</xref>
        ]. We use a set of benchmarks from the syntax-guided
synthesis competition [
        <xref ref-type="bibr" rid="ref18">18</xref>
        ]. Specifically, for this preliminary implementation, we consider benchmarks
in linear integer arithmetic, with a single invocation of each synthesis function and without using
defined functions within the grammar. We use a timeout of 1 minute.
      </p>
      <p>Performance: The results in Table 1 show that both e-graph based synthesis methods reduce the
number of candidate programs sent to the verifier substantially, which is to be expected. The naive
bottom-up enumerator solves fewer benchmarks than cvc5, but Fig. 4 shows the performance is
comparable with cvc5 on the ones it does solve, which is surprising given the highly preliminary nature
of our implementation. From Table 1 we see that the CE-graph approach does not outperform the naive
bottom-up method, which we hypothesize is due to an ineficient (for our purposes) implementation of
join, as well as an incomplete conditional rewrite rule set.</p>
      <sec id="sec-5-1">
        <title>Synthesiser</title>
        <p>Naive bottom-up e-graph
ce-graphs
CVC5</p>
      </sec>
      <sec id="sec-5-2">
        <title>Success</title>
      </sec>
      <sec id="sec-5-3">
        <title>Timeout</title>
      </sec>
      <sec id="sec-5-4">
        <title>Error</title>
      </sec>
      <sec id="sec-5-5">
        <title>Candidates checked Proportion of time in join</title>
        <p>78
54
87
70
85
61
9</p>
        <sec id="sec-5-5-1">
          <title>5.1. Limitations/Future Work:</title>
          <p>Completeness of rewrite rules: The set of rewrite rules we provide to both approaches is incomplete
(i.e., (1, 2) ∈∼=⃗⇒ 1[/⃗] = 2[/⃗], but 1[/⃗] = 2[/⃗] ⇏ (1, 2) ∈∼=⃗). For the naive
enumeration, this will result in checking more programs than necessary. For the CE-graph synthesis, incomplete
rewrite rules will result in more occasions where the valid set does not contain the valid solution and
we must explicitly grow the base e-graph. The rewrite rules are also written by hand. One possible
direction to explore is executing the terms on each counterexample, and using these results to infer
rewrite rules.
Generality: The current CE-graph synthesis formulation is biased towards solving benchmarks with
solutions that rely on comparators captured in our conditional rewrites. For other benchmarks, relying
on predefined rewrite rules may always be significantly less efective.</p>
          <p>
            Join Eficiency: As mentioned in Section 4.2, there is significant ineficiency in the CE-graph method
due to the ineficient implementation of join. Namely, that we calculate the join of all e-classes, including
terms that are not within the valid set. A more eficient CE-graph join, inspired by ideas from colored
e-graphs [
            <xref ref-type="bibr" rid="ref19">19</xref>
            ], should improve the performance of the synthesis approach.
          </p>
          <p>
            Counterexample Ordering: As with many synthesis approaches, the order that we encounter
counterexamples in can result in big variations in solving time, as this produces a diferent sequence of
CE-graphs. Determining the best counterexample is an open question in synthesis [
            <xref ref-type="bibr" rid="ref20">20</xref>
            ], but this question
appears to become even more critical when using CE-graph based synthesis.
          </p>
          <p>Soundness and Completeness Our approach is sound, in that any result that is returned is guaranteed
to be correct, provided the verifier is correct. It is not complete, and cannot be complete as the synthesis
problem in general is undecidable. However, if the grammar is restricted to one that expresses a finite
number of programs, it should be possible to provide guarantees that a program will be found.</p>
        </sec>
      </sec>
    </sec>
    <sec id="sec-6">
      <title>6. Related Work</title>
      <p>
        There are many approaches to pruning the search space in program synthesis, including using deductive
reasoning [
        <xref ref-type="bibr" rid="ref21 ref22">21, 22</xref>
        ], using divide and conquer to partition the search space [
        <xref ref-type="bibr" rid="ref12">12</xref>
        ], and all varieties of
machine-learning or probabilistic guided synthesis [
        <xref ref-type="bibr" rid="ref23 ref24">23, 24</xref>
        ]. We focus our related work discussion on
approaches using observational equivalence.
      </p>
      <p>
        Observational equivalence has been leveraged for programming by example by using finite tree
automata (FTA), in which each node contains all observationally equivalent programs with hyper-edges
representing productions rule applied to child nodes [
        <xref ref-type="bibr" rid="ref25 ref26 ref27">25, 26, 27</xref>
        ]. Our naive e-graph algorithm can be
viewed as a generalisation of uses of observational equivalence in FTAs.
      </p>
      <p>
        In SyMetric [
        <xref ref-type="bibr" rid="ref28">28</xref>
        ], observational equivalence was relaxed to observational similarity, used as an
approximate proxy of equivalence based on input-output examples.
      </p>
      <p>
        Equivalence abstraction in FTAs was introduced in the tool Blaze [
        <xref ref-type="bibr" rid="ref29">29</xref>
        ]. This algorithm uses abstract
semantics to generate abstract FTAs (AFTAs). For each failing candidate a proof of failure is generated
to refine the abstract semantics. The AFTA is then refined by splitting nodes into refined abstract
equivalences and a new candidate is generated. The CE-graph synthesis method develops on the ideas
in Blaze. Each CE-graphs represents some level of abstract equivalence relation, with the join operation
carrying out the refinement.
      </p>
      <p>
        Granularity of equivalence relations Extending the capabilities of e-graphs to represent multiple
levels of equivalence relations, as describe in our methods, has been explored. As eluded to in Section 5
colored e-graphs [
        <xref ref-type="bibr" rid="ref19">19</xref>
        ] permit a hierarchy of equivalences through hierarchical colored e-classes. Colored
e-graphs provides an eficient implementation of e-graphs that permit capturing equivalences of
eclasses under assumptions. Specifically, it provides a method that shares nodes instead of requiring the
generation of individual e-graphs for each assumption. This provides an eficient mechanism to find
terms that are equivalent under multiple assumptions. Additionally, work on contextual equalities and
contextual equality saturation [
        <xref ref-type="bibr" rid="ref30">30</xref>
        ] attempts to capture equality that is only true in sub-graphs. These
two methods closely align with the CE-graphs; the main exception is the introduction of edges being
between nodes and conditioned e-classes, in colored e-graphs, this would be synonymous with having
"colored edges" between e-nodes and colored e-classes. It is this feature of CE-graphs that permits their
compact representation of languages when the grammar’s free variables are substituted for concrete
values.
      </p>
    </sec>
    <sec id="sec-7">
      <title>7. Conclusions</title>
      <p>We have presented an approach to using e-graphs to eficiently represent and enumerate the space
of possible programs for general program synthesis. To the best of our knowledge, this is the first
approach to use e-graphs in this way. There are a number of limitations to our approach, yet, despite
this, it performs comparably to the state of the art on a small set of benchmarks. Given the intertwined
nature of synthesis, SMT solving, and e-graphs, we would welcome discussion with the community on
the directions this work should take next.</p>
    </sec>
    <sec id="sec-8">
      <title>Declaration on Generative AI</title>
      <p>The authors used Grammarly for grammar and spell-checking, and Claude to assist with the
implementation of the proposed algorithms. After using these tools, the authors reviewed and edited content as
needed and take full responsibility for the publication’s content.
Algorithm 1 Bottom-Up Enumerator
◁ Add all terminal symbols to the pool of programs
◁ Check against counterexamples
◁ iterate through production rules
◁ Build list of lists of possible operands
◁ iterate through symbols in RHS of rule
◁ If this is a nonterminal symbol</p>
      <p>◁ Get all of the same type as 
Algorithm 2 Naive Bottom-Up Enumeration using E-graph
1: procedure Enumerate(, , )
2:  ← BuildInitialGraph() ◁ Initial e-graph
3: while 1 do
4: for  ∈ GetEClasses() do ◁ Check for each new e-class against counterexamples
5:  ← Extract() ◁ Extract a canonical program from e-class
6: if ∀⃗ ∈ .(, ⃗) then
7: return 
8: end if
9: end for
10: for (, ) ∈  do ◁ iterate through production rules
11:  ← [] ◁ Build list of lists of possible operands
12: for  ∈  do ◁ iterate through symbols in RHS of rule
13: if  ∈ Ω then ◁ If this is a nonterminal symbol
14:  ← FilterEClasses(, ) ◁ Get all e-classes annotated with 
15:  ← [, ]
16: end if
17: for  ∈ CartesianProduct() do
18:  ← BuildProgram(, )
19: if !RewriteOnce() ∈  then ◁ Check if equivalent program exists in e-graph
by a single rewrite
20:  ← Add(, )
21: end if
22: end for
23: end for
24: end for
25:  ← EqualitySaturation()
26: end while
27: end procedure
Algorithm 3 Building a Conditioned E-Graph
1: procedure BuildCEGraph(0, , ⃗)
2:  ← ⊥
3: while not  do
4:  ← GenerateConRewrites(⃗)
5: ⃗ ← Run(0, )
6:  ← GetValid(⃗)
7: if  then
8: return ⃗
9: end if
10: 0 ← Enumerate(0)
11: end while
12: end procedure
◁ Generate rewrites conditioned on ⃗
◁ Run equality saturation with conditional rewrites
Algorithm 4 CE-Graph Synthesis
1: procedure CE-CEGIS(, )
2:  ← ∅
3: 0 ← InitialEGraph()
4:  ← ∅
5: Pick  * ∈ .Σ
6: while true do
7: if ∃ . ¬( * , ) then
8:  ←  ∪ {}
9: ⃗ ← BuildCEGraph(0, )
10:  ←  ⊔ ⃗
11: Pick  * ∈ { ∈  | (, )}
12: else
13: return  *
14: end if
15: end while
16: end procedure
◁ Set of counterexamples
◁ Initial e-graph built from the grammar</p>
      <p>◁ Choose an initial terminal symbol
◁ Join  with new conditioned e-graph</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>J.</given-names>
            <surname>Kim</surname>
          </string-name>
          , Program synthesis is
          <fpage>30</fpage>
          -complete,
          <source>arXiv preprint arXiv:2405.16997</source>
          (
          <year>2024</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>S.</given-names>
            <surname>Gulwani</surname>
          </string-name>
          ,
          <string-name>
            <given-names>O.</given-names>
            <surname>Polozov</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Singh</surname>
          </string-name>
          , et al.,
          <string-name>
            <surname>Program</surname>
            <given-names>synthesis</given-names>
          </string-name>
          ,
          <source>Foundations and Trends® in Programming Languages</source>
          <volume>4</volume>
          (
          <year>2017</year>
          )
          <fpage>1</fpage>
          -
          <lpage>119</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>A.</given-names>
            <surname>Albarghouthi</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Gulwani</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Z.</given-names>
            <surname>Kincaid</surname>
          </string-name>
          ,
          <article-title>Recursive program synthesis</article-title>
          , in: Computer Aided Verification: 25th International Conference, CAV 2013,
          <string-name>
            <given-names>Saint</given-names>
            <surname>Petersburg</surname>
          </string-name>
          , Russia,
          <source>July 13-19</source>
          ,
          <year>2013</year>
          . Proceedings 25, Springer,
          <year>2013</year>
          , pp.
          <fpage>934</fpage>
          -
          <lpage>950</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <surname>L. M. de Moura</surname>
            ,
            <given-names>N. S.</given-names>
          </string-name>
          <string-name>
            <surname>Bjørner</surname>
          </string-name>
          ,
          <article-title>Eficient e-matching for SMT solvers</article-title>
          ,
          <source>in: CADE</source>
          , volume
          <volume>4603</volume>
          of Lecture Notes in Computer Science, Springer,
          <year>2007</year>
          , pp.
          <fpage>183</fpage>
          -
          <lpage>198</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>P.</given-names>
            <surname>Panchekha</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Sanchez-Stern</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J. R.</given-names>
            <surname>Wilcox</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Z.</given-names>
            <surname>Tatlock</surname>
          </string-name>
          ,
          <article-title>Automatically improving accuracy for lfoating point expressions</article-title>
          , in: PLDI, ACM,
          <year>2015</year>
          , pp.
          <fpage>1</fpage>
          -
          <lpage>11</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>D.</given-names>
            <surname>Cao</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Kunkel</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Nandi</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Willsey</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Z.</given-names>
            <surname>Tatlock</surname>
          </string-name>
          ,
          <string-name>
            <surname>N.</surname>
          </string-name>
          <article-title>Polikarpova, babble: Learning better abstractions with e-graphs and anti-unification</article-title>
          ,
          <source>Proc. ACM Program. Lang</source>
          .
          <volume>7</volume>
          (
          <year>2023</year>
          )
          <fpage>396</fpage>
          -
          <lpage>424</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <given-names>C.</given-names>
            <surname>Nandi</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Willsey</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Zhu</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Y. R.</given-names>
            <surname>Wang</surname>
          </string-name>
          ,
          <string-name>
            <given-names>B.</given-names>
            <surname>Saiki</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Anderson</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Schulz</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Grossman</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Z.</given-names>
            <surname>Tatlock</surname>
          </string-name>
          ,
          <article-title>Rewrite rule inference using equality saturation</article-title>
          ,
          <source>Proc. ACM Program. Lang</source>
          .
          <volume>5</volume>
          (
          <issue>2021</issue>
          )
          <fpage>1</fpage>
          -
          <lpage>28</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <given-names>A.</given-names>
            <surname>Solar-Lezama</surname>
          </string-name>
          ,
          <string-name>
            <given-names>L.</given-names>
            <surname>Tancau</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Bodík</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S. A.</given-names>
            <surname>Seshia</surname>
          </string-name>
          ,
          <string-name>
            <given-names>V. A.</given-names>
            <surname>Saraswat</surname>
          </string-name>
          ,
          <article-title>Combinatorial sketching for ifnite programs</article-title>
          ,
          <source>in: Proceedings of the 12th International Conference on Architectural Support for Programming Languages and Operating Systems (ASPLOS)</source>
          , ACM Press,
          <year>2006</year>
          , pp.
          <fpage>404</fpage>
          -
          <lpage>415</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [9]
          <string-name>
            <given-names>R.</given-names>
            <surname>Alur</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Bodík</surname>
          </string-name>
          ,
          <string-name>
            <given-names>E.</given-names>
            <surname>Dallal</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Fisman</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Garg</surname>
          </string-name>
          , G. Juniwal,
          <string-name>
            <given-names>H.</given-names>
            <surname>Kress-Gazit</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Madhusudan</surname>
          </string-name>
          ,
          <string-name>
            <surname>M. M. K. Martin</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          <string-name>
            <surname>Raghothaman</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          <string-name>
            <surname>Saha</surname>
            ,
            <given-names>S. A.</given-names>
          </string-name>
          <string-name>
            <surname>Seshia</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          <string-name>
            <surname>Singh</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          <string-name>
            <surname>Solar-Lezama</surname>
            ,
            <given-names>E.</given-names>
          </string-name>
          <string-name>
            <surname>Torlak</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          <string-name>
            <surname>Udupa</surname>
          </string-name>
          ,
          <article-title>Syntax-guided synthesis</article-title>
          ,
          <source>in: Dependable Software Systems Engineering</source>
          , volume
          <volume>40</volume>
          <source>of NATO Science for Peace and Security Series</source>
          ,
          <string-name>
            <surname>D</surname>
          </string-name>
          : Information and
          <string-name>
            <given-names>Communication</given-names>
            <surname>Security</surname>
          </string-name>
          , IOS Press,
          <year>2015</year>
          , pp.
          <fpage>1</fpage>
          -
          <lpage>25</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          [10]
          <string-name>
            <given-names>R.</given-names>
            <surname>Alur</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Bodík</surname>
          </string-name>
          ,
          <string-name>
            <given-names>E.</given-names>
            <surname>Dallal</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Fisman</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Garg</surname>
          </string-name>
          , G. Juniwal,
          <string-name>
            <given-names>H.</given-names>
            <surname>Kress-Gazit</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Madhusudan</surname>
          </string-name>
          ,
          <string-name>
            <surname>M. M. K. Martin</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          <string-name>
            <surname>Raghothaman</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          <string-name>
            <surname>Saha</surname>
            ,
            <given-names>S. A.</given-names>
          </string-name>
          <string-name>
            <surname>Seshia</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          <string-name>
            <surname>Singh</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          <string-name>
            <surname>Solar-Lezama</surname>
            ,
            <given-names>E.</given-names>
          </string-name>
          <string-name>
            <surname>Torlak</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          <string-name>
            <surname>Udupa</surname>
          </string-name>
          ,
          <article-title>Syntax-guided synthesis</article-title>
          ,
          <source>in: Dependable Software Systems Engineering</source>
          , volume
          <volume>40</volume>
          <source>of NATO Science for Peace and Security Series</source>
          ,
          <string-name>
            <surname>D</surname>
          </string-name>
          : Information and
          <string-name>
            <given-names>Communication</given-names>
            <surname>Security</surname>
          </string-name>
          , IOS Press,
          <year>2015</year>
          , pp.
          <fpage>1</fpage>
          -
          <lpage>25</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          [11]
          <string-name>
            <given-names>A.</given-names>
            <surname>Reynolds</surname>
          </string-name>
          ,
          <string-name>
            <given-names>H.</given-names>
            <surname>Barbosa</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Nötzli</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C. W.</given-names>
            <surname>Barrett</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Tinelli</surname>
          </string-name>
          , cvc4sy:
          <article-title>Smart and fast term enumeration for syntax-guided synthesis</article-title>
          ,
          <source>in: CAV (2)</source>
          , volume
          <volume>11562</volume>
          of Lecture Notes in Computer Science, Springer,
          <year>2019</year>
          , pp.
          <fpage>74</fpage>
          -
          <lpage>83</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          [12]
          <string-name>
            <given-names>R.</given-names>
            <surname>Alur</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Radhakrishna</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Udupa</surname>
          </string-name>
          ,
          <article-title>Scaling enumerative program synthesis via divide and conquer</article-title>
          ,
          <source>in: TACAS (1)</source>
          , volume
          <volume>10205</volume>
          of Lecture Notes in Computer Science,
          <year>2017</year>
          , pp.
          <fpage>319</fpage>
          -
          <lpage>336</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          [13]
          <string-name>
            <given-names>M.</given-names>
            <surname>Willsey</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Nandi</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Y. R.</given-names>
            <surname>Wang</surname>
          </string-name>
          ,
          <string-name>
            <given-names>O.</given-names>
            <surname>Flatt</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Z.</given-names>
            <surname>Tatlock</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Panchekha</surname>
          </string-name>
          ,
          <article-title>Egg: Fast and extensible equality saturation</article-title>
          ,
          <source>Proceedings of the ACM on Programming Languages</source>
          <volume>5</volume>
          (
          <year>2021</year>
          )
          <fpage>1</fpage>
          -
          <lpage>29</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          [14]
          <string-name>
            <given-names>D.</given-names>
            <surname>Suciu</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Y. R.</given-names>
            <surname>Wang</surname>
          </string-name>
          ,
          <string-name>
            <surname>Y. Zhang,</surname>
          </string-name>
          <article-title>Semantic foundations of equality saturation</article-title>
          ,
          <source>arXiv preprint arXiv:2501.02413</source>
          (
          <year>2025</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          [15]
          <string-name>
            <given-names>A.</given-names>
            <surname>Reynolds</surname>
          </string-name>
          ,
          <string-name>
            <given-names>H.</given-names>
            <surname>Barbosa</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Nötzli</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C. W.</given-names>
            <surname>Barrett</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Tinelli</surname>
          </string-name>
          , cvc4sy:
          <article-title>Smart and fast term enumeration for syntax-guided synthesis</article-title>
          ,
          <source>in: CAV (2)</source>
          , volume
          <volume>11562</volume>
          of Lecture Notes in Computer Science, Springer,
          <year>2019</year>
          , pp.
          <fpage>74</fpage>
          -
          <lpage>83</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref16">
        <mixed-citation>
          [16]
          <string-name>
            <surname>L. M. de Moura</surname>
          </string-name>
          , N. Bjørner,
          <article-title>Z3: an eficient SMT solver</article-title>
          ,
          <source>in: TACAS</source>
          , volume
          <volume>4963</volume>
          of Lecture Notes in Computer Science, Springer,
          <year>2008</year>
          , pp.
          <fpage>337</fpage>
          -
          <lpage>340</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref17">
        <mixed-citation>
          [17]
          <string-name>
            <given-names>H.</given-names>
            <surname>Barbosa</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Barrett</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Brain</surname>
          </string-name>
          , G. Kremer,
          <string-name>
            <given-names>H.</given-names>
            <surname>Lachnitt</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Mann</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Mohamed</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Mohamed</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Niemetz</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Nötzli</surname>
          </string-name>
          , et al.,
          <article-title>cvc5: A versatile and industrial-strength smt solver</article-title>
          ,
          <source>in: International Conference on Tools and Algorithms for the Construction and Analysis of Systems</source>
          , Springer,
          <year>2022</year>
          , pp.
          <fpage>415</fpage>
          -
          <lpage>442</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref18">
        <mixed-citation>
          [18]
          <string-name>
            <surname>Sygus</surname>
            <given-names>competition</given-names>
          </string-name>
          , https://sygus.org/,
          <year>2019</year>
          . Accessed:
          <fpage>2021</fpage>
          -05-19.
        </mixed-citation>
      </ref>
      <ref id="ref19">
        <mixed-citation>
          [19]
          <string-name>
            <given-names>E.</given-names>
            <surname>Singher</surname>
          </string-name>
          ,
          <string-name>
            <surname>I. Shachar</surname>
          </string-name>
          , Easter egg:
          <article-title>Equality reasoning based on e-graphs with multiple assumptions</article-title>
          , in: FMCAD, TU Wien Academic Press,
          <year>2024</year>
          , pp.
          <fpage>70</fpage>
          -
          <lpage>83</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref20">
        <mixed-citation>
          [20]
          <string-name>
            <given-names>S.</given-names>
            <surname>Jha</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S. A.</given-names>
            <surname>Seshia</surname>
          </string-name>
          ,
          <article-title>Are there good mistakes? A theoretical analysis of CEGIS</article-title>
          , in: SYNT, volume
          <volume>157</volume>
          <source>of EPTCS</source>
          ,
          <year>2014</year>
          , pp.
          <fpage>84</fpage>
          -
          <lpage>99</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref21">
        <mixed-citation>
          [21]
          <string-name>
            <given-names>Y.</given-names>
            <surname>Feng</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Martins</surname>
          </string-name>
          ,
          <string-name>
            <given-names>O.</given-names>
            <surname>Bastani</surname>
          </string-name>
          ,
          <string-name>
            <surname>I. Dillig</surname>
          </string-name>
          ,
          <article-title>Program synthesis using conflict-driven learning</article-title>
          ,
          <source>in: PLDI, ACM</source>
          ,
          <year>2018</year>
          , pp.
          <fpage>420</fpage>
          -
          <lpage>435</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref22">
        <mixed-citation>
          [22]
          <string-name>
            <given-names>A.</given-names>
            <surname>Abate</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>David</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Kesseli</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Kroening</surname>
          </string-name>
          , E. Polgreen,
          <article-title>Counterexample guided inductive synthesis modulo theories</article-title>
          , in: International Conference on Computer Aided Verification, Springer,
          <year>2018</year>
          , pp.
          <fpage>270</fpage>
          -
          <lpage>288</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref23">
        <mixed-citation>
          [23]
          <string-name>
            <given-names>S.</given-names>
            <surname>Barke</surname>
          </string-name>
          ,
          <string-name>
            <given-names>H.</given-names>
            <surname>Peleg</surname>
          </string-name>
          ,
          <string-name>
            <given-names>N.</given-names>
            <surname>Polikarpova</surname>
          </string-name>
          ,
          <article-title>Just-in-time learning for bottom-up enumerative synthesis</article-title>
          ,
          <source>Proceedings of the ACM on Programming Languages</source>
          <volume>4</volume>
          (
          <year>2020</year>
          )
          <fpage>1</fpage>
          -
          <lpage>29</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref24">
        <mixed-citation>
          [24]
          <string-name>
            <given-names>W.</given-names>
            <surname>Lee</surname>
          </string-name>
          ,
          <string-name>
            <given-names>K.</given-names>
            <surname>Heo</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Alur</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Naik</surname>
          </string-name>
          ,
          <article-title>Accelerating search-based program synthesis using learned probabilistic models</article-title>
          ,
          <source>in: PLDI, ACM</source>
          ,
          <year>2018</year>
          , pp.
          <fpage>436</fpage>
          -
          <lpage>449</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref25">
        <mixed-citation>
          [25]
          <string-name>
            <given-names>X.</given-names>
            <surname>Wang</surname>
          </string-name>
          ,
          <string-name>
            <surname>I. Dillig</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Singh</surname>
          </string-name>
          ,
          <article-title>Synthesis of data completion scripts using finite tree automata</article-title>
          ,
          <source>Proceedings of the ACM on Programming Languages</source>
          <volume>1</volume>
          (
          <year>2017</year>
          )
          <fpage>1</fpage>
          -
          <lpage>26</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref26">
        <mixed-citation>
          [26]
          <string-name>
            <given-names>H.</given-names>
            <surname>Peleg</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Gabay</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Itzhaky</surname>
          </string-name>
          , E. Yahav,
          <article-title>Programming with a read-eval-synth loop</article-title>
          ,
          <source>Proceedings of the ACM on Programming Languages</source>
          <volume>4</volume>
          (
          <year>2020</year>
          )
          <fpage>1</fpage>
          -
          <lpage>30</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref27">
        <mixed-citation>
          [27]
          <string-name>
            <given-names>X.</given-names>
            <surname>Li</surname>
          </string-name>
          ,
          <string-name>
            <given-names>X.</given-names>
            <surname>Zhou</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Dong</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Y.</given-names>
            <surname>Zhang</surname>
          </string-name>
          ,
          <string-name>
            <given-names>X.</given-names>
            <surname>Wang</surname>
          </string-name>
          ,
          <article-title>Eficient bottom-up synthesis for programs with local variables</article-title>
          ,
          <source>Proceedings of the ACM on Programming Languages</source>
          <volume>8</volume>
          (
          <year>2024</year>
          )
          <fpage>1540</fpage>
          -
          <lpage>1568</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref28">
        <mixed-citation>
          [28]
          <string-name>
            <given-names>J.</given-names>
            <surname>Feser</surname>
          </string-name>
          ,
          <string-name>
            <surname>I. Dillig</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Solar-Lezama</surname>
          </string-name>
          ,
          <article-title>Metric program synthesis</article-title>
          ,
          <source>arXiv preprint arXiv:2206.06164</source>
          (
          <year>2022</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref29">
        <mixed-citation>
          [29]
          <string-name>
            <given-names>X.</given-names>
            <surname>Wang</surname>
          </string-name>
          ,
          <string-name>
            <surname>I. Dillig</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Singh</surname>
          </string-name>
          ,
          <article-title>Program synthesis using abstraction refinement</article-title>
          ,
          <source>Proceedings of the ACM on Programming Languages</source>
          <volume>2</volume>
          (
          <year>2017</year>
          )
          <fpage>1</fpage>
          -
          <lpage>30</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref30">
        <mixed-citation>
          [30]
          <string-name>
            <given-names>T.</given-names>
            <surname>Hou</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Laddad</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J. M.</given-names>
            <surname>Hellerstein</surname>
          </string-name>
          ,
          <article-title>Towards relational contextual equality saturation</article-title>
          ,
          <source>arXiv preprint arXiv:2507.11897</source>
          (
          <year>2024</year>
          ).
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>