mirror of
				https://github.com/Z3Prover/z3
				synced 2025-10-31 19:52:29 +00:00 
			
		
		
		
	Merge pull request #283 from NikolajBjorner/master
make sure to bring constraints into clausal form before using the th_…
This commit is contained in:
		
						commit
						eb2193f5ae
					
				
					 1 changed files with 14 additions and 3 deletions
				
			
		|  | @ -249,9 +249,20 @@ namespace smt { | |||
|             sort* s = m().get_sort(x); | ||||
|             func_decl* r, *v; | ||||
|             get_rep(s, r, v); | ||||
|             app* lt1 = u().mk_lt(x,y); | ||||
|             app* lt2 = m().mk_not(b().mk_ule(m().mk_app(r,y),m().mk_app(r,x)));  | ||||
|             assert_cnstr(m().mk_iff(lt1, lt2)); | ||||
|             app_ref lt(m()), le(m()); | ||||
|             lt = u().mk_lt(x,y); | ||||
|             le = b().mk_ule(m().mk_app(r,y),m().mk_app(r,x));  | ||||
|             context& ctx = get_context(); | ||||
|             ctx.internalize(lt, false); | ||||
|             ctx.internalize(le, false); | ||||
|             literal lit1(ctx.get_literal(lt)); | ||||
|             literal lit2(ctx.get_literal(le)); | ||||
|             ctx.mark_as_relevant(lit1); | ||||
|             ctx.mark_as_relevant(lit2); | ||||
|             literal lits1[2] = { lit1, lit2 }; | ||||
|             literal lits2[2] = { ~lit1, ~lit2 }; | ||||
|             ctx.mk_th_axiom(get_id(), 2, lits1); | ||||
|             ctx.mk_th_axiom(get_id(), 2, lits2); | ||||
|         } | ||||
| 
 | ||||
|         void assert_cnstr(expr* e) { | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue