mirror of
https://github.com/Z3Prover/z3
synced 2025-04-22 00:26:38 +00:00
unsat core
This commit is contained in:
parent
509a007ed7
commit
fd353bff17
3 changed files with 11 additions and 2 deletions
|
@ -518,7 +518,7 @@ namespace polysat {
|
|||
break;
|
||||
case dd::find_t::empty:
|
||||
m_free_pvars.unassign_var_eh(v);
|
||||
// TODO: get unsat core from univariate solver
|
||||
auto core = m_viable_fallback.unsat_core(v); // TODO: add constraints from unsat_core to conflict
|
||||
set_conflict(v);
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -791,5 +791,14 @@ namespace polysat {
|
|||
return dd::find_t::empty;
|
||||
}
|
||||
}
|
||||
|
||||
signed_constraints viable_fallback::unsat_core(pvar v) {
|
||||
signed_constraints cs;
|
||||
for (unsigned dep : m_usolver[v]->unsat_core()) {
|
||||
cs.push_back(m_constraints[v][dep]);
|
||||
}
|
||||
return cs;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -211,7 +211,7 @@ namespace polysat {
|
|||
// bool check_value(pvar v, rational const& val);
|
||||
|
||||
dd::find_t find_viable(pvar v, rational& out_val);
|
||||
// TODO: get unsat core
|
||||
signed_constraints unsat_core(pvar v);
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue