Skip to content

Commit 397cc9f

Browse files
committed
expose lazy_aig
1 parent 6ba926d commit 397cc9f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

aiger/aig.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -462,7 +462,7 @@ def sub(node):
462462
)
463463

464464

465-
def to_aig(circ, *, allow_lazy=True) -> AIG:
465+
def to_aig(circ, *, allow_lazy=False) -> AIG:
466466
if isinstance(circ, pathlib.Path) and circ.is_file():
467467
circ = parser.load(circ)
468468
elif isinstance(circ, str):
@@ -471,4 +471,7 @@ def to_aig(circ, *, allow_lazy=True) -> AIG:
471471
else:
472472
circ = parser.load(circ) # Assume it is a file path.
473473

474+
if allow_lazy and hasattr(circ, '.lazy_aig'):
475+
return circ.lazy_aig
476+
474477
return circ.aig # Extract AIG from potential wrapper.

0 commit comments

Comments
 (0)