Generating variable names within rewrites #101
-
I want to generate new/fresh variable names within rewrite rules, but I'm not really sure how to go about it, any tips? |
Beta Was this translation helpful? Give feedback.
Answered by
Bastacyclop
Jun 23, 2021
Replies: 1 comment 6 replies
-
Hi @Kixiron, consider using something like DeBruijn indices instead of variable names if it makes sense for your language. Otherwise there is an example of generating fresh names deterministically in the lambda calculus test: https://github.com/egraphs-good/egg/blob/main/tests/lambda.rs#L153 |
Beta Was this translation helpful? Give feedback.
6 replies
Answer selected by
Kixiron
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi @Kixiron, consider using something like DeBruijn indices instead of variable names if it makes sense for your language.
Otherwise there is an example of generating fresh names deterministically in the lambda calculus test: https://github.com/egraphs-good/egg/blob/main/tests/lambda.rs#L153