3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-08-23 11:37:54 +00:00

remove bit-vector dependencies in theory_str_mc. See discussion #4939

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2021-01-23 13:03:06 -08:00
parent e4cec19f03
commit 47cb1d1207
3 changed files with 19 additions and 19 deletions

View file

@ -1037,8 +1037,8 @@ app* seq_decl_plugin::mk_char(unsigned u) {
return m_manager->mk_const(f);
}
else {
UNREACHABLE();
return nullptr;
bv_util bv(*m_manager);
return bv.mk_numeral(rational(u), 8);
}
}
@ -1124,6 +1124,7 @@ expr* seq_decl_plugin::get_some_value(sort* s) {
return nullptr;
}
app* seq_util::mk_skolem(symbol const& name, unsigned n, expr* const* args, sort* range) {
SASSERT(range);
parameter param(name);

View file

@ -238,6 +238,9 @@ public:
bool has_seq() const { return m_has_seq; }
bool is_considered_uninterpreted(func_decl * f) override;
sort* char_sort() const { return m_char; }
sort* string_sort() const { return m_string; }
};
class seq_util {
@ -254,6 +257,9 @@ public:
ast_manager& get_manager() const { return m; }
sort* mk_char_sort() const { return seq.char_sort(); }
sort* mk_string_sort() const { return seq.string_sort(); }
bool is_char(sort* s) const { return seq.is_char(s); }
bool is_string(sort* s) const { return is_seq(s) && seq.is_char(s->get_parameter(0).get_ast()); }
bool is_seq(sort* s) const { return is_sort_of(s, m_fid, SEQ_SORT); }