Skip to content

Commit aec8675

Browse files
updates to equality solving search
Signed-off-by: Nikolaj Bjorner <[email protected]>
1 parent e6feb84 commit aec8675

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

src/ast/sls/sls_arith_base.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -2191,7 +2191,7 @@ namespace sls {
21912191
auto const& vi = m_vars[v];
21922192
if (vi.m_def_idx == UINT_MAX)
21932193
return true;
2194-
IF_VERBOSE(2, verbose_stream() << " repair def " << mk_bounded_pp(vi.m_expr, m) << "\n");
2194+
IF_VERBOSE(4, verbose_stream() << vi.m_op << " repair def " << mk_bounded_pp(vi.m_expr, m) << "\n");
21952195
TRACE("sls", tout << "repair def " << mk_bounded_pp(vi.m_expr, m) << "\n");
21962196
switch (vi.m_op) {
21972197
case arith_op_kind::LAST_ARITH_OP:

src/ast/sls/sls_seq_plugin.cpp

+11
Original file line numberDiff line numberDiff line change
@@ -605,11 +605,15 @@ namespace sls {
605605
zstring ch(m_chars[ctx.rand(m_chars.size())]);
606606
m_str_updates.push_back({ x, strval1(y) + ch, 1 });
607607
m_str_updates.push_back({ x, ch + strval1(y), 1 });
608+
m_str_updates.push_back({ x, ch, 1 });
609+
m_str_updates.push_back({ x, zstring(), 1 });
608610
}
609611
if (!is_value(y) && !m_chars.empty()) {
610612
zstring ch(m_chars[ctx.rand(m_chars.size())]);
611613
m_str_updates.push_back({ y, strval1(x) + ch, 1 });
612614
m_str_updates.push_back({ y, ch + strval1(x), 1 });
615+
m_str_updates.push_back({ x, ch, 1 });
616+
m_str_updates.push_back({ x, zstring(), 1});
613617
}
614618
}
615619
return apply_update();
@@ -826,6 +830,7 @@ namespace sls {
826830
expr* x, * y;
827831
VERIFY(seq.str.is_at(e, x, y));
828832
zstring se = strval0(e);
833+
verbose_stream() << "repair down at " << mk_pp(e, m) << " " << se << "\n";
829834
if (se.length() > 1)
830835
return false;
831836
zstring sx = strval0(x);
@@ -886,6 +891,12 @@ namespace sls {
886891
if (offset_r.is_unsigned())
887892
offset_u = offset_r.get_unsigned();
888893

894+
// set to not a member:
895+
if (value == -1) {
896+
m_str_updates.push_back({ y, zstring(m_chars[ctx.rand(m_chars.size())]), 1 });
897+
if (lenx > 0)
898+
m_str_updates.push_back({ x, zstring(), 1 });
899+
}
889900
// change x:
890901
// insert y into x at offset
891902
if (offset_r.is_unsigned() && 0 <= value && offset_u + value <= lenx && leny > 0) {

0 commit comments

Comments
 (0)