mirror of
				https://github.com/Z3Prover/z3
				synced 2025-10-31 19:52:29 +00:00 
			
		
		
		
	remove passing proof parameter to expr-inverter
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
		
							parent
							
								
									f100d2f4de
								
							
						
					
					
						commit
						b3de7ac595
					
				
					 3 changed files with 10 additions and 12 deletions
				
			
		|  | @ -81,7 +81,7 @@ public: | |||
|      * | ||||
|      */ | ||||
| 
 | ||||
|     bool operator()(func_decl* f, unsigned num, expr* const* args, expr_ref& r, proof_ref& pr) override { | ||||
|     bool operator()(func_decl* f, unsigned num, expr* const* args, expr_ref& r) override { | ||||
|         SASSERT(f->get_family_id() == m.get_basic_family_id()); | ||||
|         switch (f->get_decl_kind()) { | ||||
|         case OP_ITE: | ||||
|  | @ -233,7 +233,7 @@ public: | |||
|     } | ||||
| 
 | ||||
| 
 | ||||
|     bool operator()(func_decl* f, unsigned num, expr* const* args, expr_ref& r, proof_ref& pr) override { | ||||
|     bool operator()(func_decl* f, unsigned num, expr* const* args, expr_ref& r) override { | ||||
|         SASSERT(f->get_family_id() == a.get_family_id()); | ||||
|         switch (f->get_decl_kind()) { | ||||
|         case OP_ADD: | ||||
|  | @ -531,7 +531,7 @@ class bv_expr_inverter : public iexpr_inverter { | |||
|      * y := 0 | ||||
|      * | ||||
|      */ | ||||
|     bool operator()(func_decl* f, unsigned num, expr* const* args, expr_ref& r, proof_ref& pr) override { | ||||
|     bool operator()(func_decl* f, unsigned num, expr* const* args, expr_ref& r) override { | ||||
|         SASSERT(f->get_family_id() == bv.get_family_id()); | ||||
|         switch (f->get_decl_kind()) { | ||||
|         case OP_BADD: | ||||
|  | @ -611,7 +611,7 @@ public: | |||
| 
 | ||||
|     family_id get_fid() const override { return a.get_family_id(); } | ||||
| 
 | ||||
|     bool operator()(func_decl* f, unsigned num, expr* const* args, expr_ref& r, proof_ref& pr) override { | ||||
|     bool operator()(func_decl* f, unsigned num, expr* const* args, expr_ref& r) override { | ||||
|         SASSERT(f->get_family_id() == a.get_family_id()); | ||||
|         switch (f->get_decl_kind()) { | ||||
|         case OP_SELECT: | ||||
|  | @ -679,7 +679,7 @@ public: | |||
|      *   head(x) -> fresh | ||||
|      *   x := cons(fresh, arb) | ||||
|      */ | ||||
|     bool operator()(func_decl* f, unsigned num, expr* const* args, expr_ref& r, proof_ref& pr) override { | ||||
|     bool operator()(func_decl* f, unsigned num, expr* const* args, expr_ref& r) override { | ||||
|         if (dt.is_accessor(f)) { | ||||
|             SASSERT(num == 1); | ||||
|             if (uncnstr(args[0])) { | ||||
|  | @ -799,7 +799,7 @@ expr_inverter::expr_inverter(ast_manager& m): iexpr_inverter(m) { | |||
| } | ||||
| 
 | ||||
| 
 | ||||
| bool expr_inverter::operator()(func_decl* f, unsigned num, expr* const* args, expr_ref& new_expr, proof_ref& pr) { | ||||
| bool expr_inverter::operator()(func_decl* f, unsigned num, expr* const* args, expr_ref& new_expr) { | ||||
|     if (num == 0) | ||||
|         return false; | ||||
|              | ||||
|  | @ -812,7 +812,7 @@ bool expr_inverter::operator()(func_decl* f, unsigned num, expr* const* args, ex | |||
|         return false; | ||||
| 
 | ||||
|     auto* p = m_inverters.get(fid, nullptr); | ||||
|     return p && (*p)(f, num, args, new_expr, pr);        | ||||
|     return p && (*p)(f, num, args, new_expr);        | ||||
| } | ||||
| 
 | ||||
| bool expr_inverter::mk_diff(expr* t, expr_ref& r) { | ||||
|  |  | |||
|  | @ -40,7 +40,7 @@ public: | |||
|     virtual void set_model_converter(generic_model_converter* mc) { m_mc = mc; } | ||||
|     virtual void set_produce_proofs(bool p) { m_produce_proofs = true; } | ||||
|      | ||||
|     virtual bool operator()(func_decl* f, unsigned n, expr* const* args, expr_ref& new_expr, proof_ref& pr) = 0; | ||||
|     virtual bool operator()(func_decl* f, unsigned n, expr* const* args, expr_ref& new_expr) = 0; | ||||
|     virtual bool mk_diff(expr* t, expr_ref& r) = 0; | ||||
|     virtual family_id get_fid() const = 0; | ||||
| }; | ||||
|  | @ -51,7 +51,7 @@ class expr_inverter : public iexpr_inverter { | |||
| public: | ||||
|     expr_inverter(ast_manager& m); | ||||
|     ~expr_inverter() override; | ||||
|     bool operator()(func_decl* f, unsigned n, expr* const* args, expr_ref& new_expr, proof_ref& pr) override; | ||||
|     bool operator()(func_decl* f, unsigned n, expr* const* args, expr_ref& new_expr) override; | ||||
|     bool mk_diff(expr* t, expr_ref& r) override; | ||||
|     void set_is_var(std::function<bool(expr*)>& is_var) override;  | ||||
|     void set_model_converter(generic_model_converter* mc) override; | ||||
|  |  | |||
|  | @ -63,7 +63,6 @@ void elim_unconstrained::eliminate() { | |||
| 
 | ||||
|     while (!m_heap.empty()) { | ||||
|         expr_ref r(m); | ||||
|         proof_ref pr(m); | ||||
|         int v = m_heap.erase_min(); | ||||
|         node& n = get_node(v); | ||||
|         if (n.m_refcount == 0) | ||||
|  | @ -85,7 +84,7 @@ void elim_unconstrained::eliminate() { | |||
|         unsigned sz = m_args.size(); | ||||
|         for (expr* arg : *to_app(t)) | ||||
|             m_args.push_back(reconstruct_term(get_node(arg))); | ||||
|         bool inverted = m_inverter(t->get_decl(), to_app(t)->get_num_args(), m_args.data() + sz, r, pr); | ||||
|         bool inverted = m_inverter(t->get_decl(), to_app(t)->get_num_args(), m_args.data() + sz, r); | ||||
|         n.m_refcount = 0; | ||||
|         m_args.shrink(sz); | ||||
|         if (!inverted) { | ||||
|  | @ -114,7 +113,6 @@ void elim_unconstrained::eliminate() { | |||
| 
 | ||||
|         IF_VERBOSE(11, verbose_stream() << mk_bounded_pp(get_node(v).m_orig, m) << " " << mk_bounded_pp(t, m) << " -> " << r << " " << get_node(e).m_refcount << "\n";); | ||||
| 
 | ||||
|         SASSERT(!pr && "not implemented to add proofs\n"); | ||||
|     } | ||||
| } | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue