Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@ren-zeng
Copy link
Contributor

This pull request address #26 by providing functionality to visualise e-graph using a consistent style with egglog. The main modified file is Dot.hs, which contains detailed haddock documentation.

Main usage:

  • the function toDotFile' allow user to customise how analysis and e-nodes are displayed as Text
  • the function toDotFile is a special default case for toDotFile' based on the Show instances

Notes for reviewer (@alt-romes):

  • The last commit is only for a minimal test of the visualisation, which generates the e-graph for SimpleSym test case at the root. Feel free to exclude or modify how this test should be integrated.
  • The visualisation has the same limitation with the egglog one, which is that self pointed edges (x -> e-class of x) are not pointing to the e-class boundary but a inner e-node. This is a known limitation of Graphviz pointed out in the rust implementation.
  • (A slight difference with egglog) The e-class clusters are filled with grey instead of being colorful. In egglog colours are used to distinguish the different types of terms. This is not very relevant for now but could be added in the future.

Copy link
Owner

@alt-romes alt-romes 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 @ren-zeng. Just a few notes about conditional compilation for the test but is ready otherwise.

@alt-romes
Copy link
Owner

alt-romes commented Oct 29, 2025

Could I ask you to rebase this PR on master please? I've pushed d177304 which should make CI run on your pull request. Thanks!

@alt-romes
Copy link
Owner

Could I ask you to rebase this PR on master please? I've pushed d177304 which should make CI run on your pull request. Thanks!

In fact, CI should also run with -f+vizdot.

I've pushed #41 to do this

@alt-romes
Copy link
Owner

Thanks for your work here. It is much appreciated. Since CI is Green now, I'll go ahead and merge it.

Feel free to open more tickets if you find issues with the library or if you have any question regarding its usability.
I'd be happy to help and look forward to seeing what is possible to build on top of hegg!

@alt-romes alt-romes merged commit 3c27078 into alt-romes:master Oct 29, 2025
3 checks passed
@ren-zeng
Copy link
Contributor Author

Thank you for guiding me through the process and everyone involved in this cool library :)

This was referenced Oct 29, 2025
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.

2 participants