mirror of
https://github.com/Z3Prover/z3
synced 2025-04-29 11:55:51 +00:00
weed out some bugs, add more bv op support in intblast and polysat solvers
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
01e5d2dbf1
commit
e251b5e9d0
6 changed files with 132 additions and 63 deletions
|
@ -52,7 +52,7 @@ namespace polysat {
|
|||
}
|
||||
|
||||
bool solver::unit_propagate() {
|
||||
return m_core.propagate();
|
||||
return m_core.propagate() || propagate_delayed_axioms();
|
||||
}
|
||||
|
||||
sat::check_result solver::check() {
|
||||
|
@ -266,32 +266,6 @@ namespace polysat {
|
|||
|
||||
void solver::add_polysat_clause(char const* name, core_vector cs, bool is_redundant) {
|
||||
sat::literal_vector lits;
|
||||
signed_constraint sc;
|
||||
unsigned constraint_count = 0;
|
||||
for (auto e : cs) {
|
||||
if (std::holds_alternative<signed_constraint>(e)) {
|
||||
sc = *std::get_if<signed_constraint>(&e);
|
||||
constraint_count++;
|
||||
}
|
||||
}
|
||||
if (constraint_count == 1) {
|
||||
auto lit = ctx.mk_literal(constraint2expr(sc));
|
||||
svector<euf::enode_pair> eqs;
|
||||
for (auto e : cs) {
|
||||
if (std::holds_alternative<dependency>(e)) {
|
||||
auto d = *std::get_if<dependency>(&e);
|
||||
if (d.is_literal())
|
||||
lits.push_back(d.literal());
|
||||
else if (d.is_eq()) {
|
||||
auto [v1, v2] = d.eq();
|
||||
eqs.push_back({ var2enode(v1), var2enode(v2) });
|
||||
}
|
||||
}
|
||||
}
|
||||
ctx.propagate(lit, euf::th_explain::propagate(*this, lits, eqs, lit, nullptr));
|
||||
return;
|
||||
}
|
||||
|
||||
for (auto e : cs) {
|
||||
if (std::holds_alternative<dependency>(e)) {
|
||||
auto d = *std::get_if<dependency>(&e);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue