MCPcopy Index your code
hub / github.com/Bastacyclop/egg-sketches

github.com/Bastacyclop/egg-sketches @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
116 symbols 276 edges 15 files 11 documented · 9% updated 9mo ago★ 32
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Sketches for egg

Main branch docs

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 Guided Equality Saturation, a semi-automatic technique that allows programmers to guide rewriting with, for example, program sketches.

Please cite our paper if you use this repository for your research!

BibTeX

<code><pre>@article{2024-guided-eqsat,

author = {Koehler, Thomas and Goens, Andr\'{e}s and Bhat, Siddharth and Grosser, Tobias and Trinder, Phil and Steuwer, Michel}, title = {Guided Equality Saturation}, year = {2024}, issue_date = {January 2024}, publisher = {Association for Computing Machinery}, address = {New York, NY, USA}, volume = {8}, number = {POPL}, url = {https://doi.org/10.1145/3632900}, doi = {10.1145/3632900}, journal = {Proc. ACM Program. Lang.}, month = {jan}, articleno = {58}, numpages = {32}, keywords = {theorem provers, e-graphs, equality saturation, optimizing compilers} }

Running tests

make test

Running benchmarks

./bench/tiling.sh
./bench/math.sh
./bench/plot.sh

Extension points exported contracts — how you extend this code

SemiLatticeAnalysis (Interface)
(no doc) [6 implementers]
src/analysis.rs

Core symbols most depended-on inside this repo

children
called by 22
src/sketch.rs
add
called by 21
src/hashcons.rs
extend
called by 17
src/analysis.rs
insert
called by 14
src/analysis.rs
comparing_eclass_extract_sketch
called by 12
src/util.rs
satisfies_sketch
called by 7
src/extract.rs
one_shot_analysis
called by 7
src/analysis.rs
common_rules
called by 4
examples/bench_tiling.rs

Shape

Function 76
Method 25
Class 10
Enum 4
Interface 1

Languages

Rust95%
Python5%

Modules by API surface

src/extract.rs17 symbols
examples/bench_tiling.rs17 symbols
examples/bench_math_sketch.rs15 symbols
tests/math-sketch.rs14 symbols
src/analysis.rs11 symbols
src/sketch.rs10 symbols
tests/maps.rs9 symbols
tests/boolean-algebra.rs6 symbols
bench/plot.py5 symbols
src/hashcons.rs4 symbols
src/util.rs3 symbols
src/recursive_extract.rs2 symbols

For agents

$ claude mcp add egg-sketches \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact