mirror of
				https://github.com/Z3Prover/z3
				synced 2025-11-03 21:09:11 +00:00 
			
		
		
		
	automata
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
		
							parent
							
								
									4a5b645d88
								
							
						
					
					
						commit
						31302ec851
					
				
					 7 changed files with 386 additions and 134 deletions
				
			
		| 
						 | 
				
			
			@ -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) {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue