Skip to content

Commit 1dfdd1b

Browse files
intermediate debugging
1 parent 3d48888 commit 1dfdd1b

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

python/tests/test_unstable_fn.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -226,14 +226,14 @@ def call(f: Callable[[A], C]) -> C:
226226
return f(A())
227227

228228
@function
229-
def f(x: A) -> C:
229+
def fn(x: A) -> C:
230230
# Verify that inner variable is lifted to partial application in a rewrite like this
231231
def inner(_: A) -> C:
232232
return b_to_c(a_to_b(x))
233233

234234
return call(inner)
235235

236-
assert check_eq(f(A()), b_to_c(a_to_b(A())), run() * 10)
236+
assert check_eq(fn(A()), b_to_c(a_to_b(A())), run() * 10)
237237

238238
def test_rewrite_ruleset_used(self):
239239
"""
@@ -312,10 +312,13 @@ def apply_f(f: Callable[[A], A], x: A) -> A:
312312

313313
alt_a = constant("alt_a", A)
314314

315-
egraph = EGraph()
315+
egraph = EGraph(save_egglog_string=True)
316316
x = egraph.let("x", apply_f(lambda x: A(), A()))
317317
y = egraph.let("y", apply_f(lambda x: alt_a, A()))
318-
egraph.run(10)
318+
print(egraph.run(10))
319+
print(egraph.extract(x))
320+
print(egraph.as_egglog_string)
321+
egraph.display(n_inline_leaves=0)
319322
egraph.check(eq(x).to(A()))
320323
egraph.check(eq(y).to(alt_a))
321324

0 commit comments

Comments
 (0)