mirror of
https://github.com/Z3Prover/z3
synced 2025-08-02 09:20:22 +00:00
z3str3: fix Issues 4349, 4354, and 4310 (#4529)
* regex needs lesson; m.mk_eq not ctx.mk_eq * when unsat core is of size 0, then do naive learning * remove two extra comments, and correct positive regex learning * replace magic numbers for fixed-length lessons with constants
This commit is contained in:
parent
c0fbb31379
commit
8d16a9a034
3 changed files with 36 additions and 29 deletions
|
@ -9099,16 +9099,16 @@ namespace smt {
|
|||
return refine_eq(lhs, rhs, offset.get_unsigned());
|
||||
}
|
||||
// Let's just giveup if we find ourselves in the disjunctive fragment.
|
||||
if (offset == rational(-1)) { // negative equation
|
||||
if (offset == NEQ) { // negative equation
|
||||
++m_stats.m_refine_neq;
|
||||
return refine_dis(lhs, rhs);
|
||||
}
|
||||
if (offset == rational(-2)) { // function like contains, prefix,...
|
||||
if (offset == PFUN) { // function like contains, prefix,...
|
||||
SASSERT(rhs == lhs);
|
||||
++m_stats.m_refine_f;
|
||||
return refine_function(lhs);
|
||||
}
|
||||
if (offset == rational(-3)) { // negated function
|
||||
if (offset == NFUN) { // negated function
|
||||
SASSERT(rhs == lhs);
|
||||
++m_stats.m_refine_nf;
|
||||
ast_manager & m = get_manager();
|
||||
|
@ -9252,7 +9252,7 @@ namespace smt {
|
|||
ast_manager & m = get_manager();
|
||||
|
||||
expr_ref lesson(m);
|
||||
lesson = m.mk_not(ctx.mk_eq_atom(lhs, rhs));
|
||||
lesson = m.mk_not(m.mk_eq(lhs, rhs));
|
||||
TRACE("str", tout << "learning not " << mk_pp(lesson, m) << std::endl;);
|
||||
return lesson;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue