mirror of
				https://github.com/Z3Prover/z3
				synced 2025-10-31 19:52:29 +00:00 
			
		
		
		
	throttle ackerman on arrays
This commit is contained in:
		
							parent
							
								
									a20b577b2f
								
							
						
					
					
						commit
						84f514a4f4
					
				
					 8 changed files with 54 additions and 6 deletions
				
			
		|  | @ -99,14 +99,38 @@ namespace euf { | |||
|         m_tmp_inference->init(m_tmp_inference); | ||||
|     } | ||||
| 
 | ||||
|     bool ackerman::enable_cc(app* a, app* b) { | ||||
|         if (!s.enable_ackerman_axioms(a)) | ||||
|             return false; | ||||
|         if (!s.enable_ackerman_axioms(b)) | ||||
|             return false; | ||||
|         for (expr* arg : *a) | ||||
|             if (!s.enable_ackerman_axioms(arg)) | ||||
|                 return false; | ||||
|         for (expr* arg : *b) | ||||
|             if (!s.enable_ackerman_axioms(arg)) | ||||
|                 return false; | ||||
|         return true; | ||||
|     } | ||||
| 
 | ||||
|     bool ackerman::enable_eq(expr* a, expr* b, expr* c) { | ||||
|         return s.enable_ackerman_axioms(a) &&  | ||||
|             s.enable_ackerman_axioms(b) &&  | ||||
|             s.enable_ackerman_axioms(c);            | ||||
|     } | ||||
| 
 | ||||
|     void ackerman::cg_conflict_eh(expr * n1, expr * n2) { | ||||
|         if (!is_app(n1) || !is_app(n2)) | ||||
|             return; | ||||
|         if (!s.enable_ackerman_axioms(n1)) | ||||
|             return; | ||||
|         SASSERT(!s.m_drating); | ||||
|         app* a = to_app(n1); | ||||
|         app* b = to_app(n2); | ||||
|         if (a->get_decl() != b->get_decl() || a->get_num_args() != b->get_num_args()) | ||||
|             return; | ||||
|         if (!enable_cc(a, b)) | ||||
|             return; | ||||
|         TRACE("ack", tout << "conflict eh: " << mk_pp(a, m) << " == " << mk_pp(b, m) << "\n";); | ||||
|         insert(a, b); | ||||
|         gc(); | ||||
|  | @ -117,6 +141,8 @@ namespace euf { | |||
|             return; | ||||
|         if (s.m_drating) | ||||
|             return; | ||||
|         if (!enable_eq(a, b, c)) | ||||
|             return; | ||||
|         TRACE("ack", tout << mk_pp(a, m) << " " << mk_pp(b, m) << " " << mk_pp(c, m) << "\n";); | ||||
|         insert(a, b, c); | ||||
|         gc(); | ||||
|  | @ -128,6 +154,8 @@ namespace euf { | |||
|         TRACE("ack", tout << "used cc: " << mk_pp(a, m) << " == " << mk_pp(b, m) << "\n";); | ||||
|         SASSERT(a->get_decl() == b->get_decl()); | ||||
|         SASSERT(a->get_num_args() == b->get_num_args()); | ||||
|         if (!enable_cc(a, b)) | ||||
|             return; | ||||
|         insert(a, b); | ||||
|         gc(); | ||||
|     } | ||||
|  | @ -173,7 +201,7 @@ namespace euf { | |||
|         app* b = to_app(_b); | ||||
|         TRACE("ack", tout << mk_pp(a, m) << " " << mk_pp(b, m) << "\n";); | ||||
|         sat::literal_vector lits; | ||||
|         unsigned sz = a->get_num_args(); | ||||
|         unsigned sz = a->get_num_args();         | ||||
|          | ||||
|         for (unsigned i = 0; i < sz; ++i) { | ||||
|             expr_ref eq = s.mk_eq(a->get_arg(i), b->get_arg(i)); | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue