Initial support for the new smtbmc --keep-going option
authorJannis Harder <me@jix.one>
Mon, 21 Mar 2022 17:36:09 +0000 (18:36 +0100)
committerJannis Harder <me@jix.one>
Thu, 24 Mar 2022 15:57:16 +0000 (16:57 +0100)
So far this only passes on the option and adjusts the trace_prefix to
support multiple numbered traces. Further changes are needed to
correctly associate individual traces with the assertions failing in
that trace.

sbysrc/sby_engine_smtbmc.py

index 492e2a57f01a248c97ec39cb698bfc1b334c4de5..9b7ff2b8695921425e4892613d847719c67ee2c6 100644 (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"]