mirror of
				https://github.com/Z3Prover/z3
				synced 2025-10-31 11:42:28 +00:00 
			
		
		
		
	Merge branch 'master' into polysat
This commit is contained in:
		
						commit
						1df749ad33
					
				
					 368 changed files with 12363 additions and 6152 deletions
				
			
		|  | @ -27,6 +27,15 @@ namespace euf { | |||
| 
 | ||||
| namespace bv { | ||||
| 
 | ||||
|     struct lazy_mul { | ||||
|         expr_ref_vector m_out; | ||||
|         unsigned        m_bits; | ||||
|         lazy_mul(app* a, expr_ref_vector& out): | ||||
|             m_out(out),  | ||||
|             m_bits(0) { | ||||
|         } | ||||
|     }; | ||||
| 
 | ||||
|     class solver : public euf::th_euf_solver { | ||||
|         typedef rational numeral; | ||||
|         typedef euf::theory_var theory_var; | ||||
|  | @ -52,13 +61,15 @@ namespace bv { | |||
|         }; | ||||
| 
 | ||||
|         struct bv_justification { | ||||
|             enum kind_t { eq2bit, ne2bit, bit2eq, bit2ne }; | ||||
|             enum kind_t { eq2bit, ne2bit, bit2eq, bit2ne, bv2int }; | ||||
|             kind_t     m_kind; | ||||
|             unsigned   m_idx{ UINT_MAX }; | ||||
|             theory_var m_v1{ euf::null_theory_var }; | ||||
|             theory_var m_v2 { euf::null_theory_var }; | ||||
|             unsigned   m_idx = UINT_MAX; | ||||
|             theory_var m_v1 = euf::null_theory_var; | ||||
|             theory_var m_v2 = euf::null_theory_var; | ||||
|             sat::literal m_consequent; | ||||
|             sat::literal m_antecedent; | ||||
|             euf::enode* a, *b, *c; | ||||
|                      | ||||
|             bv_justification(theory_var v1, theory_var v2, sat::literal c, sat::literal a) : | ||||
|                 m_kind(bv_justification::kind_t::eq2bit), m_v1(v1), m_v2(v2), m_consequent(c), m_antecedent(a) {} | ||||
|             bv_justification(theory_var v1, theory_var v2): | ||||
|  | @ -67,6 +78,8 @@ namespace bv { | |||
|                 m_kind(bv_justification::kind_t::bit2ne), m_idx(idx), m_consequent(c) {} | ||||
|             bv_justification(unsigned idx, theory_var v1, theory_var v2, sat::literal c, sat::literal a) : | ||||
|                 m_kind(bv_justification::kind_t::ne2bit), m_idx(idx), m_v1(v1), m_v2(v2), m_consequent(c), m_antecedent(a) {} | ||||
|             bv_justification(theory_var v1, theory_var v2, euf::enode* a, euf::enode* b, euf::enode* c): | ||||
|                 m_kind(bv_justification::kind_t::bv2int), m_v1(v1), m_v2(v2), a(a), b(b), c(c) {} | ||||
|             sat::ext_constraint_idx to_index() const {  | ||||
|                 return sat::constraint_base::mem2base(this);  | ||||
|             } | ||||
|  | @ -80,6 +93,7 @@ namespace bv { | |||
|         sat::ext_justification_idx mk_bit2eq_justification(theory_var v1, theory_var v2); | ||||
|         sat::justification mk_bit2ne_justification(unsigned idx, sat::literal c); | ||||
|         sat::justification mk_ne2bit_justification(unsigned idx, theory_var v1, theory_var v2, sat::literal c, sat::literal a); | ||||
|         sat::ext_constraint_idx mk_bv2int_justification(theory_var v1, theory_var v2, euf::enode* a, euf::enode* b, euf::enode* c); | ||||
|         void log_drat(bv_justification const& c); | ||||
|   | ||||
| 
 | ||||
|  | @ -210,8 +224,10 @@ namespace bv { | |||
|         literal_vector             m_tmp_literals; | ||||
|         svector<propagation_item>  m_prop_queue; | ||||
|         unsigned_vector            m_prop_queue_lim; | ||||
|         unsigned                   m_prop_queue_head { 0 }; | ||||
|         sat::literal               m_true { sat::null_literal }; | ||||
|         unsigned                   m_prop_queue_head = 0; | ||||
|         sat::literal               m_true = sat::null_literal; | ||||
|         euf::enode_vector          m_bv2ints; | ||||
|         obj_map<app, lazy_mul*>   m_lazymul; | ||||
| 
 | ||||
|         // internalize
 | ||||
|         void insert_bv2a(bool_var bv, atom * a) { m_bool_var2atom.setx(bv, a, 0); } | ||||
|  | @ -312,6 +328,7 @@ namespace bv { | |||
|         bool m_cheap_axioms{ true }; | ||||
|         bool should_bit_blast(app * n); | ||||
|         bool check_delay_internalized(expr* e); | ||||
|         bool check_lazy_mul(app* e, expr* mul_value, expr* arg_value); | ||||
|         bool check_mul(app* e); | ||||
|         bool check_mul_invertibility(app* n, expr_ref_vector const& arg_values, expr* value); | ||||
|         bool check_mul_zero(app* n, expr_ref_vector const& arg_values, expr* value1, expr* value2); | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue