mirror of
https://github.com/Z3Prover/z3
synced 2025-08-10 21:20:52 +00:00
fix bit2bool bug reported by Jianying Li
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
b533ba39d6
commit
0d400a5ad6
9 changed files with 49 additions and 20 deletions
|
@ -723,10 +723,11 @@ namespace smt {
|
|||
ineqs = alloc(ptr_vector<ineq>);
|
||||
m_var_infos[lit.var()].m_lit_watch[lit.sign()] = ineqs;
|
||||
}
|
||||
for (auto* c1 : *ineqs) {
|
||||
//if (c1 == c) return;
|
||||
SASSERT (c1 != c);
|
||||
}
|
||||
DEBUG_CODE(
|
||||
for (auto* c1 : *ineqs) {
|
||||
//if (c1 == c) return;
|
||||
SASSERT (c1 != c);
|
||||
});
|
||||
ineqs->push_back(c);
|
||||
}
|
||||
|
||||
|
|
|
@ -3495,12 +3495,11 @@ bool theory_seq::add_itos_val_axiom(expr* e) {
|
|||
}
|
||||
|
||||
bool theory_seq::add_stoi_val_axiom(expr* e) {
|
||||
context& ctx = get_context();
|
||||
expr* n = nullptr;
|
||||
rational val, val2;
|
||||
VERIFY(m_util.str.is_stoi(e, n));
|
||||
|
||||
TRACE("seq", tout << mk_pp(e, m) << " " << ctx.get_scope_level () << " " << get_length(n, val) << " " << val << "\n";);
|
||||
TRACE("seq", tout << mk_pp(e, m) << " " << get_context().get_scope_level () << " " << get_length(n, val) << " " << val << "\n";);
|
||||
|
||||
if (m_util.str.is_itos(n)) {
|
||||
return false;
|
||||
|
@ -3951,7 +3950,6 @@ model_value_proc * theory_seq::mk_value(enode * n, model_generator & mg) {
|
|||
|
||||
app* theory_seq::mk_value(app* e) {
|
||||
expr_ref result(m);
|
||||
context& ctx = get_context();
|
||||
e = get_ite_value(e);
|
||||
result = m_rep.find(e);
|
||||
|
||||
|
@ -4705,7 +4703,6 @@ bool theory_seq::lower_bound2(expr* _e, rational& lo) {
|
|||
|
||||
|
||||
bool theory_seq::get_length(expr* e, rational& val) const {
|
||||
context& ctx = get_context();
|
||||
rational val1;
|
||||
expr_ref len(m), len_val(m);
|
||||
expr* e1 = nullptr, *e2 = nullptr;
|
||||
|
|
|
@ -1682,10 +1682,10 @@ namespace smt {
|
|||
expr_ref i1(mk_int_var("i1"), m);
|
||||
expr_ref result(mk_str_var("result"), m);
|
||||
|
||||
expr * replaceS;
|
||||
expr * replaceT;
|
||||
expr * replaceTPrime;
|
||||
u.str.is_replace(ex, replaceS, replaceT, replaceTPrime);
|
||||
expr * replaceS = nullptr;
|
||||
expr * replaceT = nullptr;
|
||||
expr * replaceTPrime = nullptr;
|
||||
VERIFY(u.str.is_replace(ex, replaceS, replaceT, replaceTPrime));
|
||||
|
||||
// t empty => result = (str.++ t' s)
|
||||
expr_ref emptySrcAst(ctx.mk_eq_atom(replaceT, mk_string("")), m);
|
||||
|
@ -4851,6 +4851,7 @@ namespace smt {
|
|||
bool theory_str::get_arith_value(expr* e, rational& val) const {
|
||||
context& ctx = get_context();
|
||||
ast_manager & m = get_manager();
|
||||
(void)m;
|
||||
if (!ctx.e_internalized(e)) {
|
||||
return false;
|
||||
}
|
||||
|
@ -8255,6 +8256,7 @@ namespace smt {
|
|||
|
||||
void theory_str::check_eqc_concat_concat(std::set<expr*> & eqc_concat_lhs, std::set<expr*> & eqc_concat_rhs) {
|
||||
ast_manager & m = get_manager();
|
||||
(void)m;
|
||||
|
||||
int hasCommon = 0;
|
||||
if (!eqc_concat_lhs.empty() && !eqc_concat_rhs.empty()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue