create only a single bad when using pono solver; workaround for #137
authorN. Engelhardt <nak@symbioticeda.com>
Wed, 12 Jan 2022 12:18:54 +0000 (13:18 +0100)
committerN. Engelhardt <nak@symbioticeda.com>
Wed, 12 Jan 2022 12:18:54 +0000 (13:18 +0100)
sbysrc/sby_core.py
sbysrc/sby_engine_btor.py

index 372cc9b58a9e7b863b57c37343a5238046415967..f05b31d6a41094117f5341d70dc2d951c1ff440d 100644 (file)
@@ -449,6 +449,7 @@ class SbyTask:
                 print("dffunmap", file=f)
                 print("stat", file=f)
                 print("write_btor {}-i design_{m}.info design_{m}.btor".format("-c " if self.opt_mode == "cover" else "", m=model_name), file=f)
+                print("write_btor -s {}-i design_{m}_single.info design_{m}_single.btor".format("-c " if self.opt_mode == "cover" else "", m=model_name), file=f)
 
             proc = SbyProc(
                 self,
index bf9216b10f312a10963f0e04e10685fd113ed7b0..7985b3244934cb52182423f70e3c6d9f12821938 100644 (file)
@@ -153,7 +153,7 @@ def run(mode, task, engine_idx, engine):
                     task,
                     f"engine_{engine_idx}_{common_state.produced_cex}",
                     task.model("btor"),
-                    "cd {dir} ; btorsim -c --vcd engine_{idx}/trace{i}.vcd --hierarchical-symbols --info model/design_btor.info model/design_btor.btor engine_{idx}/trace{i}.wit".format(dir=task.workdir, idx=engine_idx, i=suffix),
+                    "cd {dir} ; btorsim -c --vcd engine_{idx}/trace{i}.vcd --hierarchical-symbols --info model/design_btor{s}.info model/design_btor{s}.btor engine_{idx}/trace{i}.wit".format(dir=task.workdir, idx=engine_idx, i=suffix, s='_single' if solver_args[0] == 'pono' else ''),
                     logfile=open(f"{task.workdir}/engine_{engine_idx}/logfile2.txt", "w")
                 )
                 proc2.output_callback = output_callback2
@@ -216,7 +216,7 @@ def run(mode, task, engine_idx, engine):
     proc = SbyProc(
         task,
         f"engine_{engine_idx}", task.model("btor"),
-        f"cd {task.workdir}; {solver_cmd} model/design_btor.btor",
+        f"cd {task.workdir}; {solver_cmd} model/design_btor{'_single' if solver_args[0]=='pono' else ''}.btor",
         logfile=open(f"{task.workdir}/engine_{engine_idx}/logfile.txt", "w")
     )