mirror of
https://github.com/Z3Prover/z3
synced 2026-06-05 08:30:50 +00:00
Merge pull request #8767 from Z3Prover/copilot/fix-ubv-to-int-bug
Fix intblast: assert ubv_to_int(compound) = translation equality
This commit is contained in:
commit
412c56ecc8
4 changed files with 44 additions and 4 deletions
|
|
@ -133,8 +133,26 @@ namespace intblast {
|
|||
return true;
|
||||
}
|
||||
|
||||
bool solver::add_bv2int_axioms() {
|
||||
auto const& bv2int = m_translator.bv2int();
|
||||
if (m_bv2int_qhead == bv2int.size())
|
||||
return false;
|
||||
ctx.push(value_trail(m_bv2int_qhead));
|
||||
for (; m_bv2int_qhead < bv2int.size(); ++m_bv2int_qhead) {
|
||||
app* e = bv2int[m_bv2int_qhead];
|
||||
expr_ref r(m_translator.translated(e), m);
|
||||
if (r.get() == e)
|
||||
continue;
|
||||
ctx.get_rewriter()(r);
|
||||
auto lit = ctx.mk_literal(m.mk_eq(e, r));
|
||||
ctx.mark_relevant(lit);
|
||||
add_unit(lit);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
bool solver::unit_propagate() {
|
||||
return add_bound_axioms() || add_predicate_axioms();
|
||||
return add_bound_axioms() || add_predicate_axioms() || add_bv2int_axioms();
|
||||
}
|
||||
|
||||
lbool solver::check_axiom(sat::literal_vector const& lits) {
|
||||
|
|
|
|||
|
|
@ -82,13 +82,14 @@ namespace intblast {
|
|||
|
||||
bool add_bound_axioms();
|
||||
bool add_predicate_axioms();
|
||||
bool add_bv2int_axioms();
|
||||
|
||||
euf::theory_var mk_var(euf::enode* n) override;
|
||||
|
||||
void add_value_plugin(euf::enode* n, model& mdl, expr_ref_vector& values);
|
||||
void add_value_solver(euf::enode* n, model& mdl, expr_ref_vector& values);
|
||||
|
||||
unsigned m_vars_qhead = 0, m_preds_qhead = 0;
|
||||
unsigned m_vars_qhead = 0, m_preds_qhead = 0, m_bv2int_qhead = 0;
|
||||
|
||||
|
||||
public:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue