Fix handling of `-sat` and `-unsat` options when the solver returns `unknown`.
authorAlberto Gonzalez <boqwxp@airmail.cc>
Wed, 1 Apr 2020 19:32:44 +0000 (19:32 +0000)
committerAlberto Gonzalez <boqwxp@airmail.cc>
Sat, 4 Apr 2020 22:13:26 +0000 (22:13 +0000)
passes/sat/qbfsat.cc

index 833cab167a3f2a8fc10daead60fb34c2613e6c9f..a16ee546f0e0ce80fe9a47575c83af12ac4257ee 100644 (file)
@@ -507,6 +507,8 @@ struct QbfSatPass : public Pass {
                        }
                        else if (!ret.unknown && !ret.sat && opt.sat)
                                log_cmd_error("expected problem to be SAT\n");
+                       else if (ret.unknown && (opt.sat || opt.unsat))
+                               log_cmd_error("expected problem to be %s\n", opt.sat? "SAT" : "UNSAT");
                } else {
                        specialize_from_file(module, opt.specialize_soln_file);
                        Pass::call(design, "opt_clean");