mirror of
				https://github.com/Z3Prover/z3
				synced 2025-11-03 21:09:11 +00:00 
			
		
		
		
	simplify string patterns into prefix/suffix constraints
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
		
							parent
							
								
									62478db7d5
								
							
						
					
					
						commit
						5993735b34
					
				
					 1 changed files with 9 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -4541,6 +4541,15 @@ br_status seq_rewriter::mk_str_in_regexp(expr* a, expr* b, expr_ref& result) {
 | 
			
		|||
       result = m_br.mk_eq_rw(a, b_s);
 | 
			
		||||
       return BR_REWRITE_FULL;
 | 
			
		||||
    }
 | 
			
		||||
    expr* c = nullptr, *d = nullptr, *e = nullptr;
 | 
			
		||||
    if (re().is_concat(b, c, d) && re().is_to_re(c, e) && re().is_full_seq(d)) {
 | 
			
		||||
        result = str().mk_prefix(e, a);
 | 
			
		||||
        return BR_REWRITE1;
 | 
			
		||||
    }
 | 
			
		||||
    if (re().is_concat(b, c, d) && re().is_to_re(d, e) && re().is_full_seq(c)) {
 | 
			
		||||
        result = str().mk_suffix(e, a);
 | 
			
		||||
        return BR_REWRITE1;
 | 
			
		||||
    }
 | 
			
		||||
    expr* b1 = nullptr;
 | 
			
		||||
    expr* eps = nullptr;
 | 
			
		||||
    if (re().is_opt(b, b1) ||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue