3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-07-01 02:18:46 +00:00
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2020-04-14 17:33:44 -07:00
parent 7ed9996fc0
commit 835b57b775
9 changed files with 100 additions and 97 deletions

View file

@ -1052,9 +1052,9 @@ app* seq_util::mk_lt(expr* ch1, expr* ch2) const {
return m.mk_not(bv().mk_ule(ch2, ch1));
}
bool seq_util::str::is_string(expr const* n, zstring& s) const {
if (is_string(n)) {
s = zstring(to_app(n)->get_decl()->get_parameter(0).get_symbol().bare_str());
bool seq_util::str::is_string(func_decl const* f, zstring& s) const {
if (is_string(f)) {
s = zstring(f->get_parameter(0).get_symbol().bare_str());
return true;
}
else {
@ -1062,6 +1062,10 @@ bool seq_util::str::is_string(expr const* n, zstring& s) const {
}
}
bool seq_util::str::is_string(expr const* n, zstring& s) const {
return is_app(n) && is_string(to_app(n)->get_decl(), s);
}
bool seq_util::str::is_nth_i(expr const* n, expr*& s, unsigned& idx) const {
expr* i = nullptr;
if (!is_nth_i(n, s, i)) return false;