3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-08-09 04:31:24 +00:00

z3str3: mk_value searches equivalence class of terms for candidate model variables

This commit is contained in:
Murphy Berzish 2020-02-04 13:11:48 -05:00 committed by Nikolaj Bjorner
parent 69cab61de3
commit 4535228fe2
2 changed files with 42 additions and 2 deletions

View file

@ -9621,6 +9621,21 @@ namespace smt {
if (hasEqc) {
return to_app(n_eqc);
} else {
theory_var curr = get_var(n);
if (curr != null_theory_var) {
curr = m_find.find(curr);
theory_var first = curr;
do {
expr* a = get_ast(curr);
zstring val;
if (candidate_model.find(a, val)) {
return to_app(mk_string(val));
}
curr = m_find.next(curr);
}
while (curr != first && curr != null_theory_var);
}
// fail to find
return nullptr;
}
}