3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-12 04:03:39 +00:00

Removed no progress case in seq-sls (#7537)

This commit is contained in:
Clemens Eisenhofer 2025-01-29 18:43:57 +01:00 committed by GitHub
parent 6d3cfb63da
commit c2a0919f79
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -681,10 +681,12 @@ namespace sls {
return true; return true;
if (ctx.rand(2) != 0 && repair_down_str_eq_unify(e)) if (ctx.rand(2) != 0 && repair_down_str_eq_unify(e))
return true; return true;
if (!is_value(x)) if (!is_value(x) && strval0(x) != strval1(y))
m_str_updates.push_back({ x, strval1(y), 1 }); m_str_updates.push_back({ x, strval1(y), 1 });
if (!is_value(y)) if (!is_value(y) && strval0(y) != strval1(x))
m_str_updates.push_back({ y, strval1(x), 1 }); m_str_updates.push_back({ y, strval1(x), 1 });
if (m_str_updates.empty() && repair_down_str_eq_edit_distance(e))
return true;
} }
else { else {
// disequality // disequality
@ -692,15 +694,19 @@ namespace sls {
zstring ch(m_chars[ctx.rand(m_chars.size())]); zstring ch(m_chars[ctx.rand(m_chars.size())]);
m_str_updates.push_back({ x, strval1(y) + ch, 1 }); m_str_updates.push_back({ x, strval1(y) + ch, 1 });
m_str_updates.push_back({ x, ch + strval1(y), 1 }); m_str_updates.push_back({ x, ch + strval1(y), 1 });
m_str_updates.push_back({ x, ch, 1 }); if (strval0(x) != ch)
m_str_updates.push_back({ x, zstring(), 1 }); m_str_updates.push_back({ x, ch, 1 });
if (!strval0(x).empty())
m_str_updates.push_back({ x, zstring(), 1 });
} }
if (!is_value(y) && !m_chars.empty()) { if (!is_value(y) && !m_chars.empty()) {
zstring ch(m_chars[ctx.rand(m_chars.size())]); zstring ch(m_chars[ctx.rand(m_chars.size())]);
m_str_updates.push_back({ y, strval1(x) + ch, 1 }); m_str_updates.push_back({ y, strval1(x) + ch, 1 });
m_str_updates.push_back({ y, ch + strval1(x), 1 }); m_str_updates.push_back({ y, ch + strval1(x), 1 });
m_str_updates.push_back({ x, ch, 1 }); if (strval0(y) != ch)
m_str_updates.push_back({ x, zstring(), 1}); m_str_updates.push_back({ y, ch, 1 });
if (!strval0(y).empty())
m_str_updates.push_back({ y, zstring(), 1});
} }
} }
return apply_update(); return apply_update();