Expand description
egg-sketches
is a library adding support for program sketches on top of the egg
(e-graphs good) library,
an e-graph library optimized for equality saturation.
Sketches are program patterns that are satisfied by a family of programs. They can also be seen as incomplete or partial programs as they can leave details unspecified.
This library is born from our paper on Sketch-Guided Equality Saturation, a semi-automatic technique that allows programmers to provide program sketches to guide rewriting.
If you’re new to egg
, e-graphs or equality saturation, the egg
tutorial is good to get started.
To see examples of how to use this sketch libary, you can look at the tests on Github.
Modules§
- recursive_
extract - Alternative recursive descent implementation of sketch extraction inspired from pattern matching. This is instead of the bottom-up e-class analysis approach.
- util
- Utility functions for integration tests and examples
Enums§
- Sketch
Node - The language of
Sketch
es.
Functions§
- eclass_
extract_ sketch - Returns the best program satisfying
s
according tocost_f
that is represented in theid
e-class ofegraph
, if it exists. - eclass_
satisfies_ sketch - Is the
id
e-class ofegraph
representing at least one program satisfyings
? - satisfies_
sketch - Returns the set of e-classes of
egraph
that represent at least one program satisfyings
.