3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-07-18 02:16:40 +00:00
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2015-12-25 15:22:26 -08:00
parent 4a5b645d88
commit 31302ec851
7 changed files with 386 additions and 134 deletions

View file

@ -24,8 +24,20 @@ Notes:
#include"rewriter_types.h"
#include"params.h"
#include"lbool.h"
#include"automaton.h"
typedef automaton<expr, ast_manager> eautomaton;
class re2automaton {
ast_manager& m;
seq_util u;
eautomaton* re2aut(expr* e);
eautomaton* seq2aut(expr* e);
public:
re2automaton(ast_manager& m);
eautomaton* operator()(expr* e);
};
/**
\brief Cheap rewrite rules for seq constraints
*/
@ -61,6 +73,9 @@ class seq_rewriter {
bool min_length(unsigned n, expr* const* es, unsigned& len);
expr* concat_non_empty(unsigned n, expr* const* es);
void add_next(u_map<expr*>& next, unsigned idx, expr* cond);
bool is_sequence(expr* e, expr_ref_vector& seq);
public:
seq_rewriter(ast_manager & m, params_ref const & p = params_ref()):
m_util(m), m_autil(m), m_es(m), m_lhs(m), m_rhs(m) {