Skip to content

Commit 6c2e36f

Browse files
Merge pull request #26 from metadsl/saulshanabrook-patch-1
Fix lambda example
2 parents 2c25972 + 1c331af commit 6c2e36f

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

python/egglog/examples/lambda.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -177,9 +177,11 @@ def assert_simplifies(left: BaseExpr, right: BaseExpr) -> None:
177177
Simplify and print
178178
"""
179179
with egraph:
180-
res = egraph.simplify(left, 30)
181-
print(f"{left}{res}")
182-
assert expr_parts(res) == expr_parts(right), f"{res} != {right}"
180+
egraph.register(left)
181+
egraph.run(30)
182+
res = egraph.extract(left)
183+
print(f"{left}{res}")
184+
egraph.check(eq(right).to(right))
183185

184186

185187
assert_simplifies((Term.val(Val(1))).eval(), Val(1))

0 commit comments

Comments
 (0)