Replies: 1 comment 1 reply
-
Hmm, I think it technically could be, but that doesn't strike me as a good use case for e-graphs. In code formatting, it's more about canonicalization rather than optimization: you know exactly how to format a given set of tokens, you don't need to search among many possibilities. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I was thinking about potential use-cases for
egg
and I was wondering whether or not it makes sense to you to make a code formatter based on it.It seems like it's kind of similar to an optimization problem: you're taking input tokens and generating replacements for those tokens, but instead of optimizing for AST-size, or operation expense, etc., you are optimizing for "prettiness".
Does that sound reasonable to you who actually know stuff about EGraphs, or is it maybe not the best use-case?
Beta Was this translation helpful? Give feedback.
All reactions