Skip to content

Add name to rewrite and birewrite commands#871

Merged
saulshanabrook merged 3 commits into
egraphs-good:mainfrom
kaeun97:kaeun97/rewrite-name
May 12, 2026
Merged

Add name to rewrite and birewrite commands#871
saulshanabrook merged 3 commits into
egraphs-good:mainfrom
kaeun97:kaeun97/rewrite-name

Conversation

@kaeun97
Copy link
Copy Markdown
Contributor

@kaeun97 kaeun97 commented May 12, 2026

Resolves #870

Key changes:

  • Added pub name: String field to GenericRewrite
  • Parse :name option on rewrite and birewrite (mirrors existing :name on rule)
  • When provided, the name is used as the desugared rule name

@kaeun97 kaeun97 requested a review from a team as a code owner May 12, 2026 00:56
@kaeun97 kaeun97 requested review from saulshanabrook and removed request for a team May 12, 2026 00:56
@kaeun97 kaeun97 changed the title Kaeun97/rewrite name Add name to rewrite and birewrite commands May 12, 2026
@kaeun97
Copy link
Copy Markdown
Contributor Author

kaeun97 commented May 12, 2026

Hey @saulshanabrook , hope you are doing well! Would appreciate your review on this. As a reminder, this was motivated here: egraphs-good/egglog-python#416. Thank you!

Copy link
Copy Markdown
Member

@saulshanabrook saulshanabrook left a comment

Choose a reason for hiding this comment

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

This looks great! Thank you so much for adding this feature :)

@codecov-commenter
Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 89.65517% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 87.17%. Comparing base (23dd731) to head (a98d965).

Files with missing lines Patch % Lines
src/ast/mod.rs 0.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #871      +/-   ##
==========================================
- Coverage   87.18%   87.17%   -0.01%     
==========================================
  Files          87       87              
  Lines       24933    24953      +20     
==========================================
+ Hits        21737    21754      +17     
- Misses       3196     3199       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@codspeed-hq
Copy link
Copy Markdown

codspeed-hq Bot commented May 12, 2026

Merging this PR will not alter performance

✅ 50 untouched benchmarks
⏩ 190 skipped benchmarks1


Comparing kaeun97:kaeun97/rewrite-name (a98d965) with main (23dd731)

Open in CodSpeed

Footnotes

  1. 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 merged commit 2e5657b into egraphs-good:main May 12, 2026
55 checks passed
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.

Add numeric name field to RewriteDecl and BiRewriteDecl

3 participants