mirror of
https://github.com/Z3Prover/z3
synced 2025-04-22 16:45:31 +00:00
This commit is contained in:
parent
a10de2e975
commit
e14e3ef291
1 changed files with 10 additions and 6 deletions
|
@ -4884,13 +4884,17 @@ bool seq_rewriter::reduce_itos(expr_ref_vector& ls, expr_ref_vector& rs,
|
|||
str().is_itos(ls.get(0), n) &&
|
||||
is_string(rs.size(), rs.data(), s)) {
|
||||
std::string s1 = s.encode();
|
||||
rational r(s1.c_str());
|
||||
if (s1 == r.to_string()) {
|
||||
eqs.push_back(n, m_autil.mk_numeral(r, true));
|
||||
ls.reset();
|
||||
rs.reset();
|
||||
return true;
|
||||
try {
|
||||
rational r(s1.c_str());
|
||||
if (s1 == r.to_string()) {
|
||||
eqs.push_back(n, m_autil.mk_numeral(r, true));
|
||||
ls.reset();
|
||||
rs.reset();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
catch (...)
|
||||
{ }
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue