Migrate from egglog to apyds-egg support package - #8
Merged
Conversation
Co-authored-by: hzhangxyz <11623447+hzhangxyz@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Use apyds support package apyds-egg instead of egglog
Migrate from egglog to apyds-egg support package
Dec 22, 2025
hzhangxyz
approved these changes
Dec 22, 2025
hzhangxyz
approved these changes
Dec 22, 2025
Contributor
There was a problem hiding this comment.
Pull request overview
This PR successfully migrates the E-Graph implementation from the third-party egglog library to the native apyds-egg support package, simplifying the codebase and reducing dependencies.
Key changes:
- Dependency migration: replaced
egglog~=12.0.0andcloudpickle~=3.1.2withapyds-egg~=0.0.11 - Removed custom
EGraphTermencoding class and begin/pair pattern in favor of directapyds.Termusage - Explicit E-Graph operations: using
add(),merge(),find(), andrebuild()methods directly
Reviewed changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
pyproject.toml |
Updated dependencies: replaced egglog and cloudpickle with apyds-egg, upgraded apyds packages to 0.0.11 |
uv.lock |
Dependency lock file updated to reflect new package versions and removed unused dependencies |
ddss/egraph.py |
Removed EGraphTerm class; replaced with direct apyds.Term mapping; simplified API with explicit merge(), find(), and rebuild() calls; fixed get_equality() return type to bool |
ddss/egg.py |
Renamed method call from build_pairs() to rebuild() to match updated API |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replaces
egglogwithapyds-egg, the native E-Graph support package for the apyds deductive system.Changes
pyproject.tomlegglog~=12.0.0dependency withapyds-egg~=0.0.11ddss/egraph.pyEGraphTermclass and custom term encoding logic (begin/pair pattern)apyds.Termto E-Graph mapping viaadd()merge()+rebuild()for equality operationsfind()for canonical E-class lookupget_equality()return type:None→boolBefore/After
Net -17 lines. No changes required to
egg.pyorSearchclass.Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.