Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Serialize edges to omitted nodes #394

Merged
merged 1 commit into from
Jul 23, 2024

Conversation

saulshanabrook
Copy link
Member

@saulshanabrook saulshanabrook commented Jul 15, 2024

Previously, if certain nodes were omitted due to size constraints in the serialization format, than they would not appear at all and the edge to them would be missing as well.

This was confusing, because then some functions would have the wrong number of arguments.

Now, if an edge points to an e-class where all nodes in that e-class were omitted, a dummy [...] node is added to that e-class so that they have something to point to.

Previously, we discussed implementing this change by modifying the serialization format to allow pointing to null node IDs as children. I went with this approach here, by just creating omitted dummy children, so you can still know the sort of the omitted node and if two nodes point to the same omitted e-class, that will also be visible.

Example of omitted node (from tests/combinators.svg produced by make graphs):

Screenshot 2024-07-15 at 9 08 09 AM

Previously, if certain nodes were omitted due to size constraints in the serialization format, than they would not appear at all and the edge to them would be missing as well.

This was confusing, because then some functions would have the wrong number of arguments.

Now, if an edge points to an e-class where all nodes in that e-class were omitted, a dummy `[...]` node is added to that e-class so that they have something to point to.

Previously, we discussed implementing this change by modifying the serialization format to allow pointing to `null` node IDs as children. I went with this approach here, by just creating omitted dummy children, so you can still know the sort of the omitted node and if two nodes point to the same omitted e-class, that will also be visible.
@saulshanabrook saulshanabrook requested a review from a team as a code owner July 15, 2024 13:17
@saulshanabrook saulshanabrook requested review from oflatt and removed request for a team July 15, 2024 13:17
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.

This looks great!

@yihozhang yihozhang linked an issue Jul 16, 2024 that may be closed by this pull request
@saulshanabrook saulshanabrook merged commit 6e70b79 into egraphs-good:main Jul 23, 2024
3 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.

Potential bug in dot file output
2 participants