mirror of
https://github.com/Z3Prover/z3
synced 2025-07-18 02:16:40 +00:00
remove symbol -> zstring -> symbol round-trips
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
5cb0bac41d
commit
20a67e47ca
13 changed files with 68 additions and 62 deletions
|
@ -2159,7 +2159,7 @@ br_status seq_rewriter::mk_str_from_code(expr* a, expr_ref& result) {
|
|||
rational r;
|
||||
if (m_autil.is_numeral(a, r)) {
|
||||
if (r.is_neg() || r > u().max_char()) {
|
||||
result = str().mk_string(symbol(""));
|
||||
result = str().mk_string(zstring());
|
||||
}
|
||||
else {
|
||||
unsigned num = r.get_unsigned();
|
||||
|
@ -2207,10 +2207,10 @@ br_status seq_rewriter::mk_str_itos(expr* a, expr_ref& result) {
|
|||
rational r;
|
||||
if (m_autil.is_numeral(a, r)) {
|
||||
if (r.is_int() && !r.is_neg()) {
|
||||
result = str().mk_string(symbol(r.to_string()));
|
||||
result = str().mk_string(zstring(r));
|
||||
}
|
||||
else {
|
||||
result = str().mk_string(symbol(""));
|
||||
result = str().mk_string(zstring());
|
||||
}
|
||||
return BR_DONE;
|
||||
}
|
||||
|
@ -2225,7 +2225,7 @@ br_status seq_rewriter::mk_str_itos(expr* a, expr_ref& result) {
|
|||
eqs.push_back(m().mk_eq(b, str().mk_string(s)));
|
||||
}
|
||||
result = m().mk_or(eqs);
|
||||
result = m().mk_ite(result, b, str().mk_string(symbol("")));
|
||||
result = m().mk_ite(result, b, str().mk_string(zstring()));
|
||||
return BR_REWRITE2;
|
||||
}
|
||||
return BR_FAILED;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue