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 2adc98a commit 0dbb348Copy full SHA for 0dbb348
python/egglog/egraph.py
@@ -1377,10 +1377,14 @@ def saturate(
1377
"""
1378
Saturate the egraph, running the given schedule until the egraph is saturated.
1379
It serializes the egraph at each step and returns a widget to visualize the egraph.
1380
+
1381
+ If an `expr` is passed, it's also extracted after each run and printed
1382
1383
from .visualizer_widget import VisualizerWidget
1384
1385
def to_json() -> str:
1386
+ if expr is not None:
1387
+ print(self.extract(expr), "\n")
1388
return self._serialize(**kwargs).to_json()
1389
1390
egraphs = [to_json()]
0 commit comments