diff --git a/src/ast/seq_decl_plugin.h b/src/ast/seq_decl_plugin.h index 953519fe6..ad73d863d 100644 --- a/src/ast/seq_decl_plugin.h +++ b/src/ast/seq_decl_plugin.h @@ -271,14 +271,14 @@ public: app* mk_stoi(expr* s) const { return m.mk_app(m_fid, OP_STRING_STOI, 1, &s); } app* mk_is_empty(expr* s) const; - bool is_string(expr const * n) const { return is_app_of(n, m_fid, OP_STRING_CONST); } + bool is_nth(func_decl* f) const { return is_decl_of(f, m_fid, OP_SEQ_NTH); } + + bool is_string(expr const * n) const { return is_app_of(n, m_fid, OP_STRING_CONST); } bool is_string(expr const* n, symbol& s) const { return is_string(n) && (s = to_app(n)->get_decl()->get_parameter(0).get_symbol(), true); } - bool is_string(expr const* n, zstring& s) const; - bool is_empty(expr const* n) const { symbol s; return is_app_of(n, m_fid, OP_SEQ_EMPTY) || (is_string(n, s) && !s.is_numerical() && *s.bare_str() == 0); } diff --git a/src/smt/theory_seq.h b/src/smt/theory_seq.h index bb05e0be8..2d9afc2cd 100644 --- a/src/smt/theory_seq.h +++ b/src/smt/theory_seq.h @@ -397,6 +397,7 @@ namespace smt { void add_theory_assumptions(expr_ref_vector & assumptions) override; theory* mk_fresh(context* new_ctx) override { return alloc(theory_seq, new_ctx->get_manager(), m_params); } char const * get_name() const override { return "seq"; } + bool include_func_interp(func_decl* f) override { return m_util.str.is_nth(f); } theory_var mk_var(enode* n) override; void apply_sort_cnstr(enode* n, sort* s) override; void display(std::ostream & out) const override;