#include "base/configuration.h"
#include "base/configuration_private.h"
+#include "base/cvc4_check.h"
#include "base/exception.h"
#include "base/listener.h"
#include "base/modal_exception.h"
d_earlyTheoryPP(true),
d_globalNegation(false),
d_status(),
+ d_expectedStatus(),
d_replayStream(NULL),
d_private(NULL),
d_statisticsRegistry(NULL),
throw OptionException("argument to (set-info :status ..) must be "
"`sat' or `unsat' or `unknown'");
}
- d_status = Result(s, d_filename);
+ d_expectedStatus = Result(s, d_filename);
return;
}
throw UnrecognizedOptionException();
// Remember the status
d_status = r;
+ if (!d_expectedStatus.isUnknown() && !d_status.isUnknown()
+ && d_status != d_expectedStatus)
+ {
+ CVC4_FATAL() << "Expected result " << d_expectedStatus << " but got "
+ << d_status;
+ }
+ d_expectedStatus = Result();
setProblemExtended(false);
*/
Result d_status;
+ /**
+ * The expected status of the next satisfiability check.
+ */
+ Result d_expectedStatus;
+
/**
* The input file name (if any) or the name set through setInfo (if any)
*/
regress0/smt2output.smt2
regress0/smtlib/get-unsat-assumptions.smt2
regress0/smtlib/reason-unknown.smt2
+ regress0/smtlib/set-info-status.smt2
regress0/strings/bug001.smt2
regress0/strings/bug002.smt2
regress0/strings/bug612.smt2
(set-logic QF_UFBV)
(set-info :smt-lib-version 2.0)
(set-info :category "crafted")
-(set-info :status unsat)
(declare-fun v0 () (_ BitVec 4))
(declare-fun f ((_ BitVec 4)) (_ BitVec 4))
(declare-fun g ((_ BitVec 4)) (_ BitVec 4))
(set-logic QF_UFBV)
(set-info :smt-lib-version 2.0)
(set-info :category "crafted")
-(set-info :status unsat)
(declare-fun v0 () (_ BitVec 4))
(declare-fun f ((_ BitVec 4)) (_ BitVec 4))
(declare-fun g ((_ BitVec 4)) (_ BitVec 4))
; COMMAND-LINE: --finite-model-find
; EXPECT: unsat
(benchmark Isabelle
-:status sat
:logic AUFLIA
:extrasorts ( S1 S2 S3 S4 S5 S6 S7 S8 S9 S10 S11 S12 S13 S14 S15 S16 S17 S18 S19 S20 S21 S22 S23 S24 S25 S26 S27 S28 S29 S30 S31 S32 S33 S34 S35 S36 S37)
:extrafuns (
; COMMAND-LINE: --cbqi-bv --cbqi-bv-ineq=keep --no-cbqi-full
; EXPECT: unsat
(set-logic BV)
-(set-info :status sat)
(declare-fun a () (_ BitVec 8))
(assert (forall ((x (_ BitVec 8))) (not (= (bvxor x a) (bvmul a a)))))
; EXPECT: unsat
(set-logic QF_UFLIAFS)
-(set-info :status sat)
(declare-fun a () Int)
(declare-fun b () Int)
(declare-fun x () (Set Int))
--- /dev/null
+; EXPECT: (error "Cannot get an unsat core unless immediately preceded by UNSAT/VALID response.")
+; EXPECT: sat
+; EXPECT: sat
+; EXPECT: unsat
+; EXPECT-ERROR: Expected result unsat but got sat
+; ERROR-SCRUBBER: sed -e '/Fatal failure within.*/d'
+; EXIT: -6
+(set-option :incremental true)
+(set-option :produce-unsat-cores true)
+(set-logic QF_BV)
+(set-info :status unsat)
+(get-unsat-core)
+(set-info :status sat)
+(check-sat)
+(set-info :status sat)
+(check-sat)
+(push)
+(assert false)
+(check-sat)
+(pop)
+(set-info :status unsat)
+(check-sat)
; COMMAND-LINE: --cbqi-bv --cbqi-bv-ineq=keep --no-cbqi-full
; EXPECT: unsat
(set-logic BV)
-(set-info :status sat)
(declare-fun a () (_ BitVec 8))
(declare-fun b () (_ BitVec 8))
(declare-fun c () (_ BitVec 1))
; COMMAND-LINE:
; EXPECT: (not (>= (+ a (* (- 1) b)) 1))
(set-logic LIA)
-(set-info :status unsat)
(declare-fun a () Int)
(declare-fun b () Int)
(get-qe (exists ((x Int)) (and (<= a x) (<= x b))))