You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Given an initial expression, I want to iterate over equivalent, larger expressions.
comm_monoid =@commutative_monoid (*) 1;
t =@theory a b c begin
a +0--> a
a --> a +0
a + b --> b + a
end
t = comm_monoid ∪ t
g =EGraph(:(x+1))
saturate!(g, t)
extract!(g, astsize)
Now (even though non-sensical in this example), I want to generate bigger expressions using, e.g., a --> a+0. How can I do that?
The e-graph only considers operations that were already in the original expression, i.e., +, but ignores all rules w.r.t. multiplication here, e.g. 1*x + 1.
Is there an existing implementation for iterating expressions of an e-graph?
The text was updated successfully, but these errors were encountered:
Note the cycle for example for eclass 4. The egraph is a compact representation of all possible expressions. Metatheory does not provide a way to enumerate all possible expressions from the egraph, but you could implement your own using e.g. breadth-first search starting with a root node.
Hey there,
Given an initial expression, I want to iterate over equivalent, larger expressions.
This returns the
EClasses
a --> a+0
. How can I do that?+
, but ignores all rules w.r.t. multiplication here, e.g.1*x + 1
.The text was updated successfully, but these errors were encountered: