We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2c25972 commit fc3a450Copy full SHA for fc3a450
python/egglog/examples/lambda.py
@@ -177,10 +177,11 @@ def assert_simplifies(left: BaseExpr, right: BaseExpr) -> None:
177
Simplify and print
178
"""
179
with egraph:
180
- res = egraph.simplify(left, 30)
181
- print(f"{left} ➡ {res}")
182
- assert expr_parts(res) == expr_parts(right), f"{res} != {right}"
183
-
+ egraph.register(left)
+ egraph.run(30)
+ res = egraph.extract(left)
+ print(f"{left} ➡ {res}")
184
+ egraph.check(eq(right).to(right))
185
186
assert_simplifies((Term.val(Val(1))).eval(), Val(1))
187
assert_simplifies((Term.val(Val(1)) + Term.val(Val(2))).eval(), Val(3))
0 commit comments