Skip to content

Commit

Permalink
z3str3: construct proper cex for str.at model construction
Browse files Browse the repository at this point in the history
  • Loading branch information
mtrberzi committed Jun 1, 2020
1 parent e634f29 commit f395c86
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/smt/theory_str_mc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -725,7 +725,10 @@ namespace smt {
v.init(&get_context());
rational pos_value;
bool pos_exists = v.get_value(pos, pos_value);
ENSURE(pos_exists);
if (!pos_exists) {
cex = m.mk_or(m_autil.mk_ge(pos, mk_int(0)), m_autil.mk_le(pos, mk_int(0)));
return false;
}
TRACE("str_fl", tout << "reduce str.at: base=" << mk_pp(base, m) << ", pos=" << pos_value.to_string() << std::endl;);
if (pos_value.is_neg() || pos_value >= rational(base_chars.size())) {
// return the empty string
Expand Down

0 comments on commit f395c86

Please sign in to comment.