int32_t MinisatSatSolver::getDecisionLevel(SatVariable v) const
{
- return d_minisat->level(v);
+ return d_minisat->level(v) + d_minisat->user_level(v);
}
int32_t MinisatSatSolver::getIntroLevel(SatVariable v) const
bool isDecision(SatVariable decn) const override;
+ /** Return decision level at which `lit` was decided on. */
int32_t getDecisionLevel(SatVariable v) const override;
+ /**
+ * Return user level at which `lit` was introduced.
+ *
+ * Note: The user level is tracked independently in the SAT solver and does
+ * not query the user-context for the user level. The user level in the SAT
+ * solver starts at level 0 and does not include the global push/pop in
+ * the SMT engine.
+ */
int32_t getIntroLevel(SatVariable v) const override;
- /** Retrieve a pointer to the unerlying solver. */
+ /** Retrieve a pointer to the underlying solver. */
Minisat::SimpSolver* getSolver() { return d_minisat; }
/** Retrieve the proof manager of this SAT solver. */
bool isDecision(Node lit) const;
/**
- * Return the current decision level of `lit`.
+ * Return SAT context level at which `lit` was decided on.
*
* @param lit: The node in question, must have an associated SAT literal.
* @return Decision level of the SAT variable of `lit` (phase is disregarded),
* using assumptions.
*/
if (options::bvAssertInput() && val.isSatLiteral(fact)
- && !val.isDecision(fact) && val.getDecisionLevel(fact) == 0
- && val.getIntroLevel(fact) == 0)
+ && val.getDecisionLevel(fact) == 0 && val.getIntroLevel(fact) == 0)
{
+ Assert(!val.isDecision(fact));
d_bbInputFacts.push_back(fact);
}
else
bool isDecision(Node lit) const;
/**
- * Return the current decision level of `lit`.
+ * Return SAT context level at which `lit` was decided on.
*
* @param lit: The node in question, must have an associated SAT literal.
* @return Decision level of the SAT variable of `lit` (phase is disregarded),
regress0/issue5743.smt2
regress0/issue5947.smt2
regress0/issue6605-2-abd-triv.smt2
+ regress0/issue6738.smt2
regress0/issue6741.smt2
regress0/ite_arith.smt2
regress0/ite_real_int_type.smtv1.smt2
--- /dev/null
+; COMMAND-LINE: -i --bv-solver=bitblast --bv-assert-input
+(set-logic QF_BV)
+(declare-fun N () Bool)
+(assert (not (= (_ bv1 1) (bvnot (ite N (_ bv1 1) (_ bv0 1))))))
+(push 1)
+(assert (not N))
+(set-info :status unsat)
+(check-sat)
+(pop 1)
+(set-info :status sat)
+(check-sat)
+