3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-06-06 14:13:23 +00:00

improve theory_str::group_terms_by_eqc now that we have simplify_concat

This commit is contained in:
Murphy Berzish 2016-07-31 16:55:17 -04:00
parent 9ceb2df28f
commit 778c0a5563

View file

@ -1495,15 +1495,13 @@ void theory_str::group_terms_by_eqc(expr * n, std::set<expr*> & concats, std::se
do { do {
app * ast = eqcNode->get_owner(); app * ast = eqcNode->get_owner();
if (is_concat(eqcNode)) { if (is_concat(eqcNode)) {
// TODO simplify_concat expr * simConcat = simplify_concat(ast);
/* if (simConcat != ast) {
Z3_ast simConcat = simplifyConcat(t, eqcNode); if (is_concat(to_app(simConcat))) {
if (simConcat != eqcNode) {
if (isConcatFunc(t, simConcat)) {
concats.insert(simConcat); concats.insert(simConcat);
} else { } else {
if (isConstStr(t, simConcat)) { if (m_strutil.is_string(simConcat)) {
constStrs.insert(simConcat); consts.insert(simConcat);
} else { } else {
vars.insert(simConcat); vars.insert(simConcat);
} }
@ -1511,7 +1509,6 @@ void theory_str::group_terms_by_eqc(expr * n, std::set<expr*> & concats, std::se
} else { } else {
concats.insert(simConcat); concats.insert(simConcat);
} }
*/
concats.insert(ast); concats.insert(ast);
} else if (is_string(eqcNode)) { } else if (is_string(eqcNode)) {
consts.insert(ast); consts.insert(ast);