mirror of
https://github.com/Z3Prover/z3
synced 2025-04-22 08:35:31 +00:00
don't add viable premises on decisions
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
a4e29ecd7e
commit
fc6e127cca
4 changed files with 13 additions and 10 deletions
|
@ -298,12 +298,16 @@ namespace polysat {
|
|||
return false;
|
||||
}
|
||||
|
||||
auto const& j = s.m_justification[v];
|
||||
|
||||
s.inc_activity(v);
|
||||
|
||||
m_vars.remove(v);
|
||||
|
||||
for (auto const& c : s.m_viable.get_constraints(v))
|
||||
insert(c);
|
||||
if (!j.is_decision()) {
|
||||
for (auto const& c : s.m_viable.get_constraints(v))
|
||||
insert(c);
|
||||
}
|
||||
|
||||
for (auto* engine : ex_engines)
|
||||
if (engine->try_explain(v, *this))
|
||||
|
@ -318,7 +322,7 @@ namespace polysat {
|
|||
break;
|
||||
}
|
||||
set_bailout();
|
||||
if (s.is_assigned(v) && s.m_justification[v].is_decision())
|
||||
if (s.is_assigned(v) && j.is_decision())
|
||||
m_vars.insert(v);
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -50,7 +50,6 @@ namespace polysat {
|
|||
m_branch_bool = m_params.get_bool("branch_bool", false);
|
||||
m_max_conflicts = m_params.get_uint("max_conflicts", UINT_MAX);
|
||||
m_max_decisions = m_params.get_uint("max_decisions", UINT_MAX);
|
||||
std::cout << m_max_conflicts << "\n";
|
||||
}
|
||||
|
||||
bool solver::should_search() {
|
||||
|
|
|
@ -278,7 +278,6 @@ namespace polysat {
|
|||
}
|
||||
|
||||
bool viable::resolve(pvar v, conflict& core) {
|
||||
std::cout << "resolve " << v << "\n";
|
||||
if (has_viable(v))
|
||||
return false;
|
||||
auto* e = m_viable[v];
|
||||
|
|
|
@ -18,8 +18,7 @@ namespace polysat {
|
|||
|
||||
public:
|
||||
scoped_solver(std::string name): solver(lim), m_name(name) {
|
||||
std::cout << "\n\n\n" << std::string(78, '#') << "\n";
|
||||
std::cout << "\nSTART: " << m_name << "\n";
|
||||
LOG("\n\n\n" << std::string(78, '#') << "\n\nSTART: " << m_name << "\n");
|
||||
params_ref p;
|
||||
p.set_uint("max_conflicts", 10);
|
||||
updt_params(p);
|
||||
|
@ -27,11 +26,10 @@ namespace polysat {
|
|||
|
||||
void check() {
|
||||
m_last_result = check_sat();
|
||||
std::cout << m_name << ": " << m_last_result << "\n";
|
||||
LOG(m_name << ": " << m_last_result << "\n");
|
||||
statistics st;
|
||||
collect_statistics(st);
|
||||
std::cout << st << "\n";
|
||||
std::cout << *this << "\n";
|
||||
LOG(st << "\n" << *this << "\n");
|
||||
}
|
||||
|
||||
void expect_unsat() {
|
||||
|
@ -1068,6 +1066,9 @@ namespace polysat {
|
|||
void tst_polysat() {
|
||||
|
||||
|
||||
polysat::test_l5();
|
||||
return;
|
||||
|
||||
polysat::test_ineq_basic6();
|
||||
|
||||
// polysat::test_monot_bounds(8);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue