This changes set defaults so that it doesn't silently disable proofs or unsat cores.
Fixes cvc5/cvc5-projects#440.
std::stringstream reasonNoProofs;
if (incompatibleWithProofs(opts, reasonNoProofs))
{
- opts.smt.unsatCores = false;
- opts.smt.unsatCoresMode = options::UnsatCoresMode::OFF;
- notifyModifyOption(
- "produceProofs and unsatCores", "false", reasonNoProofs.str());
- opts.smt.produceProofs = false;
- opts.smt.checkProofs = false;
- opts.smt.proofMode = options::ProofMode::OFF;
+ std::stringstream ss;
+ ss << reasonNoProofs.str() << " not supported with proofs or unsat cores";
+ throw OptionException(ss.str());
}
}
if (d_isInternalSubsolver)
-; COMMAND-LINE: --global-negate --no-check-unsat-cores
+; COMMAND-LINE: --global-negate
; EXPECT: unsat
+; DISABLE-TESTER: unsat-core
+; DISABLE-TESTER: proof
(set-logic LRA)
(set-info :status unsat)
(assert (not (exists ((?X Real)) (>= (/ (- 13) 4) ?X))))
; COMMAND-LINE: -q
; EXPECT: unsat
+; DISABLE-TESTER: unsat-core
+; DISABLE-TESTER: proof
(set-logic QF_UFNRA)
(set-option :nl-ext-purify true)
(set-option :sygus-inference true)
-; COMMAND-LINE:
+; DISABLE-TESTER: unsat-core
+; DISABLE-TESTER: proof
(set-logic HO_ALL)
(set-option :ag-miniscope-quant true)
(set-option :conjecture-gen true)
; EXPECT: unsat
; COMMAND-LINE: --sygus-inference -q
+; DISABLE-TESTER: unsat-core
+; DISABLE-TESTER: proof
(set-logic ALL)
(declare-fun v () Bool)
(assert false)
; EXPECT: unsat
; COMMAND-LINE: --sygus-inference --strings-exp -q
+; DISABLE-TESTER: unsat-core
+; DISABLE-TESTER: proof
(set-logic ALL)
(declare-fun a () String)
(declare-fun b () String)
; EXPECT: unsat
; COMMAND-LINE: --sygus-inference --fmf-bound
+; DISABLE-TESTER: unsat-core
+; DISABLE-TESTER: proof
(set-logic HO_ALL)
(declare-fun a () (_ BitVec 1))
(assert (bvsgt (bvsmod a a) #b0))
; EXPECT: unsat
; COMMAND-LINE: --sygus-inference --sygus-qe-preproc -q
+; DISABLE-TESTER: unsat-core
+; DISABLE-TESTER: proof
(set-logic ALL)
(declare-fun a () Real)
(declare-fun b () Real)
+; DISABLE-TESTER: unsat-core
+; DISABLE-TESTER: proof
(set-logic ALL)
(set-option :sygus-inference true)
(set-option :sygus-simple-sym-break none)
; COMMAND-LINE: -q
; EXPECT: unsat
+; DISABLE-TESTER: unsat-core
+; DISABLE-TESTER: proof
(set-logic ALL)
(set-option :miniscope-quant true)
(set-option :sygus-inference true)
; COMMAND-LINE: -q
; EXPECT: unsat
+; DISABLE-TESTER: unsat-core
+; DISABLE-TESTER: proof
(set-logic ALL)
(set-option :sygus-inference true)
(set-info :status unsat)
ASSERT_NO_THROW(slv.simplify(t54));
}
+TEST_F(TestApiBlackSolver, proj_issue440)
+{
+ Solver slv;
+ slv.setLogic("QF_ALL");
+ slv.setOption("global-negate", "true");
+ slv.setOption("produce-unsat-cores", "true");
+ Sort s1 = slv.getBooleanSort();
+ Term t9 = slv.mkBoolean(true);
+ Term t109 = slv.mkTerm(Kind::NOT, {t9});
+ // should throw an option exception
+ ASSERT_THROW(slv.checkSatAssuming({t109}), CVC5ApiException);
+}
+
TEST_F(TestApiBlackSolver, proj_issue434)
{
Solver slv;