Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

abc: Support arbitrary prep abc commands #274

Merged
merged 1 commit into from
Apr 24, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions sbysrc/sby_engine_abc.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,14 @@ def run(mode, task, engine_idx, engine):
if task.opt_aigfolds:
fold_command += " -s"

prep_commands = []

for i, arg in reversed(list(enumerate(engine[1:], 1))):
if arg.endswith(';'):
prep_commands = engine[1:i + 1]
engine[1:] = engine[i + 1:]
break

abc_command, custom_options, toggles = abc_getopt(engine[1:], [
"keep-going",
])
Expand Down Expand Up @@ -116,6 +124,8 @@ def run(mode, task, engine_idx, engine):
else:
task.error(f"Invalid ABC command {abc_command[0]}.")

abc_command[0:0] = prep_commands

smtbmc_vcd = task.opt_vcd and not task.opt_vcd_sim
run_aigsmt = smtbmc_vcd or (task.opt_append and task.opt_append_assume)
smtbmc_append = 0
Expand Down