mirror of
https://github.com/Z3Prover/z3
synced 2026-03-06 05:14:55 +00:00
Fix intblast ubv_to_int bug: add bv2int axioms for compound expressions
Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>
This commit is contained in:
parent
1b68ee5f30
commit
4860d57ae9
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