Replies: 3 comments 12 replies
-
|
Currently there isn't a built-in way to do it in egg. You can only extract one term from an e-class for a given cost function. You could certainly build something to sample terms from an e-class by selecting random "representative' e-nodes for each e-class. Care must be taken to avoid cycles though. Here's some code that helps you locate e-nodes that make cycles. |
Beta Was this translation helpful? Give feedback.
7 replies
-
|
I've personally implemented in a Scala port:
|
Beta Was this translation helpful? Give feedback.
3 replies
-
|
I don't unfortunately :(
Get Outlook for Android<https://aka.ms/AAb9ysg>
…________________________________
From: Sherbet Lemon ***@***.***>
Sent: Tuesday, November 1, 2022 9:59:11 PM
To: egraphs-good/egg ***@***.***>
Cc: Brando Miranda ***@***.***>; Mention ***@***.***>
Subject: Re: [egraphs-good/egg] Given an E-class, is it possible to sample a batch of equivalent terms from it? (Discussion #174)
@brando90<https://github.com/brando90> Hi, do you have any updates on this problem? I want to sample the equivalent terms too. Many thanks if you have any comments or suggestions.
—
Reply to this email directly, view it on GitHub<#174 (reply in thread)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AAOE6LTH4ZVIMNNHAKKUSM3WGHYJ7ANCNFSM5RSLBYRA>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I am interested to sample subset of terms from an e-class (in an E-graph). For example, in decreasing ast size/depth or even randomly. Is this possible? If yes how would one do it in egg?
Beta Was this translation helpful? Give feedback.
All reactions