mirror of
				https://github.com/Z3Prover/z3
				synced 2025-11-03 21:09:11 +00:00 
			
		
		
		
	move arithmetical mbp functionality to model_based_opt
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
		
							parent
							
								
									7fc294d329
								
							
						
					
					
						commit
						b66d457b19
					
				
					 6 changed files with 76 additions and 106 deletions
				
			
		| 
						 | 
				
			
			@ -36,6 +36,27 @@ Revision History:
 | 
			
		|||
 | 
			
		||||
namespace qe {
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    static bool is_divides(arith_util& a, expr* e1, expr* e2, rational& k, expr_ref& p) {  
 | 
			
		||||
        expr* t1, *t2;
 | 
			
		||||
        if (a.is_mod(e2, t1, t2) && 
 | 
			
		||||
            a.is_numeral(e1, k) && 
 | 
			
		||||
            k.is_zero() &&
 | 
			
		||||
            a.is_numeral(t2, k)) {
 | 
			
		||||
            p = t1;
 | 
			
		||||
            return true;
 | 
			
		||||
        }
 | 
			
		||||
        return false;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    static bool is_divides(arith_util& a, expr* e, rational& k, expr_ref& t) {
 | 
			
		||||
        expr* e1, *e2;
 | 
			
		||||
        if (!a.get_manager().is_eq(e, e1, e2)) {
 | 
			
		||||
            return false;
 | 
			
		||||
        }
 | 
			
		||||
        return is_divides(a, e1, e2, k, t) || is_divides(a, e2, e1, k, t);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    class bound {        
 | 
			
		||||
        rational   m_coeff;
 | 
			
		||||
        expr_ref  m_term;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue