mirror of
https://github.com/Z3Prover/z3
synced 2025-04-24 01:25:31 +00:00
fix detection of arithmetic operations
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
cc216f8cc3
commit
3548057bd1
5 changed files with 28 additions and 15 deletions
|
@ -1157,6 +1157,7 @@ namespace sat {
|
|||
}
|
||||
catch (const abort_solver &) {
|
||||
m_reason_unknown = "sat.giveup";
|
||||
IF_VERBOSE(SAT_VB_LVL, verbose_stream() << "(sat \"abort giveup\")\n";);
|
||||
return l_undef;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -328,6 +328,7 @@ namespace sat {
|
|||
if (!m_rlimit.inc()) {
|
||||
m_mc.reset();
|
||||
m_model_is_current = false;
|
||||
TRACE("sat", tout << "canceled\n";);
|
||||
throw solver_exception(Z3_CANCELED_MSG);
|
||||
}
|
||||
++m_num_checkpoints;
|
||||
|
@ -384,7 +385,7 @@ namespace sat {
|
|||
model_converter const & get_model_converter() const { return m_mc; }
|
||||
void flush(model_converter& mc) override { mc.flush(m_mc); }
|
||||
void set_model(model const& mdl);
|
||||
char const* get_reason_unknown() const { return m_reason_unknown.c_str(); }
|
||||
char const* get_reason_unknown() const override { return m_reason_unknown.c_str(); }
|
||||
bool check_clauses(model const& m) const;
|
||||
bool is_assumption(bool_var v) const;
|
||||
void set_activity(bool_var v, unsigned act);
|
||||
|
|
|
@ -50,6 +50,8 @@ namespace sat {
|
|||
// check satisfiability
|
||||
virtual lbool check(unsigned num_lits = 0, literal const* lits = nullptr) = 0;
|
||||
|
||||
virtual char const* get_reason_unknown() const { return "reason unavailable"; }
|
||||
|
||||
// add clauses
|
||||
virtual void add_clause(unsigned n, literal* lits, bool is_redundant) = 0;
|
||||
void add_clause(literal l1, literal l2, bool is_redundant) {
|
||||
|
|
|
@ -65,6 +65,7 @@ class sat_tactic : public tactic {
|
|||
TRACE("sat_dimacs", m_solver->display_dimacs(tout););
|
||||
dep2assumptions(dep2asm, assumptions);
|
||||
lbool r = m_solver->check(assumptions.size(), assumptions.c_ptr());
|
||||
TRACE("sat", tout << "result of checking: " << r << " " << m_solver->get_reason_unknown() << "\n";);
|
||||
if (r == l_false) {
|
||||
expr_dependency * lcore = nullptr;
|
||||
if (produce_core) {
|
||||
|
@ -198,6 +199,10 @@ public:
|
|||
proc.m_solver->collect_statistics(m_stats);
|
||||
throw tactic_exception(ex.msg());
|
||||
}
|
||||
catch (z3_exception& ex) {
|
||||
TRACE("sat", tout << ex.msg() << "\n";);
|
||||
throw;
|
||||
}
|
||||
TRACE("sat_stats", m_stats.display_smt2(tout););
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue