Skip to content

Serialize let bindings#701

Merged
saulshanabrook merged 10 commits intoegraphs-good:mainfrom
saulshanabrook:let-bindings-again
Oct 23, 2025
Merged

Serialize let bindings#701
saulshanabrook merged 10 commits intoegraphs-good:mainfrom
saulshanabrook:let-bindings-again

Conversation

@saulshanabrook
Copy link
Member

@saulshanabrook saulshanabrook commented Oct 9, 2025

Closes #376 by storing the let bindings on the serialized format.

This also will show them in the visualizer now:

cargo run -- tests/web-demo/eqsat-basic.egg --to-svg

eqsat-basic

Please review and merge egraphs-good/egraph-serialize#23 first and then I can update the dep here to pull from main.

Closes egraphs-good#376 by storing the let bindings on the serialized format.

This also will show them in the visualizer now
@codspeed-hq
Copy link

codspeed-hq bot commented Oct 9, 2025

CodSpeed Performance Report

Merging #701 will not alter performance

Comparing saulshanabrook:let-bindings-again (cc726e9) with main (5678c6c)1

Summary

✅ 20 untouched
⏩ 190 skipped2

Footnotes

  1. No successful run was found on main (cc726e9) during the generation of this report, so 5678c6c was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

  2. 190 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@saulshanabrook saulshanabrook marked this pull request as ready for review October 19, 2025 00:46
@saulshanabrook saulshanabrook requested a review from a team as a code owner October 19, 2025 00:46
@saulshanabrook saulshanabrook requested review from yihozhang and removed request for a team October 19, 2025 00:46
@saulshanabrook
Copy link
Member Author

This is now ready for review now that egraph-serialize has a new version.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR replaces the ignore_viz field with let_binding to properly serialize let bindings in the egraph output format, enabling them to be displayed in the visualizer.

Key Changes:

  • Renamed ignore_viz to let_binding throughout the codebase to better reflect its semantic purpose
  • Modified serialization logic to store let bindings as metadata on e-classes rather than filtering them out
  • Updated egraph-serialize dependency from git branch to version 0.3

Reviewed Changes

Copilot reviewed 5 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/ast/mod.rs Renamed ignore_viz field to let_binding in FunctionDecl struct and its constructors
src/ast/remove_globals.rs Updated field name from ignore_viz to let_binding for global removal logic
src/serialize.rs Refactored serialization to collect and store let bindings in class metadata instead of filtering them
src/typechecking.rs Updated field reference from ignore_viz to let_binding
Cargo.toml Changed egraph-serialize from git dependency to version 0.3

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@saulshanabrook
Copy link
Member Author

@codex review

Copy link
Collaborator

@yihozhang yihozhang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missed this PR, sorry!

This looks like a breaking change because the public field ignore_viz is renamed. Maybe we should find a way to track when a breaking change is introduced?

@saulshanabrook
Copy link
Member Author

This looks like a breaking change because the public field ignore_viz is renamed. Maybe we should find a way to track when a breaking change is introduced?

I added an entry to the changelog that makes it explicit it's breaking.

@saulshanabrook saulshanabrook merged commit 75be705 into egraphs-good:main Oct 23, 2025
22 checks passed
@saulshanabrook saulshanabrook deleted the let-bindings-again branch October 23, 2025 12:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Serialize let bindings

3 participants