3
0
Fork 0
mirror of https://github.com/YosysHQ/sby.git synced 2025-04-22 21:05:30 +00:00

Merge pull request #147 from jix/smtbmc-keepgoing

Support and tests for smtbmc `--keep-going`
This commit is contained in:
Jannis Harder 2022-03-30 11:42:48 +02:00 committed by GitHub
commit 81e8b6737b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 192 additions and 2 deletions

View file

@ -31,11 +31,12 @@ def run(mode, task, engine_idx, engine):
progress = False
basecase_only = False
induction_only = False
keep_going = False
random_seed = None
task.precise_prop_status = True
opts, args = getopt.getopt(engine[1:], "", ["nomem", "syn", "stbv", "stdt", "presat",
"nopresat", "unroll", "nounroll", "dumpsmt2", "progress", "basecase", "induction", "seed="])
"nopresat", "unroll", "nounroll", "dumpsmt2", "progress", "basecase", "induction", "keep-going", "seed="])
for o, a in opts:
if o == "--nomem":
@ -66,6 +67,10 @@ def run(mode, task, engine_idx, engine):
if basecase_only:
task.error("smtbmc options --basecase and --induction are exclusive.")
induction_only = True
elif o == "--keep-going":
if mode not in ("bmc", "prove", "prove_basecase", "prove_induction"):
task.error("smtbmc option --keep-going is only supported in bmc and prove mode.")
keep_going = True
elif o == "--seed":
random_seed = a
else:
@ -126,6 +131,10 @@ def run(mode, task, engine_idx, engine):
smtbmc_opts.append("-c")
trace_prefix += "%"
if keep_going:
smtbmc_opts.append("--keep-going")
trace_prefix += "%"
if dumpsmt2:
smtbmc_opts += ["--dump-smt2", trace_prefix.replace("%", "") + ".smt2"]