mirror of
https://github.com/Z3Prover/z3
synced 2025-06-29 09:28:45 +00:00
seq
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
34cc60410f
commit
fc8dfe3e40
5 changed files with 50 additions and 47 deletions
|
@ -17,6 +17,8 @@ Revision History:
|
|||
|
||||
Updated to string sequences 2015-12-5
|
||||
|
||||
Add SMTLIB 2.6 support 2020-5-17
|
||||
|
||||
--*/
|
||||
#ifndef SEQ_DECL_PLUGIN_H_
|
||||
#define SEQ_DECL_PLUGIN_H_
|
||||
|
@ -103,17 +105,18 @@ enum seq_op_kind {
|
|||
class zstring {
|
||||
private:
|
||||
buffer<unsigned> m_buffer;
|
||||
bool well_formed() const;
|
||||
public:
|
||||
zstring();
|
||||
static unsigned max_char() { return 196607; }
|
||||
zstring() {}
|
||||
zstring(char const* s);
|
||||
zstring(unsigned sz, unsigned const* s);
|
||||
zstring(zstring const& other);
|
||||
zstring(unsigned sz, unsigned const* s) { m_buffer.append(sz, s); SASSERT(well_formed()); }
|
||||
zstring(zstring const& other): m_buffer(other.m_buffer) {}
|
||||
zstring(unsigned num_bits, bool const* ch);
|
||||
zstring(unsigned ch);
|
||||
zstring& operator=(zstring const& other);
|
||||
zstring replace(zstring const& src, zstring const& dst) const;
|
||||
std::string encode() const;
|
||||
std::string as_string() const;
|
||||
unsigned length() const { return m_buffer.size(); }
|
||||
unsigned operator[](unsigned i) const { return m_buffer[i]; }
|
||||
bool empty() const { return m_buffer.empty(); }
|
||||
|
@ -257,9 +260,6 @@ public:
|
|||
public:
|
||||
str(seq_util& u): u(u), m(u.m), m_fid(u.m_fid) {}
|
||||
|
||||
unsigned min_char_value() const { return 0; }
|
||||
unsigned max_char_value() const { return 196607; }
|
||||
|
||||
sort* mk_seq(sort* s) const { parameter param(s); return m.mk_sort(m_fid, SEQ_SORT, 1, ¶m); }
|
||||
sort* mk_string_sort() const { return m.mk_sort(m_fid, _STRING_SORT, 0, nullptr); }
|
||||
app* mk_empty(sort* s) const { return m.mk_const(m.mk_func_decl(m_fid, OP_SEQ_EMPTY, 0, nullptr, 0, (expr*const*)nullptr, s)); }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue