mirror of
				https://github.com/Z3Prover/z3
				synced 2025-10-31 11:42:28 +00:00 
			
		
		
		
	Use override rather than virtual.
This commit is contained in:
		
							parent
							
								
									ce123d9dbc
								
							
						
					
					
						commit
						7167fda1dc
					
				
					 220 changed files with 2546 additions and 2548 deletions
				
			
		|  | @ -27,13 +27,13 @@ public: | |||
|         : m(m), m_p(p) | ||||
|     {} | ||||
| 
 | ||||
|     virtual ~ackermannize_bv_tactic() { } | ||||
|     ~ackermannize_bv_tactic() override { } | ||||
| 
 | ||||
|     virtual void operator()(goal_ref const & g, | ||||
|     void operator()(goal_ref const & g, | ||||
|         goal_ref_buffer & result, | ||||
|         model_converter_ref & mc, | ||||
|         proof_converter_ref & pc, | ||||
|         expr_dependency_ref & core) { | ||||
|         expr_dependency_ref & core) override { | ||||
|         mc = 0; | ||||
|         tactic_report report("ackermannize", *g); | ||||
|         fail_if_unsat_core_generation("ackermannize", g); | ||||
|  | @ -69,24 +69,24 @@ public: | |||
|     } | ||||
| 
 | ||||
| 
 | ||||
|     void updt_params(params_ref const & _p) { | ||||
|     void updt_params(params_ref const & _p) override { | ||||
|         ackermannize_bv_tactic_params p(_p); | ||||
|         m_lemma_limit = p.div0_ackermann_limit(); | ||||
|     } | ||||
| 
 | ||||
|     virtual void collect_param_descrs(param_descrs & r) { | ||||
|     void collect_param_descrs(param_descrs & r) override { | ||||
|         ackermannize_bv_tactic_params::collect_param_descrs(r); | ||||
|     } | ||||
| 
 | ||||
|     virtual void collect_statistics(statistics & st) const { | ||||
|     void collect_statistics(statistics & st) const override { | ||||
|         st.update("ackr-constraints", m_st.m_ackrs_sz); | ||||
|     } | ||||
| 
 | ||||
|     virtual void reset_statistics() { m_st.reset(); } | ||||
|     void reset_statistics() override { m_st.reset(); } | ||||
| 
 | ||||
|     virtual void cleanup() { } | ||||
|     void cleanup() override { } | ||||
| 
 | ||||
|     virtual tactic* translate(ast_manager& m) { | ||||
|     tactic* translate(ast_manager& m) override { | ||||
|         return alloc(ackermannize_bv_tactic, m, m_p); | ||||
|     } | ||||
| private: | ||||
|  |  | |||
|  | @ -57,7 +57,7 @@ class ackr_bound_probe : public probe { | |||
| public: | ||||
|     ackr_bound_probe() {} | ||||
| 
 | ||||
|     virtual result operator()(goal const & g) { | ||||
|     result operator()(goal const & g) override { | ||||
|         proc p(g.m()); | ||||
|         unsigned sz = g.size(); | ||||
|         expr_fast_mark1 visited; | ||||
|  |  | |||
|  | @ -37,9 +37,9 @@ public: | |||
|         , fixed_model(false) | ||||
|     { } | ||||
| 
 | ||||
|     virtual ~ackr_model_converter() { } | ||||
|     ~ackr_model_converter() override { } | ||||
| 
 | ||||
|     virtual void operator()(model_ref & md, unsigned goal_idx) { | ||||
|     void operator()(model_ref & md, unsigned goal_idx) override { | ||||
|         SASSERT(goal_idx == 0); | ||||
|         SASSERT(!fixed_model || md.get() == 0 || (!md->get_num_constants() && !md->get_num_functions())); | ||||
|         model_ref& old_model = fixed_model ? abstr_model : md; | ||||
|  | @ -49,9 +49,9 @@ public: | |||
|         md = new_model; | ||||
|     } | ||||
| 
 | ||||
|     virtual void operator()(model_ref & md) { operator()(md, 0); } | ||||
|     void operator()(model_ref & md) override { operator()(md, 0); } | ||||
| 
 | ||||
|     virtual model_converter * translate(ast_translation & translator) { | ||||
|     model_converter * translate(ast_translation & translator) override { | ||||
|         ackr_info_ref retv_info = info->translate(translator); | ||||
|         if (fixed_model) { | ||||
|             model_ref retv_mod_ref = abstr_model->translate(translator); | ||||
|  |  | |||
|  | @ -28,9 +28,9 @@ public: | |||
|         , model_constructor(lmc) | ||||
|     { } | ||||
| 
 | ||||
|     virtual ~lackr_model_converter_lazy() { } | ||||
|     ~lackr_model_converter_lazy() override { } | ||||
| 
 | ||||
|     virtual void operator()(model_ref & md, unsigned goal_idx) { | ||||
|     void operator()(model_ref & md, unsigned goal_idx) override { | ||||
|         SASSERT(goal_idx == 0); | ||||
|         SASSERT(md.get() == 0 || (!md->get_num_constants() && !md->get_num_functions())); | ||||
|         SASSERT(model_constructor.get()); | ||||
|  | @ -39,13 +39,13 @@ public: | |||
|         model_constructor->make_model(md); | ||||
|     } | ||||
| 
 | ||||
|     virtual void operator()(model_ref & md) { | ||||
|     void operator()(model_ref & md) override { | ||||
|         operator()(md, 0); | ||||
|     } | ||||
| 
 | ||||
|     //void display(std::ostream & out);
 | ||||
| 
 | ||||
|     virtual model_converter * translate(ast_translation & translator) { | ||||
|     model_converter * translate(ast_translation & translator) override { | ||||
|         NOT_IMPLEMENTED_YET(); | ||||
|     } | ||||
| protected: | ||||
|  |  | |||
|  | @ -345,9 +345,9 @@ extern "C" { | |||
|     public: | ||||
|         vector_var2anum(scoped_anum_vector & as):m_as(as) {} | ||||
|         virtual ~vector_var2anum() {} | ||||
|         virtual algebraic_numbers::manager & m() const { return m_as.m(); } | ||||
|         virtual bool contains(polynomial::var x) const { return static_cast<unsigned>(x) < m_as.size(); } | ||||
|         virtual algebraic_numbers::anum const & operator()(polynomial::var x) const { return m_as.get(x); } | ||||
|         algebraic_numbers::manager & m() const override { return m_as.m(); } | ||||
|         bool contains(polynomial::var x) const override { return static_cast<unsigned>(x) < m_as.size(); } | ||||
|         algebraic_numbers::anum const & operator()(polynomial::var x) const override { return m_as.get(x); } | ||||
|     }; | ||||
| 
 | ||||
|     Z3_ast_vector Z3_API Z3_algebraic_roots(Z3_context c, Z3_ast p, unsigned n, Z3_ast a[]) { | ||||
|  |  | |||
|  | @ -25,7 +25,7 @@ struct Z3_ast_map_ref : public api::object { | |||
|     ast_manager &            m; | ||||
|     obj_map<ast, ast*> m_map; | ||||
|     Z3_ast_map_ref(api::context& c, ast_manager & _m): api::object(c), m(_m) {} | ||||
|     virtual ~Z3_ast_map_ref(); | ||||
|     ~Z3_ast_map_ref() override; | ||||
| }; | ||||
| 
 | ||||
| inline Z3_ast_map_ref * to_ast_map(Z3_ast_map v) { return reinterpret_cast<Z3_ast_map_ref *>(v); } | ||||
|  |  | |||
|  | @ -27,7 +27,7 @@ namespace api { | |||
| struct Z3_ast_vector_ref : public api::object { | ||||
|     ast_ref_vector  m_ast_vector; | ||||
|     Z3_ast_vector_ref(api::context& c, ast_manager & m): api::object(c), m_ast_vector(m) {} | ||||
|     virtual ~Z3_ast_vector_ref() {} | ||||
|     ~Z3_ast_vector_ref() override {} | ||||
| }; | ||||
| 
 | ||||
| inline Z3_ast_vector_ref * to_ast_vector(Z3_ast_vector v) { return reinterpret_cast<Z3_ast_vector_ref *>(v); } | ||||
|  |  | |||
|  | @ -51,8 +51,8 @@ namespace api { | |||
|             m_context(m, m_register_engine, p), | ||||
|             m_trail(m) {} | ||||
| 
 | ||||
|         virtual ~fixedpoint_context() {} | ||||
|         family_id get_family_id() const { return const_cast<datalog::context&>(m_context).get_decl_util().get_family_id(); } | ||||
|         ~fixedpoint_context() override {} | ||||
|         family_id get_family_id() const override { return const_cast<datalog::context&>(m_context).get_decl_util().get_family_id(); } | ||||
|         void set_state(void* state) { | ||||
|             SASSERT(!m_state); | ||||
|             m_state = state; | ||||
|  | @ -73,7 +73,7 @@ namespace api { | |||
|         void set_reduce_assign(reduce_assign_callback_fptr f) {  | ||||
|             m_reduce_assign = f;  | ||||
|         } | ||||
|         virtual void reduce(func_decl* f, unsigned num_args, expr * const* args, expr_ref& result) { | ||||
|         void reduce(func_decl* f, unsigned num_args, expr * const* args, expr_ref& result) override { | ||||
|             expr* r = 0; | ||||
|             if (m_reduce_app) { | ||||
|                 m_reduce_app(m_state, f, num_args, args, &r); | ||||
|  | @ -90,7 +90,7 @@ namespace api { | |||
|                 result = m.mk_app(f, num_args, args); | ||||
|             } | ||||
|         } | ||||
|         virtual void reduce_assign(func_decl* f, unsigned num_args, expr * const* args, unsigned num_out, expr* const* outs) { | ||||
|         void reduce_assign(func_decl* f, unsigned num_args, expr * const* args, unsigned num_out, expr* const* outs) override { | ||||
|             if (m_reduce_assign) { | ||||
|                 m_trail.push_back(f); | ||||
|                 for (unsigned i = 0; i < num_args; ++i) { | ||||
|  |  | |||
|  | @ -38,7 +38,7 @@ struct Z3_fixedpoint_ref : public api::object { | |||
|     api::fixedpoint_context *   m_datalog; | ||||
|     params_ref               m_params; | ||||
|     Z3_fixedpoint_ref(api::context& c): api::object(c), m_datalog(0) {} | ||||
|     virtual ~Z3_fixedpoint_ref() { dealloc(m_datalog); } | ||||
|     ~Z3_fixedpoint_ref() override { dealloc(m_datalog); } | ||||
| }; | ||||
| 
 | ||||
| inline Z3_fixedpoint_ref * to_fixedpoint(Z3_fixedpoint s) { return reinterpret_cast<Z3_fixedpoint_ref *>(s); } | ||||
|  |  | |||
|  | @ -24,7 +24,7 @@ Revision History: | |||
| struct Z3_goal_ref : public api::object { | ||||
|     goal_ref m_goal; | ||||
|     Z3_goal_ref(api::context& c) : api::object(c) {} | ||||
|     virtual ~Z3_goal_ref() {} | ||||
|     ~Z3_goal_ref() override {} | ||||
| }; | ||||
| 
 | ||||
| inline Z3_goal_ref * to_goal(Z3_goal g) { return reinterpret_cast<Z3_goal_ref *>(g); } | ||||
|  |  | |||
|  | @ -24,7 +24,7 @@ Revision History: | |||
| struct Z3_model_ref : public api::object { | ||||
|     model_ref  m_model; | ||||
|     Z3_model_ref(api::context& c): api::object(c) {} | ||||
|     virtual ~Z3_model_ref() {} | ||||
|     ~Z3_model_ref() override {} | ||||
| }; | ||||
| 
 | ||||
| inline Z3_model_ref * to_model(Z3_model s) { return reinterpret_cast<Z3_model_ref *>(s); } | ||||
|  | @ -35,7 +35,7 @@ struct Z3_func_interp_ref : public api::object { | |||
|     model_ref     m_model; // must have it to prevent reference to m_func_interp to be killed.
 | ||||
|     func_interp * m_func_interp; | ||||
|     Z3_func_interp_ref(api::context& c, model * m): api::object(c), m_model(m), m_func_interp(0) {} | ||||
|     virtual ~Z3_func_interp_ref() {} | ||||
|     ~Z3_func_interp_ref() override {} | ||||
| }; | ||||
| 
 | ||||
| inline Z3_func_interp_ref * to_func_interp(Z3_func_interp s) { return reinterpret_cast<Z3_func_interp_ref *>(s); } | ||||
|  | @ -47,7 +47,7 @@ struct Z3_func_entry_ref : public api::object { | |||
|     func_interp *       m_func_interp; | ||||
|     func_entry const *  m_func_entry; | ||||
|     Z3_func_entry_ref(api::context& c, model * m):api::object(c), m_model(m), m_func_interp(0), m_func_entry(0) {} | ||||
|     virtual ~Z3_func_entry_ref() {} | ||||
|     ~Z3_func_entry_ref() override {} | ||||
| }; | ||||
| 
 | ||||
| inline Z3_func_entry_ref * to_func_entry(Z3_func_entry s) { return reinterpret_cast<Z3_func_entry_ref *>(s); } | ||||
|  |  | |||
|  | @ -36,7 +36,7 @@ extern "C" { | |||
|     struct Z3_optimize_ref : public api::object { | ||||
|         opt::context* m_opt; | ||||
|         Z3_optimize_ref(api::context& c): api::object(c), m_opt(0) {} | ||||
|         virtual ~Z3_optimize_ref() { dealloc(m_opt); } | ||||
|         ~Z3_optimize_ref() override { dealloc(m_opt); } | ||||
|     }; | ||||
|     inline Z3_optimize_ref * to_optimize(Z3_optimize o) { return reinterpret_cast<Z3_optimize_ref *>(o); } | ||||
|     inline Z3_optimize of_optimize(Z3_optimize_ref * o) { return reinterpret_cast<Z3_optimize>(o); } | ||||
|  |  | |||
|  | @ -27,7 +27,7 @@ struct Z3_solver_ref : public api::object { | |||
|     params_ref                 m_params; | ||||
|     symbol                     m_logic; | ||||
|     Z3_solver_ref(api::context& c, solver_factory * f): api::object(c), m_solver_factory(f), m_solver(0), m_logic(symbol::null) {} | ||||
|     virtual ~Z3_solver_ref() {} | ||||
|     ~Z3_solver_ref() override {} | ||||
| }; | ||||
| 
 | ||||
| inline Z3_solver_ref * to_solver(Z3_solver s) { return reinterpret_cast<Z3_solver_ref *>(s); } | ||||
|  |  | |||
|  | @ -24,7 +24,7 @@ Revision History: | |||
| struct Z3_stats_ref : public api::object { | ||||
|     statistics m_stats; | ||||
|     Z3_stats_ref(api::context& c): api::object(c) {} | ||||
|     virtual ~Z3_stats_ref() {} | ||||
|     ~Z3_stats_ref() override {} | ||||
| }; | ||||
| 
 | ||||
| inline Z3_stats_ref * to_stats(Z3_stats s) { return reinterpret_cast<Z3_stats_ref *>(s); } | ||||
|  |  | |||
|  | @ -29,13 +29,13 @@ namespace api { | |||
| struct Z3_tactic_ref : public api::object { | ||||
|     tactic_ref   m_tactic; | ||||
|     Z3_tactic_ref(api::context& c): api::object(c) {} | ||||
|     virtual ~Z3_tactic_ref() {} | ||||
|     ~Z3_tactic_ref() override {} | ||||
| }; | ||||
| 
 | ||||
| struct Z3_probe_ref : public api::object { | ||||
|     probe_ref    m_probe; | ||||
|     Z3_probe_ref(api::context& c):api::object(c) {} | ||||
|     virtual ~Z3_probe_ref() {} | ||||
|     ~Z3_probe_ref() override {} | ||||
| }; | ||||
| 
 | ||||
| inline Z3_tactic_ref * to_tactic(Z3_tactic g) { return reinterpret_cast<Z3_tactic_ref *>(g); } | ||||
|  | @ -52,7 +52,7 @@ struct Z3_apply_result_ref : public api::object { | |||
|     proof_converter_ref  m_pc; | ||||
|     expr_dependency_ref  m_core; | ||||
|     Z3_apply_result_ref(api::context& c, ast_manager & m); | ||||
|     virtual ~Z3_apply_result_ref() {} | ||||
|     ~Z3_apply_result_ref() override {} | ||||
| }; | ||||
| 
 | ||||
| inline Z3_apply_result_ref * to_apply_result(Z3_apply_result g) { return reinterpret_cast<Z3_apply_result_ref *>(g); } | ||||
|  |  | |||
|  | @ -88,7 +88,7 @@ inline lbool    to_lbool(Z3_lbool b) { return static_cast<lbool>(b); } | |||
| struct Z3_params_ref : public api::object { | ||||
|     params_ref m_params; | ||||
|     Z3_params_ref(api::context& c): api::object(c) {} | ||||
|     virtual ~Z3_params_ref() {} | ||||
|     ~Z3_params_ref() override {} | ||||
| }; | ||||
| 
 | ||||
| inline Z3_params_ref * to_params(Z3_params p) { return reinterpret_cast<Z3_params_ref *>(p); } | ||||
|  | @ -98,7 +98,7 @@ inline params_ref to_param_ref(Z3_params p) { return p == 0 ? params_ref() : to_ | |||
| struct Z3_param_descrs_ref : public api::object { | ||||
|     param_descrs m_descrs; | ||||
|     Z3_param_descrs_ref(api::context& c): api::object(c) {} | ||||
|     virtual ~Z3_param_descrs_ref() {} | ||||
|     ~Z3_param_descrs_ref() override {} | ||||
| }; | ||||
| 
 | ||||
| inline Z3_param_descrs_ref * to_param_descrs(Z3_param_descrs p) { return reinterpret_cast<Z3_param_descrs_ref *>(p); } | ||||
|  |  | |||
|  | @ -66,7 +66,7 @@ public: | |||
|         m.insert(s,t); | ||||
|     } | ||||
| 
 | ||||
|     virtual void undo(Ctx& ctx) { | ||||
|     void undo(Ctx& ctx) override { | ||||
|         m_map.pop(); | ||||
|     }     | ||||
| }; | ||||
|  |  | |||
|  | @ -211,7 +211,7 @@ class iz3proof_itp_impl : public iz3proof_itp { | |||
|         pivot literal, while the conclusion of premise2 should contain the | ||||
|         pivot literal. | ||||
|     */ | ||||
|     node make_resolution(ast pivot, const std::vector<ast> &conc, node premise1, node premise2) { | ||||
|     node make_resolution(ast pivot, const std::vector<ast> &conc, node premise1, node premise2) override { | ||||
|         LitType lt = get_term_type(pivot); | ||||
|         if(lt == LitA) | ||||
|             return my_or(premise1,premise2); | ||||
|  | @ -2146,7 +2146,7 @@ class iz3proof_itp_impl : public iz3proof_itp { | |||
|     } | ||||
|    | ||||
|     /** Make an assumption node. The given clause is assumed in the given frame. */ | ||||
|     virtual node make_assumption(int frame, const std::vector<ast> &assumption){ | ||||
|     node make_assumption(int frame, const std::vector<ast> &assumption) override { | ||||
|         if(!weak){ | ||||
|             if(pv->in_range(frame,rng)){ | ||||
|                 std::vector<ast> itp_clause; | ||||
|  | @ -2219,7 +2219,7 @@ class iz3proof_itp_impl : public iz3proof_itp { | |||
|     /** Make a modus-ponens node. This takes derivations of |- x
 | ||||
|         and |- x = y and produces |- y */ | ||||
|    | ||||
|     virtual node make_mp(const ast &p_eq_q, const ast &prem1, const ast &prem2){ | ||||
|     node make_mp(const ast &p_eq_q, const ast &prem1, const ast &prem2) override { | ||||
|      | ||||
|         /* Interpolate the axiom p, p=q -> q */ | ||||
|         ast p = arg(p_eq_q,0); | ||||
|  | @ -2281,7 +2281,7 @@ class iz3proof_itp_impl : public iz3proof_itp { | |||
|     } | ||||
| 
 | ||||
|     /** Make an axiom node. The conclusion must be an instance of an axiom. */ | ||||
|     virtual node make_axiom(const std::vector<ast> &conclusion, prover::range frng){ | ||||
|     node make_axiom(const std::vector<ast> &conclusion, prover::range frng) override { | ||||
|         int nargs = conclusion.size(); | ||||
|         std::vector<ast> largs(nargs); | ||||
|         std::vector<ast> eqs; | ||||
|  | @ -2306,20 +2306,20 @@ class iz3proof_itp_impl : public iz3proof_itp { | |||
|         return capture_localization(itp); | ||||
|     } | ||||
| 
 | ||||
|     virtual node make_axiom(const std::vector<ast> &conclusion){ | ||||
|     node make_axiom(const std::vector<ast> &conclusion) override { | ||||
|         return make_axiom(conclusion,pv->range_full()); | ||||
|     } | ||||
| 
 | ||||
|     /** Make a Contra node. This rule takes a derivation of the form
 | ||||
|         Gamma |- False and produces |- \/~Gamma. */ | ||||
| 
 | ||||
|     virtual node make_contra(node prem, const std::vector<ast> &conclusion){ | ||||
|     node make_contra(node prem, const std::vector<ast> &conclusion) override { | ||||
|         return prem; | ||||
|     } | ||||
| 
 | ||||
|     /** Make hypothesis. Creates a node of the form P |- P. */ | ||||
| 
 | ||||
|     virtual node make_hypothesis(const ast &P){ | ||||
|     node make_hypothesis(const ast &P) override { | ||||
|         if(is_not(P)) | ||||
|             return make_hypothesis(arg(P,0)); | ||||
|         switch(get_term_type(P)){ | ||||
|  | @ -2354,7 +2354,7 @@ class iz3proof_itp_impl : public iz3proof_itp { | |||
| 
 | ||||
|     /** Make a Reflexivity node. This rule produces |- x = x */ | ||||
|    | ||||
|     virtual node make_reflexivity(ast con){ | ||||
|     node make_reflexivity(ast con) override { | ||||
|         if(get_term_type(con) == LitA) | ||||
|             return mk_false(); | ||||
|         if(get_term_type(con) == LitB) | ||||
|  | @ -2367,7 +2367,7 @@ class iz3proof_itp_impl : public iz3proof_itp { | |||
|     /** Make a Symmetry node. This takes a derivation of |- x = y and
 | ||||
|         produces | y = x. Ditto for ~(x=y) */ | ||||
| 
 | ||||
|     virtual node make_symmetry(ast con, const ast &premcon, node prem){ | ||||
|     node make_symmetry(ast con, const ast &premcon, node prem) override { | ||||
| #if 0 | ||||
|         ast x = arg(con,0); | ||||
|         ast y = arg(con,1); | ||||
|  | @ -2394,7 +2394,7 @@ class iz3proof_itp_impl : public iz3proof_itp { | |||
|     /** Make a transitivity node. This takes derivations of |- x = y
 | ||||
|         and |- y = z produces | x = z */ | ||||
| 
 | ||||
|     virtual node make_transitivity(const ast &x, const ast &y, const ast &z, node prem1, node prem2){ | ||||
|     node make_transitivity(const ast &x, const ast &y, const ast &z, node prem1, node prem2) override { | ||||
| 
 | ||||
|         /* Interpolate the axiom x=y,y=z,-> x=z */ | ||||
|         ast p = make_equiv_rel(x,y); | ||||
|  | @ -2413,7 +2413,7 @@ class iz3proof_itp_impl : public iz3proof_itp { | |||
|     /** Make a congruence node. This takes derivations of |- x_i = y_i
 | ||||
|         and produces |- f(x_1,...,x_n) = f(y_1,...,y_n) */ | ||||
|    | ||||
|     virtual node make_congruence(const ast &p, const ast &con, const ast &prem1){ | ||||
|     node make_congruence(const ast &p, const ast &con, const ast &prem1) override { | ||||
|         ast x = arg(p,0), y = arg(p,1); | ||||
|         ast itp; | ||||
|         LitType con_t = get_term_type(con); | ||||
|  | @ -2454,7 +2454,7 @@ class iz3proof_itp_impl : public iz3proof_itp { | |||
|     /** Make a congruence node. This takes derivations of |- x_i1 = y_i1, |- x_i2 = y_i2,...
 | ||||
|         and produces |- f(...x_i1...x_i2...) = f(...y_i1...y_i2...) */ | ||||
|    | ||||
|     node make_congruence(const std::vector<ast> &p, const ast &con, const std::vector<ast> &prems){ | ||||
|     node make_congruence(const std::vector<ast> &p, const ast &con, const std::vector<ast> &prems) override { | ||||
|         if(p.size() == 0) | ||||
|             throw proof_error(); | ||||
|         if(p.size() == 1) | ||||
|  | @ -2516,8 +2516,8 @@ class iz3proof_itp_impl : public iz3proof_itp { | |||
| 
 | ||||
|     /** Make a farkas proof node. */ | ||||
| 
 | ||||
|     virtual node make_farkas(ast con, const std::vector<node> &prems, const std::vector<ast> &prem_cons, | ||||
|                              const std::vector<ast> &coeffs){ | ||||
|     node make_farkas(ast con, const std::vector<node> &prems, const std::vector<ast> &prem_cons, | ||||
|                      const std::vector<ast> &coeffs) override { | ||||
| 
 | ||||
|         /* Compute the interpolant for the clause */ | ||||
| 
 | ||||
|  | @ -2619,7 +2619,7 @@ class iz3proof_itp_impl : public iz3proof_itp { | |||
|     } | ||||
|    | ||||
|     /* Make an axiom instance of the form |- x<=y, y<= x -> x =y */ | ||||
|     virtual node make_leq2eq(ast x, ast y, const ast &xleqy, const ast &yleqx){ | ||||
|     node make_leq2eq(ast x, ast y, const ast &xleqy, const ast &yleqx) override { | ||||
|         ast con = make(Equal,x,y); | ||||
|         ast itp; | ||||
|         switch(get_term_type(con)){ | ||||
|  | @ -2658,7 +2658,7 @@ class iz3proof_itp_impl : public iz3proof_itp { | |||
|     } | ||||
| 
 | ||||
|     /* Make an axiom instance of the form |- x = y -> x <= y */ | ||||
|     virtual node make_eq2leq(ast x, ast y, const ast &xleqy){ | ||||
|     node make_eq2leq(ast x, ast y, const ast &xleqy) override { | ||||
|         ast itp; | ||||
|         switch(get_term_type(xleqy)){ | ||||
|         case LitA: | ||||
|  | @ -2681,7 +2681,7 @@ class iz3proof_itp_impl : public iz3proof_itp { | |||
| 
 | ||||
|     /* Make an inference of the form t <= c |- t/d <= floor(c/d) where t
 | ||||
|        is an affine term divisble by d and c is an integer constant */ | ||||
|     virtual node make_cut_rule(const ast &tleqc, const ast &d, const ast &con, const ast &prem){ | ||||
|     node make_cut_rule(const ast &tleqc, const ast &d, const ast &con, const ast &prem) override { | ||||
|         ast itp = mk_false(); | ||||
|         switch(get_term_type(con)){ | ||||
|         case LitA: | ||||
|  | @ -2965,7 +2965,7 @@ class iz3proof_itp_impl : public iz3proof_itp { | |||
|     }   | ||||
| 
 | ||||
|     /* Return an interpolant from a proof of false */ | ||||
|     ast interpolate(const node &pf){ | ||||
|     ast interpolate(const node &pf) override { | ||||
|         // proof of false must be a formula, with quantified symbols
 | ||||
| #ifndef BOGUS_QUANTS | ||||
|         return close_universally(add_quants(z3_simplify(pf))); | ||||
|  | @ -3089,7 +3089,7 @@ public: | |||
|         m().inc_ref(sexists); | ||||
|     } | ||||
| 
 | ||||
|     ~iz3proof_itp_impl(){ | ||||
|     ~iz3proof_itp_impl() override { | ||||
|         m().dec_ref(contra); | ||||
|         m().dec_ref(sum); | ||||
|         m().dec_ref(rotate_sum); | ||||
|  |  | |||
|  | @ -2068,7 +2068,7 @@ public: | |||
| 
 | ||||
|     // We actually compute the interpolant here and then produce a proof consisting of just a lemma
 | ||||
| 
 | ||||
|     iz3proof::node translate(ast proof, iz3proof &dst){ | ||||
|     iz3proof::node translate(ast proof, iz3proof &dst) override { | ||||
|         std::vector<ast> itps; | ||||
|         scan_skolems(proof); | ||||
|         for(int i = 0; i < frames -1; i++){ | ||||
|  | @ -2114,7 +2114,7 @@ public: | |||
|         m().inc_ref(commute); | ||||
|     } | ||||
| 
 | ||||
|     ~iz3translation_full(){ | ||||
|     ~iz3translation_full() override { | ||||
|         m().dec_ref(commute); | ||||
|     } | ||||
| }; | ||||
|  |  | |||
|  | @ -1611,7 +1611,7 @@ public: | |||
|             // 1) Translate ast proof term to Zproof
 | ||||
|             // 2) Translate Zproof to Iproof
 | ||||
| 
 | ||||
|             Iproof::node translate(ast proof, Iproof &dst){ | ||||
|             Iproof::node translate(ast proof, Iproof &dst) override { | ||||
|                 iproof = &dst; | ||||
|                 Iproof::node Ipf = translate_main(proof,0);  // builds result in dst
 | ||||
|                 return Ipf; | ||||
|  | @ -1629,7 +1629,7 @@ public: | |||
|                     traced_lit = ast(); | ||||
|                 } | ||||
| 
 | ||||
|             ~iz3translation_direct(){ | ||||
|             ~iz3translation_direct() override { | ||||
|                 for(hash_map<non_local_lits, non_local_lits *>::iterator | ||||
|                         it = non_local_lits_unique.begin(), | ||||
|                         en = non_local_lits_unique.end(); | ||||
|  |  | |||
|  | @ -81,14 +81,14 @@ class heap_trie { | |||
|         Value m_value; | ||||
|     public: | ||||
|         leaf(): node(leaf_t) {} | ||||
|         virtual ~leaf() {} | ||||
|         ~leaf() override {} | ||||
|         Value const& get_value() const { return m_value; } | ||||
|         void set_value(Value const& v) { m_value = v; } | ||||
|         virtual void display(std::ostream& out, unsigned indent) const { | ||||
|         void display(std::ostream& out, unsigned indent) const override { | ||||
|             out << " value: " << m_value; | ||||
|         } | ||||
|         virtual unsigned num_nodes() const { return 1; } | ||||
|         virtual unsigned num_leaves() const { return this->ref_count()>0?1:0; } | ||||
|         unsigned num_nodes() const override { return 1; } | ||||
|         unsigned num_leaves() const override { return this->ref_count()>0?1:0; } | ||||
|     }; | ||||
| 
 | ||||
|     typedef buffer<std::pair<Key,node*>, true, 2> children_t; | ||||
|  | @ -99,7 +99,7 @@ class heap_trie { | |||
|     public: | ||||
|         trie(): node(trie_t) {} | ||||
| 
 | ||||
|         virtual ~trie() { | ||||
|         ~trie() override { | ||||
|         } | ||||
| 
 | ||||
|         node* find_or_insert(Key k, node* n) { | ||||
|  | @ -137,7 +137,7 @@ class heap_trie { | |||
|         children_t const& nodes() const { return m_nodes; } | ||||
|         children_t & nodes() { return m_nodes; } | ||||
| 
 | ||||
|         virtual void display(std::ostream& out, unsigned indent) const { | ||||
|         void display(std::ostream& out, unsigned indent) const override { | ||||
|             for (unsigned j = 0; j < m_nodes.size(); ++j) { | ||||
|                 if (j != 0 || indent > 0) { | ||||
|                     out << "\n"; | ||||
|  | @ -151,7 +151,7 @@ class heap_trie { | |||
|             } | ||||
|         } | ||||
| 
 | ||||
|         virtual unsigned num_nodes() const { | ||||
|         unsigned num_nodes() const override { | ||||
|             unsigned sz = 1; | ||||
|             for (unsigned j = 0; j < m_nodes.size(); ++j) { | ||||
|                 sz += m_nodes[j].second->num_nodes(); | ||||
|  | @ -159,7 +159,7 @@ class heap_trie { | |||
|             return sz; | ||||
|         } | ||||
| 
 | ||||
|         virtual unsigned num_leaves() const { | ||||
|         unsigned num_leaves() const override { | ||||
|             unsigned sz = 0; | ||||
|             for (unsigned j = 0; j < m_nodes.size(); ++j) { | ||||
|                 sz += m_nodes[j].second->num_leaves(); | ||||
|  |  | |||
|  | @ -175,7 +175,7 @@ class hilbert_basis::value_index2 { | |||
|         hilbert_basis* hb; | ||||
|         offset_t  m_value; | ||||
|         checker(): hb(0) {} | ||||
|         virtual bool operator()(unsigned const& v) {             | ||||
|         bool operator()(unsigned const& v) override { | ||||
|             if (m_value.m_offset != v) { //  && hb->is_subsumed(m_value, offset_t(v))) {
 | ||||
|                 return true; | ||||
|             } | ||||
|  |  | |||
|  | @ -1932,9 +1932,9 @@ namespace algebraic_numbers { | |||
|             imp & m_imp; | ||||
|             polynomial::var2anum const & m_x2v; | ||||
|             opt_var2basic(imp & i, polynomial::var2anum const & x2v):m_imp(i), m_x2v(x2v) {} | ||||
|             virtual unsynch_mpq_manager & m() const { return m_imp.qm(); } | ||||
|             virtual bool contains(polynomial::var x) const { return m_x2v.contains(x); } | ||||
|             virtual mpq const & operator()(polynomial::var x) const { | ||||
|             unsynch_mpq_manager & m() const override { return m_imp.qm(); } | ||||
|             bool contains(polynomial::var x) const override { return m_x2v.contains(x); } | ||||
|             mpq const & operator()(polynomial::var x) const override { | ||||
|                 anum const & v = m_x2v(x); | ||||
|                 if (!v.is_basic()) | ||||
|                     throw failed(); | ||||
|  | @ -1949,9 +1949,9 @@ namespace algebraic_numbers { | |||
|             imp & m_imp; | ||||
|             polynomial::var2anum const & m_x2v; | ||||
|             var2basic(imp & i, polynomial::var2anum const & x2v):m_imp(i), m_x2v(x2v) {} | ||||
|             virtual unsynch_mpq_manager & m() const { return m_imp.qm(); } | ||||
|             virtual bool contains(polynomial::var x) const { return m_x2v.contains(x) && m_x2v(x).is_basic(); } | ||||
|             virtual mpq const & operator()(polynomial::var x) const { | ||||
|             unsynch_mpq_manager & m() const override { return m_imp.qm(); } | ||||
|             bool contains(polynomial::var x) const override { return m_x2v.contains(x) && m_x2v(x).is_basic(); } | ||||
|             mpq const & operator()(polynomial::var x) const override { | ||||
|                 anum const & v = m_x2v(x); | ||||
|                 SASSERT(v.is_basic()); | ||||
|                 TRACE("var2basic", tout << "getting value of x" << x << " -> " << m().to_string(m_imp.basic_value(v)) << "\n";); | ||||
|  | @ -1966,9 +1966,9 @@ namespace algebraic_numbers { | |||
|             imp & m_imp; | ||||
|             polynomial::var2anum const & m_x2v; | ||||
|             var2interval(imp & i, polynomial::var2anum const & x2v):m_imp(i), m_x2v(x2v) {} | ||||
|             virtual mpbqi_manager & m() const { return m_imp.bqim(); } | ||||
|             virtual bool contains(polynomial::var x) const { return m_x2v.contains(x) && !m_x2v(x).is_basic(); } | ||||
|             virtual mpbqi const & operator()(polynomial::var x) const { | ||||
|             mpbqi_manager & m() const override { return m_imp.bqim(); } | ||||
|             bool contains(polynomial::var x) const override { return m_x2v.contains(x) && !m_x2v(x).is_basic(); } | ||||
|             mpbqi const & operator()(polynomial::var x) const override { | ||||
|                 anum const & v = m_x2v(x); | ||||
|                 SASSERT(!v.is_basic()); | ||||
|                 return v.to_algebraic()->m_interval; | ||||
|  | @ -2220,9 +2220,9 @@ namespace algebraic_numbers { | |||
|                 m_x(x), | ||||
|                 m_v(v) { | ||||
|             } | ||||
|             virtual manager & m() const { return m_am; } | ||||
|             virtual bool contains(polynomial::var x) const { return x == m_x || m_x2v.contains(x); } | ||||
|             virtual anum const & operator()(polynomial::var x) const { | ||||
|             manager & m() const override { return m_am; } | ||||
|             bool contains(polynomial::var x) const override { return x == m_x || m_x2v.contains(x); } | ||||
|             anum const & operator()(polynomial::var x) const override { | ||||
|                 if (x == m_x) | ||||
|                     return m_v; | ||||
|                 else | ||||
|  | @ -2553,9 +2553,9 @@ namespace algebraic_numbers { | |||
|                 m_x2v(x2v), | ||||
|                 m_v(v) { | ||||
|             } | ||||
|             virtual manager & m() const { return m_am; } | ||||
|             virtual bool contains(polynomial::var x) const { return true; } | ||||
|             virtual anum const & operator()(polynomial::var x) const { | ||||
|             manager & m() const override { return m_am; } | ||||
|             bool contains(polynomial::var x) const override { return true; } | ||||
|             anum const & operator()(polynomial::var x) const override { | ||||
|                 if (m_x2v.contains(x)) | ||||
|                     return m_x2v(x); | ||||
|                 else | ||||
|  |  | |||
|  | @ -6350,9 +6350,9 @@ namespace polynomial { | |||
|                 m_var_pos(buffer, xs_sz, xs), | ||||
|                 m_vs(vs) { | ||||
|             } | ||||
|             virtual unsynch_mpq_manager & m() const { UNREACHABLE(); static unsynch_mpq_manager m; return m; } | ||||
|             virtual bool contains(var x) const { return m_var_pos(x) != UINT_MAX; } | ||||
|             virtual mpq const & operator()(var x) const { return m_vs[m_var_pos(x)]; } | ||||
|             unsynch_mpq_manager & m() const override { UNREACHABLE(); static unsynch_mpq_manager m; return m; } | ||||
|             bool contains(var x) const override { return m_var_pos(x) != UINT_MAX; } | ||||
|             mpq const & operator()(var x) const override { return m_vs[m_var_pos(x)]; } | ||||
|         }; | ||||
| 
 | ||||
|         polynomial * substitute(polynomial const * p, unsigned xs_sz, var const * xs, mpq const * vs) { | ||||
|  | @ -6527,9 +6527,9 @@ namespace polynomial { | |||
|             numeral const & m_val; | ||||
|         public: | ||||
|             single_var2value(numeral_manager & m, var x, numeral const & val):m_manager(m), m_x(x), m_val(val) {} | ||||
|             virtual numeral_manager & m() const { return m_manager; } | ||||
|             virtual bool contains(var x) const { return m_x == x; } | ||||
|             virtual numeral const & operator()(var x) const { SASSERT(m_x == x); return m_val; } | ||||
|             numeral_manager & m() const override { return m_manager; } | ||||
|             bool contains(var x) const override { return m_x == x; } | ||||
|             numeral const & operator()(var x) const override { SASSERT(m_x == x); return m_val; } | ||||
|         }; | ||||
| 
 | ||||
|         void univ_eval(polynomial const * p, var x, numeral const & val, numeral & r) { | ||||
|  |  | |||
|  | @ -322,7 +322,7 @@ namespace upolynomial { | |||
|         /**
 | ||||
|            \brief Filter the ones not in the degree set. | ||||
|         */ | ||||
|         bool filter_current() const { | ||||
|         bool filter_current() const override { | ||||
|              | ||||
|             // select only the ones that have degrees in the degree set
 | ||||
|             if (!m_degree_set.in_set(current_degree())) { | ||||
|  |  | |||
|  | @ -344,13 +344,13 @@ namespace realclosure { | |||
|     // ---------------------------------
 | ||||
| 
 | ||||
|     struct mk_pi_interval : public mk_interval { | ||||
|         virtual void operator()(unsigned k, mpqi_manager & im, mpqi_manager::interval & r) { | ||||
|         void operator()(unsigned k, mpqi_manager & im, mpqi_manager::interval & r) override { | ||||
|             im.pi(k, r); | ||||
|         } | ||||
|     }; | ||||
| 
 | ||||
|     struct mk_e_interval : public mk_interval { | ||||
|         virtual void operator()(unsigned k, mpqi_manager & im, mpqi_manager::interval & r) { | ||||
|         void operator()(unsigned k, mpqi_manager & im, mpqi_manager::interval & r) override { | ||||
|             im.e(k, r); | ||||
|         } | ||||
|     }; | ||||
|  |  | |||
|  | @ -38,22 +38,22 @@ namespace subpaving { | |||
|         CTX m_ctx; | ||||
|     public: | ||||
|         context_wrapper(reslimit& lim, typename CTX::numeral_manager & m, params_ref const & p, small_object_allocator * a):m_ctx(lim, m, p, a) {} | ||||
|         virtual ~context_wrapper() {} | ||||
|         virtual unsigned num_vars() const { return m_ctx.num_vars(); } | ||||
|         virtual var mk_var(bool is_int) { return m_ctx.mk_var(is_int); } | ||||
|         virtual bool is_int(var x) const { return m_ctx.is_int(x); } | ||||
|         virtual var mk_monomial(unsigned sz, power const * pws) { return m_ctx.mk_monomial(sz, pws); } | ||||
|         virtual void inc_ref(ineq * a) { m_ctx.inc_ref(reinterpret_cast<typename CTX::ineq*>(a)); } | ||||
|         virtual void dec_ref(ineq * a) { m_ctx.dec_ref(reinterpret_cast<typename CTX::ineq*>(a)); } | ||||
|         virtual void add_clause(unsigned sz, ineq * const * atoms) { m_ctx.add_clause(sz, reinterpret_cast<typename CTX::ineq * const *>(atoms)); } | ||||
|         virtual void display_constraints(std::ostream & out, bool use_star) const { m_ctx.display_constraints(out, use_star); } | ||||
|         virtual void set_display_proc(display_var_proc * p) { m_ctx.set_display_proc(p); } | ||||
|         virtual void reset_statistics() { m_ctx.reset_statistics(); } | ||||
|         virtual void collect_statistics(statistics & st) const { m_ctx.collect_statistics(st); } | ||||
|         virtual void collect_param_descrs(param_descrs & r) { m_ctx.collect_param_descrs(r); } | ||||
|         virtual void updt_params(params_ref const & p) { m_ctx.updt_params(p); } | ||||
|         virtual void operator()() { m_ctx(); } | ||||
|         virtual void display_bounds(std::ostream & out) const { m_ctx.display_bounds(out); } | ||||
|         ~context_wrapper() override {} | ||||
|         unsigned num_vars() const override { return m_ctx.num_vars(); } | ||||
|         var mk_var(bool is_int) override { return m_ctx.mk_var(is_int); } | ||||
|         bool is_int(var x) const override { return m_ctx.is_int(x); } | ||||
|         var mk_monomial(unsigned sz, power const * pws) override { return m_ctx.mk_monomial(sz, pws); } | ||||
|         void inc_ref(ineq * a) override { m_ctx.inc_ref(reinterpret_cast<typename CTX::ineq*>(a)); } | ||||
|         void dec_ref(ineq * a) override { m_ctx.dec_ref(reinterpret_cast<typename CTX::ineq*>(a)); } | ||||
|         void add_clause(unsigned sz, ineq * const * atoms) override { m_ctx.add_clause(sz, reinterpret_cast<typename CTX::ineq * const *>(atoms)); } | ||||
|         void display_constraints(std::ostream & out, bool use_star) const override { m_ctx.display_constraints(out, use_star); } | ||||
|         void set_display_proc(display_var_proc * p) override { m_ctx.set_display_proc(p); } | ||||
|         void reset_statistics() override { m_ctx.reset_statistics(); } | ||||
|         void collect_statistics(statistics & st) const override { m_ctx.collect_statistics(st); } | ||||
|         void collect_param_descrs(param_descrs & r) override { m_ctx.collect_param_descrs(r); } | ||||
|         void updt_params(params_ref const & p) override { m_ctx.updt_params(p); } | ||||
|         void operator()() override { m_ctx(); } | ||||
|         void display_bounds(std::ostream & out) const override { m_ctx.display_bounds(out); } | ||||
|     }; | ||||
| 
 | ||||
|     class context_mpq_wrapper : public context_wrapper<context_mpq> { | ||||
|  | @ -66,11 +66,11 @@ namespace subpaving { | |||
|             m_as(m)  | ||||
|         {} | ||||
| 
 | ||||
|         virtual ~context_mpq_wrapper() {} | ||||
|         ~context_mpq_wrapper() override {} | ||||
| 
 | ||||
|         virtual unsynch_mpq_manager & qm() const { return m_ctx.nm(); } | ||||
|         unsynch_mpq_manager & qm() const override { return m_ctx.nm(); } | ||||
| 
 | ||||
|         virtual var mk_sum(mpz const & c, unsigned sz, mpz const * as, var const * xs) { | ||||
|         var mk_sum(mpz const & c, unsigned sz, mpz const * as, var const * xs) override { | ||||
|             m_as.reserve(sz); | ||||
|             for (unsigned i = 0; i < sz; i++) { | ||||
|                 m_ctx.nm().set(m_as[i], as[i]); | ||||
|  | @ -78,7 +78,7 @@ namespace subpaving { | |||
|             m_ctx.nm().set(m_c, c); | ||||
|             return m_ctx.mk_sum(m_c, sz, m_as.c_ptr(), xs); | ||||
|         } | ||||
|         virtual ineq * mk_ineq(var x, mpq const & k, bool lower, bool open) {  | ||||
|         ineq * mk_ineq(var x, mpq const & k, bool lower, bool open) override { | ||||
|             return reinterpret_cast<ineq*>(m_ctx.mk_ineq(x, k, lower, open));  | ||||
|         } | ||||
|     }; | ||||
|  | @ -108,11 +108,11 @@ namespace subpaving { | |||
|             m_q2(m_qm) { | ||||
|         } | ||||
| 
 | ||||
|         virtual ~context_mpf_wrapper() {} | ||||
|         ~context_mpf_wrapper() override {} | ||||
| 
 | ||||
|         virtual unsynch_mpq_manager & qm() const { return m_qm; } | ||||
|         unsynch_mpq_manager & qm() const override { return m_qm; } | ||||
| 
 | ||||
|         virtual var mk_sum(mpz const & c, unsigned sz, mpz const * as, var const * xs) { | ||||
|         var mk_sum(mpz const & c, unsigned sz, mpz const * as, var const * xs) override { | ||||
|             try { | ||||
|                 m_as.reserve(sz); | ||||
|                 for (unsigned i = 0; i < sz; i++) { | ||||
|  | @ -125,7 +125,7 @@ namespace subpaving { | |||
|                 throw subpaving::exception(); | ||||
|             } | ||||
|         } | ||||
|         virtual ineq * mk_ineq(var x, mpq const & k, bool lower, bool open) {  | ||||
|         ineq * mk_ineq(var x, mpq const & k, bool lower, bool open) override { | ||||
|             try { | ||||
|                 f2n<mpf_manager> & m = m_ctx.nm(); | ||||
|                 if (lower) | ||||
|  | @ -165,11 +165,11 @@ namespace subpaving { | |||
|             m_qm(qm) { | ||||
|         } | ||||
| 
 | ||||
|         virtual ~context_hwf_wrapper() {} | ||||
|         ~context_hwf_wrapper() override {} | ||||
| 
 | ||||
|         virtual unsynch_mpq_manager & qm() const { return m_qm; } | ||||
|         unsynch_mpq_manager & qm() const override { return m_qm; } | ||||
| 
 | ||||
|         virtual var mk_sum(mpz const & c, unsigned sz, mpz const * as, var const * xs) { | ||||
|         var mk_sum(mpz const & c, unsigned sz, mpz const * as, var const * xs) override { | ||||
|             try { | ||||
|                 m_as.reserve(sz); | ||||
|                 for (unsigned i = 0; i < sz; i++) { | ||||
|  | @ -182,7 +182,7 @@ namespace subpaving { | |||
|                 throw subpaving::exception(); | ||||
|             } | ||||
|         } | ||||
|         virtual ineq * mk_ineq(var x, mpq const & k, bool lower, bool open) {  | ||||
|         ineq * mk_ineq(var x, mpq const & k, bool lower, bool open) override { | ||||
|             try { | ||||
|                 f2n<hwf_manager> & m = m_ctx.nm(); | ||||
|                 if (lower) | ||||
|  | @ -223,11 +223,11 @@ namespace subpaving { | |||
|             m_z2(m_qm) { | ||||
|         } | ||||
| 
 | ||||
|         virtual ~context_fpoint_wrapper() {} | ||||
|         ~context_fpoint_wrapper() override {} | ||||
| 
 | ||||
|         virtual unsynch_mpq_manager & qm() const { return m_qm; } | ||||
|         unsynch_mpq_manager & qm() const override { return m_qm; } | ||||
| 
 | ||||
|         virtual var mk_sum(mpz const & c, unsigned sz, mpz const * as, var const * xs) { | ||||
|         var mk_sum(mpz const & c, unsigned sz, mpz const * as, var const * xs) override { | ||||
|             try { | ||||
|                 m_as.reserve(sz); | ||||
|                 for (unsigned i = 0; i < sz; i++) { | ||||
|  | @ -241,7 +241,7 @@ namespace subpaving { | |||
|             } | ||||
|         } | ||||
|          | ||||
|         virtual ineq * mk_ineq(var x, mpq const & k, bool lower, bool open) {  | ||||
|         ineq * mk_ineq(var x, mpq const & k, bool lower, bool open) override { | ||||
|             try { | ||||
|                 typename context_fpoint::numeral_manager & m = this->m_ctx.nm(); | ||||
|                 if (lower) | ||||
|  |  | |||
|  | @ -36,7 +36,7 @@ public: | |||
|         context_t<C>::node_selector(ctx) { | ||||
|     } | ||||
| 
 | ||||
|     virtual node * operator()(node * front, node * back) { | ||||
|     node * operator()(node * front, node * back) override { | ||||
|         return back; | ||||
|     } | ||||
| }; | ||||
|  | @ -80,7 +80,7 @@ public: | |||
|     } | ||||
| 
 | ||||
|     // Return the next variable to branch.
 | ||||
|     virtual var operator()(typename context_t<C>::node * n) { | ||||
|     var operator()(typename context_t<C>::node * n) override { | ||||
|         typename context_t<C>::numeral_manager & nm = this->ctx()->nm(); | ||||
|         SASSERT(this->ctx()->num_vars() > 0); | ||||
|         var x = this->ctx()->splitting_var(n); | ||||
|  | @ -197,7 +197,7 @@ public: | |||
|         SASSERT(m_delta < INT_MAX); | ||||
|     } | ||||
| 
 | ||||
|     virtual void operator()(node * n, var x) { | ||||
|     void operator()(node * n, var x) override { | ||||
|         SASSERT(!n->inconsistent()); | ||||
|         numeral_manager & nm = this->ctx()->nm(); | ||||
|         node * left   = this->mk_node(n); | ||||
|  |  | |||
|  | @ -40,7 +40,7 @@ class subpaving_tactic : public tactic { | |||
|          | ||||
|         ast_manager & m() const { return m_inv.get_manager(); } | ||||
|          | ||||
|         virtual void operator()(std::ostream & out, subpaving::var x) const {  | ||||
|         void operator()(std::ostream & out, subpaving::var x) const override { | ||||
|             expr * t = m_inv.get(x, 0); | ||||
|             if (t != 0) | ||||
|                 out << mk_ismt2_pp(t, m()); | ||||
|  | @ -216,36 +216,36 @@ public: | |||
|         m_params(p) { | ||||
|     } | ||||
| 
 | ||||
|     virtual ~subpaving_tactic() { | ||||
|     ~subpaving_tactic() override { | ||||
|         dealloc(m_imp); | ||||
|     } | ||||
| 
 | ||||
|     virtual tactic * translate(ast_manager & m) { | ||||
|     tactic * translate(ast_manager & m) override { | ||||
|         return alloc(subpaving_tactic, m, m_params); | ||||
|     } | ||||
| 
 | ||||
|     virtual void updt_params(params_ref const & p) { | ||||
|     void updt_params(params_ref const & p) override { | ||||
|         m_params = p; | ||||
|         m_imp->updt_params(p); | ||||
|     } | ||||
| 
 | ||||
|     virtual void collect_param_descrs(param_descrs & r) {         | ||||
|     void collect_param_descrs(param_descrs & r) override { | ||||
|         m_imp->collect_param_descrs(r); | ||||
|     } | ||||
| 
 | ||||
|     virtual void collect_statistics(statistics & st) const { | ||||
|     void collect_statistics(statistics & st) const override { | ||||
|         st.copy(m_stats); | ||||
|     } | ||||
| 
 | ||||
|     virtual void reset_statistics() { | ||||
|     void reset_statistics() override { | ||||
|         m_stats.reset(); | ||||
|     } | ||||
| 
 | ||||
|     virtual void operator()(goal_ref const & in,  | ||||
|                             goal_ref_buffer & result,  | ||||
|                             model_converter_ref & mc,  | ||||
|                             proof_converter_ref & pc, | ||||
|                             expr_dependency_ref & core) { | ||||
|     void operator()(goal_ref const & in, | ||||
|                     goal_ref_buffer & result, | ||||
|                     model_converter_ref & mc, | ||||
|                     proof_converter_ref & pc, | ||||
|                     expr_dependency_ref & core) override { | ||||
|         try { | ||||
|             m_imp->process(*in); | ||||
|             m_imp->collect_statistics(m_stats); | ||||
|  | @ -261,7 +261,7 @@ public: | |||
|         } | ||||
|     } | ||||
|      | ||||
|     virtual void cleanup() { | ||||
|     void cleanup() override { | ||||
|         ast_manager & m = m_imp->m(); | ||||
|         dealloc(m_imp); | ||||
|         m_imp = alloc(imp, m, m_params); | ||||
|  |  | |||
|  | @ -90,10 +90,10 @@ namespace datalog { | |||
|             return idx; | ||||
|         } | ||||
| 
 | ||||
|         virtual unsigned get_constant_count() const { | ||||
|         unsigned get_constant_count() const override { | ||||
|             return m_el_names.size(); | ||||
|         } | ||||
|         virtual void print_element(finite_element el_num, std::ostream & out) { | ||||
|         void print_element(finite_element el_num, std::ostream & out) override { | ||||
|             if (el_num>=m_el_names.size()) { | ||||
|                 out << el_num; | ||||
|                 return; | ||||
|  | @ -132,10 +132,10 @@ namespace datalog { | |||
|             } | ||||
|             return idx; | ||||
|         } | ||||
|         virtual unsigned get_constant_count() const { | ||||
|         unsigned get_constant_count() const override { | ||||
|             return m_el_names.size(); | ||||
|         } | ||||
|         virtual void print_element(finite_element el_num, std::ostream & out) { | ||||
|         void print_element(finite_element el_num, std::ostream & out) override { | ||||
|             if (el_num >= m_el_names.size()) { | ||||
|                 out << "<unk " << m_sort->get_name() << ":" << el_num << '>'; | ||||
|                 return; | ||||
|  | @ -159,9 +159,9 @@ namespace datalog { | |||
|     public: | ||||
|         restore_rules(rule_set& r): m_old_rules(alloc(rule_set, r)) {} | ||||
| 
 | ||||
|         virtual ~restore_rules() {} | ||||
|         ~restore_rules() override {} | ||||
|          | ||||
|         virtual void undo(context& ctx) { | ||||
|         void undo(context& ctx) override { | ||||
|             ctx.replace_rules(*m_old_rules); | ||||
|             reset(); | ||||
|         } | ||||
|  | @ -173,8 +173,8 @@ namespace datalog { | |||
|         unsigned m_old_size; | ||||
|     public: | ||||
|         restore_vec_size_trail(Vec& v): m_vector(v), m_old_size(v.size()) {} | ||||
|         virtual ~restore_vec_size_trail() {} | ||||
|         virtual void undo(Ctx& ctx) { m_vector.shrink(m_old_size); } | ||||
|         ~restore_vec_size_trail() override {} | ||||
|         void undo(Ctx& ctx) override { m_vector.shrink(m_old_size); } | ||||
|     }; | ||||
| 
 | ||||
|     void context::push() { | ||||
|  |  | |||
|  | @ -110,7 +110,7 @@ namespace datalog { | |||
|     class rel_context_base : public engine_base { | ||||
|     public: | ||||
|         rel_context_base(ast_manager& m, char const* name): engine_base(m, name) {} | ||||
|         virtual ~rel_context_base() {} | ||||
|         ~rel_context_base() override {} | ||||
|         virtual relation_manager & get_rmanager() = 0; | ||||
|         virtual const relation_manager & get_rmanager() const = 0; | ||||
|         virtual relation_base & get_relation(func_decl * pred) = 0; | ||||
|  | @ -146,9 +146,9 @@ namespace datalog { | |||
|             context const& ctx; | ||||
|         public: | ||||
|             contains_pred(context& ctx): ctx(ctx) {} | ||||
|             virtual ~contains_pred() {} | ||||
|             ~contains_pred() override {} | ||||
|              | ||||
|             virtual bool operator()(expr* e) { | ||||
|             bool operator()(expr* e) override { | ||||
|                 return ctx.is_predicate(e); | ||||
|             } | ||||
|         }; | ||||
|  |  | |||
|  | @ -385,7 +385,7 @@ namespace datalog { | |||
|     public: | ||||
|         skip_model_converter() {} | ||||
|   | ||||
|         virtual model_converter * translate(ast_translation & translator) {  | ||||
|         model_converter * translate(ast_translation & translator) override { | ||||
|             return alloc(skip_model_converter); | ||||
|         } | ||||
| 
 | ||||
|  | @ -394,12 +394,12 @@ namespace datalog { | |||
|     model_converter* mk_skip_model_converter() { return alloc(skip_model_converter); } | ||||
| 
 | ||||
|     class skip_proof_converter : public proof_converter { | ||||
|         virtual void operator()(ast_manager & m, unsigned num_source, proof * const * source, proof_ref & result) { | ||||
|         void operator()(ast_manager & m, unsigned num_source, proof * const * source, proof_ref & result) override { | ||||
|             SASSERT(num_source == 1); | ||||
|             result = source[0]; | ||||
|         } | ||||
| 
 | ||||
|         virtual proof_converter * translate(ast_translation & translator) { | ||||
|         proof_converter * translate(ast_translation & translator) override { | ||||
|             return alloc(skip_proof_converter); | ||||
|         } | ||||
| 
 | ||||
|  |  | |||
|  | @ -55,18 +55,18 @@ namespace datalog { | |||
|     public: | ||||
|         bmc(context& ctx); | ||||
| 
 | ||||
|         ~bmc(); | ||||
|         ~bmc() override; | ||||
| 
 | ||||
|         lbool query(expr* query); | ||||
|         lbool query(expr* query) override; | ||||
| 
 | ||||
|         void display_certificate(std::ostream& out) const; | ||||
|         void display_certificate(std::ostream& out) const override; | ||||
| 
 | ||||
|         void collect_statistics(statistics& st) const; | ||||
|         void collect_statistics(statistics& st) const override; | ||||
| 
 | ||||
|         void reset_statistics();  | ||||
|         void get_rules_along_trace(datalog::rule_ref_vector& rules); | ||||
|         void reset_statistics() override; | ||||
|         void get_rules_along_trace(datalog::rule_ref_vector& rules) override; | ||||
| 
 | ||||
|         expr_ref get_answer(); | ||||
|         expr_ref get_answer() override; | ||||
| 
 | ||||
|         // direct access to (new) non-linear compiler.
 | ||||
|         void compile(rule_set const& rules, expr_ref_vector& fmls, unsigned level); | ||||
|  |  | |||
|  | @ -32,12 +32,12 @@ namespace datalog { | |||
|         imp* m_imp; | ||||
|     public: | ||||
|         clp(context& ctx); | ||||
|         ~clp(); | ||||
|         virtual lbool query(expr* query); | ||||
|         virtual void reset_statistics(); | ||||
|         virtual void collect_statistics(statistics& st) const; | ||||
|         virtual void display_certificate(std::ostream& out) const;         | ||||
|         virtual expr_ref get_answer(); | ||||
|         ~clp() override; | ||||
|         lbool query(expr* query) override; | ||||
|         void reset_statistics() override; | ||||
|         void collect_statistics(statistics& st) const override; | ||||
|         void display_certificate(std::ostream& out) const override; | ||||
|         expr_ref get_answer() override; | ||||
|     }; | ||||
| }; | ||||
| 
 | ||||
|  |  | |||
|  | @ -35,12 +35,12 @@ namespace datalog { | |||
|         imp* m_imp; | ||||
|     public: | ||||
|         ddnf(context& ctx); | ||||
|         ~ddnf(); | ||||
|         virtual lbool query(expr* query); | ||||
|         virtual void reset_statistics(); | ||||
|         virtual void collect_statistics(statistics& st) const; | ||||
|         virtual void display_certificate(std::ostream& out) const;         | ||||
|         virtual expr_ref get_answer(); | ||||
|         ~ddnf() override; | ||||
|         lbool query(expr* query) override; | ||||
|         void reset_statistics() override; | ||||
|         void collect_statistics(statistics& st) const override; | ||||
|         void display_certificate(std::ostream& out) const override; | ||||
|         expr_ref get_answer() override; | ||||
|     }; | ||||
| 
 | ||||
|     class ddnf_node; | ||||
|  |  | |||
|  | @ -41,33 +41,33 @@ namespace Duality { | |||
| 
 | ||||
|     public: | ||||
|         dl_interface(datalog::context& ctx);  | ||||
|         ~dl_interface(); | ||||
|         ~dl_interface() override; | ||||
|          | ||||
|         lbool query(expr* query); | ||||
|         lbool query(expr* query) override; | ||||
| 
 | ||||
|         void cancel(); | ||||
|         void cancel() override; | ||||
| 
 | ||||
|         void cleanup(); | ||||
|         void cleanup() override; | ||||
| 
 | ||||
|         void display_certificate(std::ostream& out) const; | ||||
|         void display_certificate(std::ostream& out) const override; | ||||
| 
 | ||||
|         void collect_statistics(statistics& st) const; | ||||
|         void collect_statistics(statistics& st) const override; | ||||
| 
 | ||||
|         void reset_statistics(); | ||||
|         void reset_statistics() override; | ||||
| 
 | ||||
|         expr_ref get_answer(); | ||||
|         expr_ref get_answer() override; | ||||
| 
 | ||||
|         unsigned get_num_levels(func_decl* pred); | ||||
|         unsigned get_num_levels(func_decl* pred) override; | ||||
| 
 | ||||
|         expr_ref get_cover_delta(int level, func_decl* pred); | ||||
|         expr_ref get_cover_delta(int level, func_decl* pred) override; | ||||
|         | ||||
|         void add_cover(int level, func_decl* pred, expr* property); | ||||
|         void add_cover(int level, func_decl* pred, expr* property) override; | ||||
|                 | ||||
|         void updt_params(); | ||||
|         void updt_params() override; | ||||
| 
 | ||||
|         model_ref get_model(); | ||||
|         model_ref get_model() override; | ||||
| 
 | ||||
|         proof_ref get_proof(); | ||||
|         proof_ref get_proof() override; | ||||
|          | ||||
|         duality_data *dd(){return _d;} | ||||
| 
 | ||||
|  |  | |||
|  | @ -494,7 +494,7 @@ public: | |||
|     { | ||||
|     } | ||||
| 
 | ||||
|     virtual bool parse_file(char const * filename) { | ||||
|     bool parse_file(char const * filename) override { | ||||
|         reset(); | ||||
|         if (filename != 0) {             | ||||
|             set_path(filename); | ||||
|  | @ -510,7 +510,7 @@ public: | |||
|         } | ||||
|     } | ||||
| 
 | ||||
|     virtual bool parse_string(char const * string) { | ||||
|     bool parse_string(char const * string) override { | ||||
|         reset(); | ||||
|         std::string s(string); | ||||
|         std::istringstream is(s); | ||||
|  | @ -1200,13 +1200,13 @@ public: | |||
|           m_short_sort(ctx.get_manager()), | ||||
|           m_use_map_names(ctx.use_map_names()) { | ||||
|     } | ||||
|     ~wpa_parser_impl() { | ||||
|     ~wpa_parser_impl() override { | ||||
|         reset_dealloc_values(m_sort_contents); | ||||
|     } | ||||
|     void reset() { | ||||
|     } | ||||
| 
 | ||||
|     virtual bool parse_directory(char const * path) { | ||||
|     bool parse_directory(char const * path) override { | ||||
|         bool result = false; | ||||
|         try { | ||||
|             result = parse_directory_core(path); | ||||
|  |  | |||
|  | @ -166,10 +166,10 @@ public: | |||
|         m_arg_idx(0), | ||||
|         m_t(0), | ||||
|         m_bound(UINT_MAX) {} | ||||
|     virtual char const * get_usage() const { return "(forall (q) (=> (and body) head)) :optional-name :optional-recursion-bound"; } | ||||
|     virtual char const * get_descr(cmd_context & ctx) const { return "add a Horn rule."; } | ||||
|     virtual unsigned get_arity() const { return VAR_ARITY; } | ||||
|     virtual cmd_arg_kind next_arg_kind(cmd_context & ctx) const {  | ||||
|     char const * get_usage() const override { return "(forall (q) (=> (and body) head)) :optional-name :optional-recursion-bound"; } | ||||
|     char const * get_descr(cmd_context & ctx) const override { return "add a Horn rule."; } | ||||
|     unsigned get_arity() const override { return VAR_ARITY; } | ||||
|     cmd_arg_kind next_arg_kind(cmd_context & ctx) const override { | ||||
|         switch(m_arg_idx) { | ||||
|         case 0: return CPK_EXPR; | ||||
|         case 1: return CPK_SYMBOL; | ||||
|  | @ -177,23 +177,23 @@ public: | |||
|         default: return CPK_SYMBOL; | ||||
|         } | ||||
|     } | ||||
|     virtual void set_next_arg(cmd_context & ctx, expr * t) { | ||||
|     void set_next_arg(cmd_context & ctx, expr * t) override { | ||||
|         m_t = t; | ||||
|         m_arg_idx++; | ||||
|     } | ||||
|     virtual void set_next_arg(cmd_context & ctx, symbol const & s) { | ||||
|     void set_next_arg(cmd_context & ctx, symbol const & s) override { | ||||
|         m_name = s; | ||||
|         m_arg_idx++; | ||||
|     } | ||||
|     virtual void set_next_arg(cmd_context & ctx, unsigned bound) { | ||||
|     void set_next_arg(cmd_context & ctx, unsigned bound) override { | ||||
|         m_bound = bound; | ||||
|         m_arg_idx++; | ||||
|     } | ||||
|     virtual void reset(cmd_context & ctx) { m_dl_ctx->reset(); prepare(ctx); m_t = nullptr; } | ||||
|     virtual void prepare(cmd_context& ctx) { m_arg_idx = 0; m_name = symbol::null; m_bound = UINT_MAX; } | ||||
|     virtual void finalize(cmd_context & ctx) {  | ||||
|     void reset(cmd_context & ctx) override { m_dl_ctx->reset(); prepare(ctx); m_t = nullptr; } | ||||
|     void prepare(cmd_context& ctx) override { m_arg_idx = 0; m_name = symbol::null; m_bound = UINT_MAX; } | ||||
|     void finalize(cmd_context & ctx) override { | ||||
|     } | ||||
|     virtual void execute(cmd_context & ctx) { | ||||
|     void execute(cmd_context & ctx) override { | ||||
|         if (!m_t) throw cmd_exception("invalid rule, expected formula"); | ||||
|         m_dl_ctx->add_rule(m_t, m_name, m_bound); | ||||
|     } | ||||
|  | @ -208,17 +208,17 @@ public: | |||
|         m_dl_ctx(dl_ctx), | ||||
|         m_target(0) { | ||||
|     } | ||||
|     virtual char const * get_usage() const { return "predicate"; } | ||||
|     virtual char const * get_main_descr() const {  | ||||
|     char const * get_usage() const override { return "predicate"; } | ||||
|     char const * get_main_descr() const override { | ||||
|         return "pose a query to a predicate based on the Horn rules.";  | ||||
|     } | ||||
| 
 | ||||
|     virtual cmd_arg_kind next_arg_kind(cmd_context & ctx) const {  | ||||
|     cmd_arg_kind next_arg_kind(cmd_context & ctx) const override { | ||||
|         if (m_target == 0) return CPK_FUNC_DECL; | ||||
|         return parametric_cmd::next_arg_kind(ctx); | ||||
|     } | ||||
| 
 | ||||
|     virtual void set_next_arg(cmd_context & ctx, func_decl* t) { | ||||
|     void set_next_arg(cmd_context & ctx, func_decl* t) override { | ||||
|         m_target = t; | ||||
|         if (t->get_family_id() != null_family_id) { | ||||
|             throw cmd_exception("Invalid query argument, expected uinterpreted function name, but argument is interpreted"); | ||||
|  | @ -229,13 +229,13 @@ public: | |||
|         } | ||||
|     } | ||||
| 
 | ||||
|     virtual void prepare(cmd_context & ctx) {  | ||||
|     void prepare(cmd_context & ctx) override { | ||||
|         ctx.m(); // ensure manager is initialized.
 | ||||
|         parametric_cmd::prepare(ctx); | ||||
|         m_target   = 0;  | ||||
|     } | ||||
| 
 | ||||
|     virtual void execute(cmd_context& ctx) { | ||||
|     void execute(cmd_context& ctx) override { | ||||
|         if (m_target == 0) { | ||||
|             throw cmd_exception("invalid query command, argument expected"); | ||||
|         } | ||||
|  | @ -321,7 +321,7 @@ public: | |||
|         m_target = 0; | ||||
|     } | ||||
| 
 | ||||
|     virtual void init_pdescrs(cmd_context & ctx, param_descrs & p) { | ||||
|     void init_pdescrs(cmd_context & ctx, param_descrs & p) override { | ||||
|         m_dl_ctx->dlctx().collect_params(p); | ||||
|     } | ||||
|     | ||||
|  | @ -385,30 +385,30 @@ public: | |||
|         m_dl_ctx(dl_ctx), | ||||
|         m_domain(0) {} | ||||
| 
 | ||||
|     virtual char const * get_usage() const { return "<symbol> (<arg1 sort> ...) <representation>*"; } | ||||
|     virtual char const * get_descr(cmd_context & ctx) const { return "declare new relation"; } | ||||
|     virtual unsigned get_arity() const { return VAR_ARITY; } | ||||
|     char const * get_usage() const override { return "<symbol> (<arg1 sort> ...) <representation>*"; } | ||||
|     char const * get_descr(cmd_context & ctx) const override { return "declare new relation"; } | ||||
|     unsigned get_arity() const override { return VAR_ARITY; } | ||||
| 
 | ||||
|     virtual void prepare(cmd_context & ctx) { | ||||
|     void prepare(cmd_context & ctx) override { | ||||
|         ctx.m(); // ensure manager is initialized.
 | ||||
|         m_arg_idx = 0;  | ||||
|         m_query_arg_idx = 0;  | ||||
|         m_domain.reset(); | ||||
|         m_kinds.reset(); | ||||
|     } | ||||
|     virtual cmd_arg_kind next_arg_kind(cmd_context & ctx) const {  | ||||
|     cmd_arg_kind next_arg_kind(cmd_context & ctx) const override { | ||||
|         switch(m_query_arg_idx++) { | ||||
|         case 0: return CPK_SYMBOL;     // relation name
 | ||||
|         case 1: return CPK_SORT_LIST;  // arguments
 | ||||
|         default: return CPK_SYMBOL;    // optional representation specification
 | ||||
|         } | ||||
|     } | ||||
|     virtual void set_next_arg(cmd_context & ctx, unsigned num, sort * const * slist) { | ||||
|     void set_next_arg(cmd_context & ctx, unsigned num, sort * const * slist) override { | ||||
|         m_domain.reset(); | ||||
|         m_domain.append(num, slist); | ||||
|         m_arg_idx++; | ||||
|     } | ||||
|     virtual void set_next_arg(cmd_context & ctx, symbol const & s) { | ||||
|     void set_next_arg(cmd_context & ctx, symbol const & s) override { | ||||
|         if(m_arg_idx==0) { | ||||
|             m_rel_name = s; | ||||
|         } | ||||
|  | @ -418,7 +418,7 @@ public: | |||
|         } | ||||
|         m_arg_idx++; | ||||
|     } | ||||
|     virtual void execute(cmd_context & ctx) { | ||||
|     void execute(cmd_context & ctx) override { | ||||
|         if(m_arg_idx<2) { | ||||
|             throw cmd_exception("at least 2 arguments expected"); | ||||
|         } | ||||
|  | @ -444,15 +444,15 @@ public: | |||
|         m_dl_ctx(dl_ctx) | ||||
|     {} | ||||
|      | ||||
|     virtual char const * get_usage() const { return "<symbol> <sort>"; } | ||||
|     virtual char const * get_descr(cmd_context & ctx) const { return "declare constant as variable"; } | ||||
|     virtual unsigned get_arity() const { return 2; } | ||||
|     char const * get_usage() const override { return "<symbol> <sort>"; } | ||||
|     char const * get_descr(cmd_context & ctx) const override { return "declare constant as variable"; } | ||||
|     unsigned get_arity() const override { return 2; } | ||||
| 
 | ||||
|     virtual void prepare(cmd_context & ctx) { | ||||
|     void prepare(cmd_context & ctx) override { | ||||
|         ctx.m(); // ensure manager is initialized.
 | ||||
|         m_arg_idx = 0;  | ||||
|     } | ||||
|     virtual cmd_arg_kind next_arg_kind(cmd_context & ctx) const {  | ||||
|     cmd_arg_kind next_arg_kind(cmd_context & ctx) const override { | ||||
|         SASSERT(m_arg_idx <= 1); | ||||
|         if (m_arg_idx == 0) { | ||||
|             return CPK_SYMBOL;   | ||||
|  | @ -460,17 +460,17 @@ public: | |||
|         return CPK_SORT;  | ||||
|     } | ||||
| 
 | ||||
|     virtual void set_next_arg(cmd_context & ctx, sort* s) { | ||||
|     void set_next_arg(cmd_context & ctx, sort* s) override { | ||||
|         m_var_sort = s; | ||||
|         ++m_arg_idx; | ||||
|     } | ||||
| 
 | ||||
|     virtual void set_next_arg(cmd_context & ctx, symbol const & s) { | ||||
|     void set_next_arg(cmd_context & ctx, symbol const & s) override { | ||||
|         m_var_name = s;    | ||||
|         ++m_arg_idx; | ||||
|     } | ||||
| 
 | ||||
|     virtual void execute(cmd_context & ctx) { | ||||
|     void execute(cmd_context & ctx) override { | ||||
|         ast_manager& m = ctx.m(); | ||||
|         func_decl_ref var(m.mk_func_decl(m_var_name, 0, static_cast<sort*const*>(0), m_var_sort), m); | ||||
|         ctx.insert(var); | ||||
|  | @ -489,10 +489,10 @@ public: | |||
|       m_dl_ctx(dl_ctx) | ||||
|     {} | ||||
| 
 | ||||
|     virtual char const * get_usage() const { return ""; } | ||||
|     virtual char const * get_descr(cmd_context & ctx) const { return "push the fixedpoint context"; } | ||||
|     virtual unsigned get_arity() const { return 0; } | ||||
|     virtual void execute(cmd_context & ctx) { | ||||
|     char const * get_usage() const override { return ""; } | ||||
|     char const * get_descr(cmd_context & ctx) const override { return "push the fixedpoint context"; } | ||||
|     unsigned get_arity() const override { return 0; } | ||||
|     void execute(cmd_context & ctx) override { | ||||
|         m_dl_ctx->push(); | ||||
|     } | ||||
| }; | ||||
|  | @ -508,10 +508,10 @@ public: | |||
|       m_dl_ctx(dl_ctx) | ||||
|     {} | ||||
| 
 | ||||
|     virtual char const * get_usage() const { return ""; } | ||||
|     virtual char const * get_descr(cmd_context & ctx) const { return "pop the fixedpoint context"; } | ||||
|     virtual unsigned get_arity() const { return 0; } | ||||
|     virtual void execute(cmd_context & ctx) { | ||||
|     char const * get_usage() const override { return ""; } | ||||
|     char const * get_descr(cmd_context & ctx) const override { return "pop the fixedpoint context"; } | ||||
|     unsigned get_arity() const override { return 0; } | ||||
|     void execute(cmd_context & ctx) override { | ||||
|         m_dl_ctx->pop(); | ||||
|     } | ||||
| }; | ||||
|  |  | |||
|  | @ -27,8 +27,8 @@ namespace datalog { | |||
|         context* m_ctx; | ||||
|     public: | ||||
|         register_engine(); | ||||
|         engine_base* mk_engine(DL_ENGINE engine_type); | ||||
|         void set_context(context* ctx) { m_ctx = ctx; } | ||||
|         engine_base* mk_engine(DL_ENGINE engine_type) override; | ||||
|         void set_context(context* ctx) override { m_ctx = ctx; } | ||||
|     }; | ||||
| 
 | ||||
| } | ||||
|  |  | |||
|  | @ -365,43 +365,43 @@ public: | |||
|         m_imp = alloc(imp, t, m, p); | ||||
|     } | ||||
| 
 | ||||
|     virtual tactic * translate(ast_manager & m) { | ||||
|     tactic * translate(ast_manager & m) override { | ||||
|         return alloc(horn_tactic, m_is_simplify, m, m_params); | ||||
|     } | ||||
|          | ||||
|     virtual ~horn_tactic() { | ||||
|     ~horn_tactic() override { | ||||
|         dealloc(m_imp); | ||||
|     } | ||||
| 
 | ||||
|     virtual void updt_params(params_ref const & p) { | ||||
|     void updt_params(params_ref const & p) override { | ||||
|         m_params = p; | ||||
|         m_imp->updt_params(p); | ||||
|     } | ||||
| 
 | ||||
|     | ||||
|     virtual void collect_param_descrs(param_descrs & r) { | ||||
|     void collect_param_descrs(param_descrs & r) override { | ||||
|         m_imp->collect_param_descrs(r); | ||||
|     } | ||||
|      | ||||
|     virtual void operator()(goal_ref const & in,  | ||||
|                             goal_ref_buffer & result,  | ||||
|                             model_converter_ref & mc,  | ||||
|                             proof_converter_ref & pc, | ||||
|                             expr_dependency_ref & core) { | ||||
|     void operator()(goal_ref const & in, | ||||
|                     goal_ref_buffer & result, | ||||
|                     model_converter_ref & mc, | ||||
|                     proof_converter_ref & pc, | ||||
|                     expr_dependency_ref & core) override { | ||||
|         (*m_imp)(in, result, mc, pc, core); | ||||
|     } | ||||
|      | ||||
|     virtual void collect_statistics(statistics & st) const { | ||||
|     void collect_statistics(statistics & st) const override { | ||||
|         m_imp->collect_statistics(st); | ||||
|         st.copy(m_stats); | ||||
|     } | ||||
| 
 | ||||
|     virtual void reset_statistics() { | ||||
|     void reset_statistics() override { | ||||
|         m_stats.reset(); | ||||
|         m_imp->reset_statistics(); | ||||
|     } | ||||
|      | ||||
|     virtual void cleanup() { | ||||
|     void cleanup() override { | ||||
|         ast_manager & m = m_imp->m; | ||||
|         m_imp->collect_statistics(m_stats); | ||||
|         dealloc(m_imp); | ||||
|  |  | |||
|  | @ -47,29 +47,29 @@ namespace pdr { | |||
| 
 | ||||
|     public: | ||||
|         dl_interface(datalog::context& ctx);  | ||||
|         ~dl_interface(); | ||||
|         ~dl_interface() override; | ||||
|          | ||||
|         virtual lbool query(expr* query); | ||||
|         lbool query(expr* query) override; | ||||
| 
 | ||||
|         virtual void display_certificate(std::ostream& out) const; | ||||
|         void display_certificate(std::ostream& out) const override; | ||||
| 
 | ||||
|         virtual void collect_statistics(statistics& st) const; | ||||
|         void collect_statistics(statistics& st) const override; | ||||
| 
 | ||||
|         virtual void reset_statistics(); | ||||
|         void reset_statistics() override; | ||||
| 
 | ||||
|         virtual expr_ref get_answer(); | ||||
|         expr_ref get_answer() override; | ||||
| 
 | ||||
|         virtual unsigned get_num_levels(func_decl* pred); | ||||
|         unsigned get_num_levels(func_decl* pred) override; | ||||
| 
 | ||||
|         virtual expr_ref get_cover_delta(int level, func_decl* pred); | ||||
|         expr_ref get_cover_delta(int level, func_decl* pred) override; | ||||
|         | ||||
|         virtual void add_cover(int level, func_decl* pred, expr* property); | ||||
|         void add_cover(int level, func_decl* pred, expr* property) override; | ||||
|                 | ||||
|         virtual void updt_params(); | ||||
|         void updt_params() override; | ||||
| 
 | ||||
|         virtual model_ref get_model(); | ||||
|         model_ref get_model() override; | ||||
| 
 | ||||
|         virtual proof_ref get_proof(); | ||||
|         proof_ref get_proof() override; | ||||
|          | ||||
|     }; | ||||
| } | ||||
|  |  | |||
|  | @ -30,8 +30,8 @@ namespace pdr { | |||
|         unsigned m_failure_limit; | ||||
|     public: | ||||
|         core_bool_inductive_generalizer(context& ctx, unsigned failure_limit) : core_generalizer(ctx), m_failure_limit(failure_limit) {} | ||||
|         virtual ~core_bool_inductive_generalizer() {} | ||||
|         virtual void operator()(model_node& n, expr_ref_vector& core, bool& uses_level); | ||||
|         ~core_bool_inductive_generalizer() override {} | ||||
|         void operator()(model_node& n, expr_ref_vector& core, bool& uses_level) override; | ||||
|     }; | ||||
| 
 | ||||
|     template <typename T> | ||||
|  | @ -61,17 +61,17 @@ namespace pdr { | |||
|         bool substitute_alias(rational const&r, expr* x, expr* e, expr_ref& result); | ||||
|     public: | ||||
|         core_arith_inductive_generalizer(context& ctx); | ||||
|         virtual ~core_arith_inductive_generalizer() {} | ||||
|         virtual void operator()(model_node& n, expr_ref_vector& core, bool& uses_level); | ||||
|         ~core_arith_inductive_generalizer() override {} | ||||
|         void operator()(model_node& n, expr_ref_vector& core, bool& uses_level) override; | ||||
|     }; | ||||
| 
 | ||||
|     class core_farkas_generalizer : public core_generalizer { | ||||
|         farkas_learner m_farkas_learner; | ||||
|     public: | ||||
|         core_farkas_generalizer(context& ctx, ast_manager& m, smt_params& p); | ||||
|         virtual ~core_farkas_generalizer() {} | ||||
|         virtual void operator()(model_node& n, expr_ref_vector& core, bool& uses_level);   | ||||
|         virtual void collect_statistics(statistics& st) const; | ||||
|         ~core_farkas_generalizer() override {} | ||||
|         void operator()(model_node& n, expr_ref_vector& core, bool& uses_level) override; | ||||
|         void collect_statistics(statistics& st) const override; | ||||
|     }; | ||||
| 
 | ||||
| 
 | ||||
|  | @ -85,26 +85,26 @@ namespace pdr { | |||
|         bool is_unsat(expr_ref_vector const& As, expr* B); | ||||
|     public: | ||||
|         core_convex_hull_generalizer(context& ctx, bool is_closure); | ||||
|         virtual ~core_convex_hull_generalizer() {} | ||||
|         virtual void operator()(model_node& n, expr_ref_vector const& core, bool uses_level, cores& new_cores); | ||||
|         virtual void operator()(model_node& n, expr_ref_vector& core, bool& uses_level); | ||||
|         ~core_convex_hull_generalizer() override {} | ||||
|         void operator()(model_node& n, expr_ref_vector const& core, bool uses_level, cores& new_cores) override; | ||||
|         void operator()(model_node& n, expr_ref_vector& core, bool& uses_level) override; | ||||
|     }; | ||||
| 
 | ||||
|     class core_multi_generalizer : public core_generalizer { | ||||
|         core_bool_inductive_generalizer m_gen; | ||||
|     public: | ||||
|         core_multi_generalizer(context& ctx, unsigned max_failures): core_generalizer(ctx), m_gen(ctx, max_failures) {} | ||||
|         virtual ~core_multi_generalizer() {} | ||||
|         virtual void operator()(model_node& n, expr_ref_vector& core, bool& uses_level); | ||||
|         virtual void operator()(model_node& n, expr_ref_vector const& core, bool uses_level, cores& new_cores); | ||||
|         ~core_multi_generalizer() override {} | ||||
|         void operator()(model_node& n, expr_ref_vector& core, bool& uses_level) override; | ||||
|         void operator()(model_node& n, expr_ref_vector const& core, bool uses_level, cores& new_cores) override; | ||||
|     }; | ||||
| 
 | ||||
|     class core_induction_generalizer : public core_generalizer { | ||||
|         class imp; | ||||
|     public: | ||||
|         core_induction_generalizer(context& ctx): core_generalizer(ctx) {} | ||||
|         virtual ~core_induction_generalizer() {} | ||||
|         virtual void operator()(model_node& n, expr_ref_vector& core, bool& uses_level); | ||||
|         ~core_induction_generalizer() override {} | ||||
|         void operator()(model_node& n, expr_ref_vector& core, bool& uses_level) override; | ||||
|     }; | ||||
| }; | ||||
| #endif | ||||
|  |  | |||
|  | @ -59,15 +59,15 @@ namespace pdr { | |||
|         smt::kernel & m_context; | ||||
|     public: | ||||
|         _smt_context(smt::kernel & ctx, smt_context_manager& p, app* pred);  | ||||
|         virtual ~_smt_context() {} | ||||
|         virtual void assert_expr(expr* e); | ||||
|         virtual lbool check(expr_ref_vector& assumptions); | ||||
|         virtual void get_model(model_ref& model); | ||||
|         virtual proof* get_proof(); | ||||
|         virtual void push() { m_context.push(); } | ||||
|         virtual void pop() { m_context.pop(1); } | ||||
|         virtual unsigned get_unsat_core_size() { return m_context.get_unsat_core_size(); } | ||||
|         virtual expr* get_unsat_core_expr(unsigned i) { return m_context.get_unsat_core_expr(i); } | ||||
|         ~_smt_context() override {} | ||||
|         void assert_expr(expr* e) override; | ||||
|         lbool check(expr_ref_vector& assumptions) override; | ||||
|         void get_model(model_ref& model) override; | ||||
|         proof* get_proof() override; | ||||
|         void push() override { m_context.push(); } | ||||
|         void pop() override { m_context.pop(1); } | ||||
|         unsigned get_unsat_core_size() override { return m_context.get_unsat_core_size(); } | ||||
|         expr* get_unsat_core_expr(unsigned i) override { return m_context.get_unsat_core_expr(i); } | ||||
|     }; | ||||
| 
 | ||||
|     class smt_context_manager { | ||||
|  |  | |||
|  | @ -192,8 +192,8 @@ namespace datalog { | |||
|                  const unsigned * cols1, const unsigned * cols2) | ||||
|             : convenient_join_fn(o1_sig, o2_sig, col_cnt, cols1, cols2), m_join(j)  | ||||
|         {} | ||||
|         virtual ~join_fn() {} | ||||
|         virtual relation_base * operator()(const relation_base & r1, const relation_base & r2) { | ||||
|         ~join_fn() override {} | ||||
|         relation_base * operator()(const relation_base & r1, const relation_base & r2) override { | ||||
|             check_relation const& t1 = get(r1); | ||||
|             check_relation const& t2 = get(r2); | ||||
|             check_relation_plugin& p = t1.get_plugin(); | ||||
|  | @ -221,8 +221,8 @@ namespace datalog { | |||
|             : convenient_join_project_fn(o1_sig, o2_sig, col_cnt, cols1, cols2, | ||||
|                                          removed_col_cnt, removed_cols), m_join(j)  | ||||
|         {} | ||||
|         virtual ~join_project_fn() {} | ||||
|         virtual relation_base * operator()(const relation_base & r1, const relation_base & r2) { | ||||
|         ~join_project_fn() override {} | ||||
|         relation_base * operator()(const relation_base & r1, const relation_base & r2) override { | ||||
|             check_relation const& t1 = get(r1); | ||||
|             check_relation const& t2 = get(r2); | ||||
|             check_relation_plugin& p = t1.get_plugin(); | ||||
|  | @ -491,7 +491,7 @@ namespace datalog { | |||
|     public: | ||||
|         union_fn(relation_union_fn* m): m_union(m) {} | ||||
| 
 | ||||
|         virtual void operator()(relation_base & _r, const relation_base & _src, relation_base * _delta) { | ||||
|         void operator()(relation_base & _r, const relation_base & _src, relation_base * _delta) override { | ||||
|             TRACE("doc", _r.display(tout << "dst:\n"); _src.display(tout  << "src:\n");); | ||||
|             check_relation& r = get(_r); | ||||
|             check_relation const& src = get(_src); | ||||
|  | @ -529,9 +529,9 @@ namespace datalog { | |||
|               m_filter(f) { | ||||
|         } | ||||
| 
 | ||||
|         virtual ~filter_identical_fn() {} | ||||
|         ~filter_identical_fn() override {} | ||||
|          | ||||
|         virtual void operator()(relation_base & _r) { | ||||
|         void operator()(relation_base & _r) override { | ||||
|             check_relation& r = get(_r); | ||||
|             check_relation_plugin& p = r.get_plugin();             | ||||
|             ast_manager& m = p.m; | ||||
|  | @ -565,9 +565,9 @@ namespace datalog { | |||
|             m_condition(condition) { | ||||
|         } | ||||
| 
 | ||||
|         virtual ~filter_interpreted_fn() {} | ||||
|         ~filter_interpreted_fn() override {} | ||||
|          | ||||
|         virtual void operator()(relation_base & tb) {             | ||||
|         void operator()(relation_base & tb) override { | ||||
|             check_relation& r = get(tb); | ||||
|             check_relation_plugin& p = r.get_plugin();             | ||||
|             expr_ref fml = r.m_fml; | ||||
|  | @ -592,9 +592,9 @@ namespace datalog { | |||
|               m_project(p) { | ||||
|         } | ||||
| 
 | ||||
|         virtual ~project_fn() {} | ||||
|         ~project_fn() override {} | ||||
| 
 | ||||
|         virtual relation_base * operator()(const relation_base & tb) { | ||||
|         relation_base * operator()(const relation_base & tb) override { | ||||
|             check_relation const& t = get(tb); | ||||
|             check_relation_plugin& p = t.get_plugin(); | ||||
|             relation_base* r = (*m_project)(t.rb()); | ||||
|  | @ -620,9 +620,9 @@ namespace datalog { | |||
|               m_permute(permute) { | ||||
|         } | ||||
| 
 | ||||
|         virtual ~rename_fn() {} | ||||
|         ~rename_fn() override {} | ||||
| 
 | ||||
|         virtual relation_base * operator()(const relation_base & _t) { | ||||
|         relation_base * operator()(const relation_base & _t) override { | ||||
|             check_relation const& t = get(_t); | ||||
|             check_relation_plugin& p = t.get_plugin();             | ||||
|             relation_signature const& sig = get_result_signature(); | ||||
|  | @ -649,8 +649,8 @@ namespace datalog { | |||
|             m_val(val), | ||||
|             m_col(col) | ||||
|         {} | ||||
|         virtual ~filter_equal_fn() { }         | ||||
|         virtual void operator()(relation_base & tb) { | ||||
|         ~filter_equal_fn() override { } | ||||
|         void operator()(relation_base & tb) override { | ||||
|             check_relation & t = get(tb); | ||||
|             check_relation_plugin& p = t.get_plugin(); | ||||
|             (*m_filter)(t.rb()); | ||||
|  | @ -682,7 +682,7 @@ namespace datalog { | |||
|             SASSERT(joined_col_cnt > 0); | ||||
|         } | ||||
|          | ||||
|         virtual void operator()(relation_base& tb, const relation_base& negb) { | ||||
|         void operator()(relation_base& tb, const relation_base& negb) override { | ||||
|             check_relation& t = get(tb); | ||||
|             check_relation const& n = get(negb); | ||||
|             check_relation_plugin& p = t.get_plugin(); | ||||
|  | @ -763,9 +763,9 @@ namespace datalog { | |||
|             m_xform(xform) | ||||
|         {} | ||||
|          | ||||
|         virtual ~filter_proj_fn() {} | ||||
|         ~filter_proj_fn() override {} | ||||
| 
 | ||||
|         virtual relation_base* operator()(const relation_base & tb) { | ||||
|         relation_base* operator()(const relation_base & tb) override { | ||||
|             check_relation const & t = get(tb); | ||||
|             check_relation_plugin& p = t.get_plugin(); | ||||
|             relation_base* r = (*m_xform)(t.rb()); | ||||
|  |  | |||
|  | @ -38,20 +38,20 @@ namespace datalog { | |||
|         expr_ref mk_eq(relation_fact const& f) const; | ||||
|     public: | ||||
|         check_relation(check_relation_plugin& p, relation_signature const& s, relation_base* r); | ||||
|         virtual ~check_relation(); | ||||
|         virtual void reset(); | ||||
|         virtual void add_fact(const relation_fact & f); | ||||
|         virtual void add_new_fact(const relation_fact & f); | ||||
|         virtual bool contains_fact(const relation_fact & f) const; | ||||
|         virtual check_relation * clone() const; | ||||
|         virtual check_relation * complement(func_decl*) const; | ||||
|         virtual void to_formula(expr_ref& fml) const; | ||||
|         ~check_relation() override; | ||||
|         void reset() override; | ||||
|         void add_fact(const relation_fact & f) override; | ||||
|         void add_new_fact(const relation_fact & f) override; | ||||
|         bool contains_fact(const relation_fact & f) const override; | ||||
|         check_relation * clone() const override; | ||||
|         check_relation * complement(func_decl*) const override; | ||||
|         void to_formula(expr_ref& fml) const override; | ||||
|         check_relation_plugin& get_plugin() const;  | ||||
|         virtual bool fast_empty() const; | ||||
|         virtual bool empty() const;  | ||||
|         virtual void display(std::ostream& out) const; | ||||
|         virtual bool is_precise() const { return m_relation->is_precise(); } | ||||
|         virtual unsigned get_size_estimate_rows() const { return m_relation->get_size_estimate_rows(); } | ||||
|         bool fast_empty() const override; | ||||
|         bool empty() const override; | ||||
|         void display(std::ostream& out) const override; | ||||
|         bool is_precise() const override { return m_relation->is_precise(); } | ||||
|         unsigned get_size_estimate_rows() const override { return m_relation->get_size_estimate_rows(); } | ||||
|         relation_base&  rb() { return *m_relation; } | ||||
|         relation_base const& rb() const { return *m_relation; } | ||||
|         expr_ref ground(expr* fml) const; | ||||
|  | @ -90,39 +90,39 @@ namespace datalog { | |||
|             unsigned_vector const& cols1, unsigned_vector const& cols2); | ||||
|     public: | ||||
|         check_relation_plugin(relation_manager& rm); | ||||
|         ~check_relation_plugin(); | ||||
|         ~check_relation_plugin() override; | ||||
|         void set_plugin(relation_plugin* p) { m_base = p; } | ||||
| 
 | ||||
|         virtual bool can_handle_signature(const relation_signature & s); | ||||
|         bool can_handle_signature(const relation_signature & s) override; | ||||
|         static symbol get_name() { return symbol("check_relation"); } | ||||
|         virtual relation_base * mk_empty(const relation_signature & s); | ||||
|         virtual relation_base * mk_full(func_decl* p, const relation_signature & s); | ||||
|         virtual relation_join_fn * mk_join_fn(const relation_base & t1, const relation_base & t2, | ||||
|             unsigned col_cnt, const unsigned * cols1, const unsigned * cols2); | ||||
|         virtual relation_join_fn * mk_join_project_fn( | ||||
|         relation_base * mk_empty(const relation_signature & s) override; | ||||
|         relation_base * mk_full(func_decl* p, const relation_signature & s) override; | ||||
|         relation_join_fn * mk_join_fn(const relation_base & t1, const relation_base & t2, | ||||
|             unsigned col_cnt, const unsigned * cols1, const unsigned * cols2) override; | ||||
|         relation_join_fn * mk_join_project_fn( | ||||
|             const relation_base & t1, const relation_base & t2, | ||||
|             unsigned col_cnt, const unsigned * cols1, const unsigned * cols2, | ||||
|             unsigned removed_col_cnt, const unsigned * removed_cols); | ||||
|         virtual relation_transformer_fn * mk_project_fn(const relation_base & t, unsigned col_cnt,  | ||||
|             const unsigned * removed_cols); | ||||
|         virtual relation_transformer_fn * mk_rename_fn(const relation_base & t, unsigned permutation_cycle_len,  | ||||
|             const unsigned * permutation_cycle); | ||||
|         virtual relation_union_fn * mk_union_fn(const relation_base & tgt, const relation_base & src,  | ||||
|             const relation_base * delta); | ||||
|         virtual relation_union_fn * mk_widen_fn(const relation_base & tgt, const relation_base & src,  | ||||
|             const relation_base * delta); | ||||
|         virtual relation_mutator_fn * mk_filter_identical_fn(const relation_base & t, unsigned col_cnt,  | ||||
|             const unsigned * identical_cols); | ||||
|         virtual relation_mutator_fn * mk_filter_equal_fn(const relation_base & t, const relation_element & value,  | ||||
|             unsigned col); | ||||
|         virtual relation_mutator_fn * mk_filter_interpreted_fn(const relation_base & t, app * condition); | ||||
|         virtual relation_intersection_filter_fn * mk_filter_by_negation_fn( | ||||
|             unsigned removed_col_cnt, const unsigned * removed_cols) override; | ||||
|         relation_transformer_fn * mk_project_fn(const relation_base & t, unsigned col_cnt, | ||||
|             const unsigned * removed_cols) override; | ||||
|         relation_transformer_fn * mk_rename_fn(const relation_base & t, unsigned permutation_cycle_len, | ||||
|             const unsigned * permutation_cycle) override; | ||||
|         relation_union_fn * mk_union_fn(const relation_base & tgt, const relation_base & src, | ||||
|             const relation_base * delta) override; | ||||
|         relation_union_fn * mk_widen_fn(const relation_base & tgt, const relation_base & src, | ||||
|             const relation_base * delta) override; | ||||
|         relation_mutator_fn * mk_filter_identical_fn(const relation_base & t, unsigned col_cnt, | ||||
|             const unsigned * identical_cols) override; | ||||
|         relation_mutator_fn * mk_filter_equal_fn(const relation_base & t, const relation_element & value, | ||||
|             unsigned col) override; | ||||
|         relation_mutator_fn * mk_filter_interpreted_fn(const relation_base & t, app * condition) override; | ||||
|         relation_intersection_filter_fn * mk_filter_by_negation_fn( | ||||
|             const relation_base& t, | ||||
|             const relation_base& neg, unsigned joined_col_cnt, const unsigned *t_cols, | ||||
|             const unsigned *negated_cols); | ||||
|         virtual relation_transformer_fn * mk_filter_interpreted_and_project_fn( | ||||
|             const unsigned *negated_cols) override; | ||||
|         relation_transformer_fn * mk_filter_interpreted_and_project_fn( | ||||
|             const relation_base & t, app * condition, | ||||
|             unsigned removed_col_cnt, const unsigned * removed_cols); | ||||
|             unsigned removed_col_cnt, const unsigned * removed_cols) override; | ||||
| 
 | ||||
|         void verify_join(relation_base const& t1, relation_base const& t2, relation_base const& t, | ||||
|                          unsigned_vector const& cols1, unsigned_vector const& cols2); | ||||
|  |  | |||
|  | @ -423,17 +423,17 @@ namespace datalog { | |||
|         const row_interface & m_parent; | ||||
|         unsigned m_index; | ||||
|     protected: | ||||
|         virtual bool is_finished() const { return m_index==m_parent.size(); } | ||||
|         bool is_finished() const override { return m_index==m_parent.size(); } | ||||
|     public: | ||||
|         fact_row_iterator(const row_interface & row, bool finished)  | ||||
|             : m_parent(row), m_index(finished ? row.size() : 0) {} | ||||
| 
 | ||||
|         virtual table_element operator*() { | ||||
|         table_element operator*() override { | ||||
|             SASSERT(!is_finished()); | ||||
|             return m_parent[m_index]; | ||||
|         } | ||||
| 
 | ||||
|         virtual void operator++() { | ||||
|         void operator++() override { | ||||
|             m_index++; | ||||
|             SASSERT(m_index<=m_parent.size()); | ||||
|         } | ||||
|  |  | |||
|  | @ -220,7 +220,7 @@ namespace datalog { | |||
|         */ | ||||
|         class mutator_fn : public base_fn { | ||||
|         public: | ||||
|             virtual ~mutator_fn() {} | ||||
|             ~mutator_fn() override {} | ||||
| 
 | ||||
|             virtual void operator()(base_object & t) = 0; | ||||
| 
 | ||||
|  | @ -629,19 +629,19 @@ namespace datalog { | |||
| 
 | ||||
|         class identity_transformer_fn : public transformer_fn { | ||||
|         public: | ||||
|             virtual base_object * operator()(const base_object & t) { | ||||
|             base_object * operator()(const base_object & t) override { | ||||
|                 return t.clone(); | ||||
|             } | ||||
|         }; | ||||
| 
 | ||||
|         class identity_mutator_fn : public mutator_fn { | ||||
|         public: | ||||
|             virtual void operator()(base_object & t) {}; | ||||
|             void operator()(base_object & t) override {}; | ||||
|         }; | ||||
| 
 | ||||
|         class identity_intersection_filter_fn : public intersection_filter_fn { | ||||
|         public: | ||||
|             virtual void operator()(base_object & t, const base_object & neg) {}; | ||||
|             void operator()(base_object & t, const base_object & neg) override {}; | ||||
|         }; | ||||
| 
 | ||||
|         class default_permutation_rename_fn : public transformer_fn { | ||||
|  | @ -655,11 +655,11 @@ namespace datalog { | |||
|                 : m_permutation(o.get_signature().size(), permutation), | ||||
|                 m_renamers_initialized(false) {} | ||||
| 
 | ||||
|             ~default_permutation_rename_fn() { | ||||
|             ~default_permutation_rename_fn() override { | ||||
|                 dealloc_ptr_vector_content(m_renamers); | ||||
|             } | ||||
| 
 | ||||
|             base_object * operator()(const base_object & o) { | ||||
|             base_object * operator()(const base_object & o) override { | ||||
|                 const base_object * res = &o; | ||||
|                 scoped_rel<base_object> res_scoped; | ||||
|                 if(m_renamers_initialized) { | ||||
|  | @ -803,11 +803,11 @@ namespace datalog { | |||
|     protected: | ||||
|         relation_base(relation_plugin & plugin, const relation_signature & s)  | ||||
|             : base_ancestor(plugin, s) {} | ||||
|         virtual ~relation_base() {} | ||||
|         ~relation_base() override {} | ||||
|     public: | ||||
|         virtual relation_base * complement(func_decl* p) const = 0; | ||||
| 
 | ||||
|         virtual void reset(); | ||||
|         void reset() override; | ||||
| 
 | ||||
|         virtual void display_tuples(func_decl & pred, std::ostream & out) const { | ||||
|             out << "Tuples in " << pred.get_name() << ": \n"; | ||||
|  | @ -1022,7 +1022,7 @@ namespace datalog { | |||
|         table_plugin(symbol const& n, relation_manager & manager) : plugin_object(n, manager) {} | ||||
|     public: | ||||
| 
 | ||||
|         virtual bool can_handle_signature(const table_signature & s) { return s.functional_columns()==0; } | ||||
|         bool can_handle_signature(const table_signature & s) override { return s.functional_columns()==0; } | ||||
| 
 | ||||
|     protected: | ||||
|         /**
 | ||||
|  | @ -1044,17 +1044,17 @@ namespace datalog { | |||
|     protected: | ||||
|         table_base(table_plugin & plugin, const table_signature & s)  | ||||
|             : base_ancestor(plugin, s) {} | ||||
|         virtual ~table_base() {} | ||||
|         ~table_base() override {} | ||||
|     public: | ||||
|         virtual table_base * clone() const; | ||||
|         table_base * clone() const override; | ||||
|         virtual table_base * complement(func_decl* p, const table_element * func_columns = 0) const; | ||||
|         virtual bool empty() const; | ||||
|         bool empty() const override; | ||||
| 
 | ||||
|         /**
 | ||||
|            \brief Return true if table contains fact that corresponds to \c f in all non-functional | ||||
|            columns. | ||||
|          */ | ||||
|         virtual bool contains_fact(const table_fact & f) const; | ||||
|         bool contains_fact(const table_fact & f) const override; | ||||
| 
 | ||||
|         /**
 | ||||
|            \brief If \c f (i.e. its non-functional part) is not present in the table,  | ||||
|  | @ -1082,11 +1082,11 @@ namespace datalog { | |||
|         virtual void remove_fact(table_element const* fact) = 0; | ||||
|         virtual void remove_facts(unsigned fact_cnt, const table_fact * facts); | ||||
|         virtual void remove_facts(unsigned fact_cnt, const table_element * facts); | ||||
|         virtual void reset(); | ||||
|         void reset() override; | ||||
| 
 | ||||
|         class row_interface; | ||||
| 
 | ||||
|         virtual void display(std::ostream & out) const; | ||||
|         void display(std::ostream & out) const override; | ||||
| 
 | ||||
|         /**
 | ||||
|            \brief Convert table to a formula that encodes the table. | ||||
|  | @ -1245,9 +1245,9 @@ namespace datalog { | |||
|         public: | ||||
|             caching_row_interface(const table_base & parent) : row_interface(parent) {} | ||||
| 
 | ||||
|             virtual void get_fact(table_fact & result) const = 0; | ||||
|             void get_fact(table_fact & result) const override = 0; | ||||
| 
 | ||||
|             virtual table_element operator[](unsigned col) const {  | ||||
|             table_element operator[](unsigned col) const override { | ||||
|                 ensure_populated(); | ||||
|                 return m_current[col]; | ||||
|             } | ||||
|  |  | |||
|  | @ -79,7 +79,7 @@ namespace datalog { | |||
|             : convenient_relation_join_fn(o1_sig, o2_sig, col_cnt, cols1, cols2) { | ||||
|         } | ||||
| 
 | ||||
|         virtual relation_base * operator()(const relation_base & _r1, const relation_base & _r2) { | ||||
|         relation_base * operator()(const relation_base & _r1, const relation_base & _r2) override { | ||||
|             bound_relation const& r1 = get(_r1); | ||||
|             bound_relation const& r2 = get(_r2); | ||||
|             bound_relation_plugin& p = r1.get_plugin(); | ||||
|  | @ -104,7 +104,7 @@ namespace datalog { | |||
|             : convenient_relation_project_fn(orig_sig, removed_col_cnt, removed_cols) { | ||||
|         } | ||||
| 
 | ||||
|         virtual relation_base * operator()(const relation_base & _r) { | ||||
|         relation_base * operator()(const relation_base & _r) override { | ||||
|             bound_relation const& r = get(_r); | ||||
|             bound_relation_plugin& p = r.get_plugin(); | ||||
|             bound_relation* result = get(p.mk_full(0, get_result_signature()));             | ||||
|  | @ -124,7 +124,7 @@ namespace datalog { | |||
|             : convenient_relation_rename_fn(orig_sig, cycle_len, cycle) { | ||||
|         } | ||||
| 
 | ||||
|         virtual relation_base * operator()(const relation_base & _r) { | ||||
|         relation_base * operator()(const relation_base & _r) override { | ||||
|             bound_relation const& r = get(_r); | ||||
|             bound_relation_plugin& p = r.get_plugin(); | ||||
|             bound_relation* result = get(p.mk_full(0, get_result_signature())); | ||||
|  | @ -148,7 +148,7 @@ namespace datalog { | |||
|         union_fn(bool is_widen) : | ||||
|             m_is_widen(is_widen) {             | ||||
|         } | ||||
|         virtual void operator()(relation_base & _r, const relation_base & _src, relation_base * _delta) { | ||||
|         void operator()(relation_base & _r, const relation_base & _src, relation_base * _delta) override { | ||||
|             TRACE("bound_relation", _r.display(tout << "dst:\n"); _src.display(tout  << "src:\n");); | ||||
|             get(_r).mk_union(get(_src), get(_delta), m_is_widen); | ||||
|         } | ||||
|  | @ -160,7 +160,7 @@ namespace datalog { | |||
|         union_fn_i(bool is_widen) : | ||||
|             m_is_widen(is_widen) {             | ||||
|         } | ||||
|         virtual void operator()(relation_base & _r, const relation_base & _src, relation_base * _delta) { | ||||
|         void operator()(relation_base & _r, const relation_base & _src, relation_base * _delta) override { | ||||
|             TRACE("bound_relation", _r.display(tout << "dst:\n"); _src.display(tout  << "src:\n"););    | ||||
|             get(_r).mk_union_i(get_interval_relation(_src), get(_delta), m_is_widen); | ||||
|             TRACE("bound_relation", _r.display(tout << "dst':\n");); | ||||
|  | @ -197,7 +197,7 @@ namespace datalog { | |||
|         filter_identical_fn(unsigned col_cnt, const unsigned * identical_cols)  | ||||
|             : m_cols(col_cnt, identical_cols) {} | ||||
| 
 | ||||
|         virtual void operator()(relation_base & r) { | ||||
|         void operator()(relation_base & r) override { | ||||
|             for (unsigned i = 1; i < m_cols.size(); ++i) { | ||||
|                 get(r).equate(m_cols[0], m_cols[i]); | ||||
|             } | ||||
|  | @ -216,7 +216,7 @@ namespace datalog { | |||
|     public: | ||||
|         filter_equal_fn(relation_element const& value, unsigned col) {} | ||||
| 
 | ||||
|         virtual void operator()(relation_base & r) { } | ||||
|         void operator()(relation_base & r) override { } | ||||
|     }; | ||||
| 
 | ||||
|     relation_mutator_fn * bound_relation_plugin::mk_filter_equal_fn(const relation_base & r,  | ||||
|  | @ -342,7 +342,7 @@ namespace datalog { | |||
|         // x < y + z
 | ||||
|         //  
 | ||||
| 
 | ||||
|         void operator()(relation_base& t) { | ||||
|         void operator()(relation_base& t) override { | ||||
|             TRACE("dl", tout << mk_pp(m_cond, m_cond.get_manager()) << "\n"; t.display(tout);); | ||||
|             bound_relation& r = get(t); | ||||
|             switch(m_kind) { | ||||
|  | @ -370,11 +370,11 @@ namespace datalog { | |||
|             TRACE("dl", t.display(tout << "result\n"););    | ||||
|         } | ||||
| 
 | ||||
|         bool supports_attachment(relation_base& t) { | ||||
|         bool supports_attachment(relation_base& t) override { | ||||
|             return is_interval_relation(t); | ||||
|         } | ||||
| 
 | ||||
|         void attach(relation_base& t) { | ||||
|         void attach(relation_base& t) override { | ||||
|             SASSERT(is_interval_relation(t)); | ||||
|             interval_relation& r = get_interval_relation(t); | ||||
|             m_interval = &r; | ||||
|  |  | |||
|  | @ -47,29 +47,29 @@ namespace datalog { | |||
|         bool_rewriter m_bsimp; | ||||
|     public: | ||||
|         bound_relation_plugin(relation_manager& m); | ||||
|         virtual bool can_handle_signature(const relation_signature & s); | ||||
|         bool can_handle_signature(const relation_signature & s) override; | ||||
|         static symbol get_name() { return symbol("bound_relation"); } | ||||
|         virtual relation_base * mk_empty(const relation_signature & s); | ||||
|         virtual relation_base * mk_full(func_decl* p, const relation_signature & s); | ||||
|         virtual relation_join_fn * mk_join_fn(const relation_base & t1, const relation_base & t2, | ||||
|             unsigned col_cnt, const unsigned * cols1, const unsigned * cols2); | ||||
|         virtual relation_transformer_fn * mk_project_fn(const relation_base & t, unsigned col_cnt,  | ||||
|             const unsigned * removed_cols); | ||||
|         virtual relation_transformer_fn * mk_rename_fn(const relation_base & t, unsigned permutation_cycle_len,  | ||||
|             const unsigned * permutation_cycle); | ||||
|         virtual relation_union_fn * mk_union_fn(const relation_base & tgt, const relation_base & src,  | ||||
|             const relation_base * delta); | ||||
|         virtual relation_union_fn * mk_widen_fn(const relation_base & tgt, const relation_base & src,  | ||||
|             const relation_base * delta); | ||||
|         virtual relation_mutator_fn * mk_filter_identical_fn(const relation_base & t, unsigned col_cnt,  | ||||
|             const unsigned * identical_cols); | ||||
|         virtual relation_mutator_fn * mk_filter_equal_fn(const relation_base & t, const relation_element & value,  | ||||
|             unsigned col); | ||||
|         virtual relation_mutator_fn * mk_filter_interpreted_fn(const relation_base & t, app * condition); | ||||
|          | ||||
|         virtual relation_join_fn * mk_join_project_fn(const relation_base & t1, const relation_base & t2, | ||||
|                     unsigned joined_col_cnt, const unsigned * cols1, const unsigned * cols2,  | ||||
|                     unsigned removed_col_cnt, const unsigned * removed_cols) { return 0; } | ||||
|         relation_base * mk_empty(const relation_signature & s) override; | ||||
|         relation_base * mk_full(func_decl* p, const relation_signature & s) override; | ||||
|         relation_join_fn * mk_join_fn(const relation_base & t1, const relation_base & t2, | ||||
|             unsigned col_cnt, const unsigned * cols1, const unsigned * cols2) override; | ||||
|         relation_transformer_fn * mk_project_fn(const relation_base & t, unsigned col_cnt, | ||||
|             const unsigned * removed_cols) override; | ||||
|         relation_transformer_fn * mk_rename_fn(const relation_base & t, unsigned permutation_cycle_len, | ||||
|             const unsigned * permutation_cycle) override; | ||||
|         relation_union_fn * mk_union_fn(const relation_base & tgt, const relation_base & src, | ||||
|             const relation_base * delta) override; | ||||
|         relation_union_fn * mk_widen_fn(const relation_base & tgt, const relation_base & src, | ||||
|             const relation_base * delta) override; | ||||
|         relation_mutator_fn * mk_filter_identical_fn(const relation_base & t, unsigned col_cnt, | ||||
|             const unsigned * identical_cols) override; | ||||
|         relation_mutator_fn * mk_filter_equal_fn(const relation_base & t, const relation_element & value, | ||||
|             unsigned col) override; | ||||
|         relation_mutator_fn * mk_filter_interpreted_fn(const relation_base & t, app * condition) override; | ||||
| 
 | ||||
|         relation_join_fn * mk_join_project_fn(const relation_base & t1, const relation_base & t2, | ||||
|                     unsigned joined_col_cnt, const unsigned * cols1, const unsigned * cols2, | ||||
|                     unsigned removed_col_cnt, const unsigned * removed_cols) override { return 0; } | ||||
| 
 | ||||
| 
 | ||||
| #if 0 | ||||
|  | @ -123,12 +123,12 @@ namespace datalog { | |||
|         bound_relation(bound_relation_plugin& p, relation_signature const& s, bool is_empty); | ||||
|         bound_relation& operator=(bound_relation const& other); | ||||
| 
 | ||||
|         virtual bool empty() const { return m_empty; } | ||||
|         virtual void add_fact(const relation_fact & f); | ||||
|         virtual bool contains_fact(const relation_fact & f) const; | ||||
|         virtual bound_relation * clone() const; | ||||
|         virtual bound_relation * complement(func_decl* p) const; | ||||
|         virtual void to_formula(expr_ref& fml) const; | ||||
|         bool empty() const override { return m_empty; } | ||||
|         void add_fact(const relation_fact & f) override; | ||||
|         bool contains_fact(const relation_fact & f) const override; | ||||
|         bound_relation * clone() const override; | ||||
|         bound_relation * complement(func_decl* p) const override; | ||||
|         void to_formula(expr_ref& fml) const override; | ||||
|         bound_relation_plugin& get_plugin() const;  | ||||
| 
 | ||||
|         void mk_union_i(interval_relation const& src, bound_relation* delta, bool is_widen); | ||||
|  | @ -141,28 +141,28 @@ namespace datalog { | |||
| 
 | ||||
|         bool is_lt(unsigned i, unsigned j) const; | ||||
| 
 | ||||
|         virtual bool is_precise() const { return false; } | ||||
|         bool is_precise() const override { return false; } | ||||
| 
 | ||||
|     private: | ||||
|         typedef uint_set2 T; | ||||
|         virtual T mk_intersect(T const& t1, T const& t2, bool& is_empty) const; | ||||
|         T mk_intersect(T const& t1, T const& t2, bool& is_empty) const override; | ||||
| 
 | ||||
|         virtual T mk_widen(T const& t1, T const& t2) const; | ||||
|         T mk_widen(T const& t1, T const& t2) const override; | ||||
| 
 | ||||
|         virtual T mk_unite(T const& t1, T const& t2) const; | ||||
|         T mk_unite(T const& t1, T const& t2) const override; | ||||
| 
 | ||||
|         virtual T mk_eq(union_find<> const& old_eqs, union_find<> const& new_eqs, T const& t) const; | ||||
|         T mk_eq(union_find<> const& old_eqs, union_find<> const& new_eqs, T const& t) const override; | ||||
| 
 | ||||
|         virtual void mk_rename_elem(T& i, unsigned col_cnt, unsigned const* cycle); | ||||
|         void mk_rename_elem(T& i, unsigned col_cnt, unsigned const* cycle) override; | ||||
| 
 | ||||
| 
 | ||||
|         virtual bool is_subset_of(T const& t1, T const& t2) const; | ||||
|         bool is_subset_of(T const& t1, T const& t2) const override; | ||||
| 
 | ||||
|         virtual bool is_full(T const& t) const; | ||||
|         bool is_full(T const& t) const override; | ||||
| 
 | ||||
|         virtual bool is_empty(unsigned idx, T const& t) const; | ||||
|         bool is_empty(unsigned idx, T const& t) const override; | ||||
| 
 | ||||
|         virtual void display_index(unsigned idx, T const& t, std::ostream& out) const; | ||||
|         void display_index(unsigned idx, T const& t, std::ostream& out) const override; | ||||
| 
 | ||||
|         void normalize(T const& src, T& dst) const; | ||||
| 
 | ||||
|  |  | |||
|  | @ -65,7 +65,7 @@ namespace datalog { | |||
|             m_checker = p.get_manager().mk_join_fn(checker(t1), checker(t2), col_cnt, cols1, cols2); | ||||
|         } | ||||
| 
 | ||||
|         virtual table_base* operator()(const table_base & t1, const table_base & t2) { | ||||
|         table_base* operator()(const table_base & t1, const table_base & t2) override { | ||||
|             IF_VERBOSE(1, verbose_stream() << __FUNCTION__ << "\n";); | ||||
|             table_base* ttocheck = (*m_tocheck)(tocheck(t1), tocheck(t2)); | ||||
|             table_base* tchecker = (*m_checker)(checker(t1), checker(t2)); | ||||
|  | @ -93,7 +93,7 @@ namespace datalog { | |||
|             m_checker = p.get_manager().mk_join_project_fn(checker(t1), checker(t2), col_cnt, cols1, cols2, removed_col_cnt, removed_cols); | ||||
|         } | ||||
| 
 | ||||
|         virtual table_base* operator()(const table_base & t1, const table_base & t2) { | ||||
|         table_base* operator()(const table_base & t1, const table_base & t2) override { | ||||
|             table_base* ttocheck = (*m_tocheck)(tocheck(t1), tocheck(t2)); | ||||
|             table_base* tchecker = (*m_checker)(checker(t1), checker(t2)); | ||||
|             check_table* result = alloc(check_table, get(t1).get_plugin(), ttocheck->get_signature(), ttocheck, tchecker); | ||||
|  | @ -119,7 +119,7 @@ namespace datalog { | |||
|             m_checker = p.get_manager().mk_union_fn(checker(tgt), checker(src), checker(delta)); | ||||
|         } | ||||
|          | ||||
|         virtual void operator()(table_base& tgt, const table_base& src, table_base* delta) { | ||||
|         void operator()(table_base& tgt, const table_base& src, table_base* delta) override { | ||||
|             IF_VERBOSE(1, verbose_stream() << __FUNCTION__ << "\n";); | ||||
|             (*m_tocheck)(tocheck(tgt), tocheck(src), tocheck(delta)); | ||||
|             (*m_checker)(checker(tgt), checker(src), checker(delta)); | ||||
|  | @ -147,7 +147,7 @@ namespace datalog { | |||
|             m_tocheck = p.get_manager().mk_project_fn(tocheck(t), col_cnt, removed_cols); | ||||
|         } | ||||
| 
 | ||||
|         table_base* operator()(table_base const& src) { | ||||
|         table_base* operator()(table_base const& src) override { | ||||
|             table_base* tchecker = (*m_checker)(checker(src)); | ||||
|             table_base* ttocheck = (*m_tocheck)(tocheck(src)); | ||||
|             check_table* result = alloc(check_table, get(src).get_plugin(), tchecker->get_signature(), ttocheck, tchecker); | ||||
|  | @ -171,7 +171,7 @@ namespace datalog { | |||
|             m_tocheck = p.get_manager().mk_select_equal_and_project_fn(tocheck(t), value, col); | ||||
|         } | ||||
| 
 | ||||
|         table_base* operator()(table_base const& src) { | ||||
|         table_base* operator()(table_base const& src) override { | ||||
|             table_base* tchecker = (*m_checker)(checker(src)); | ||||
|             table_base* ttocheck = (*m_tocheck)(tocheck(src)); | ||||
|             check_table* result = alloc(check_table, get(src).get_plugin(), tchecker->get_signature(), ttocheck, tchecker); | ||||
|  | @ -196,7 +196,7 @@ namespace datalog { | |||
|             m_tocheck = p.get_manager().mk_rename_fn(tocheck(t), cycle_len, cycle); | ||||
|         } | ||||
| 
 | ||||
|         table_base* operator()(table_base const& src) { | ||||
|         table_base* operator()(table_base const& src) override { | ||||
|             IF_VERBOSE(1, verbose_stream() << __FUNCTION__ << "\n";); | ||||
|             table_base* tchecker = (*m_checker)(checker(src)); | ||||
|             table_base* ttocheck = (*m_tocheck)(tocheck(src)); | ||||
|  | @ -222,7 +222,7 @@ namespace datalog { | |||
|             m_tocheck = p.get_manager().mk_filter_identical_fn(tocheck(t), cnt, cols);         | ||||
|         } | ||||
| 
 | ||||
|         void operator()(table_base & t) { | ||||
|         void operator()(table_base & t) override { | ||||
|             (*m_checker)(checker(t)); | ||||
|             (*m_tocheck)(tocheck(t)); | ||||
|             get(t).well_formed(); | ||||
|  | @ -247,7 +247,7 @@ namespace datalog { | |||
|             m_tocheck = p.get_manager().mk_filter_equal_fn(tocheck(t), v, col);  | ||||
|         } | ||||
| 
 | ||||
|         virtual void operator()(table_base& src) { | ||||
|         void operator()(table_base& src) override { | ||||
|             (*m_checker)(checker(src)); | ||||
|             (*m_tocheck)(tocheck(src)); | ||||
|             get(src).well_formed(); | ||||
|  | @ -271,7 +271,7 @@ namespace datalog { | |||
|             m_tocheck = p.get_manager().mk_filter_interpreted_fn(tocheck(t), condition);  | ||||
|         } | ||||
| 
 | ||||
|         virtual void operator()(table_base& src) { | ||||
|         void operator()(table_base& src) override { | ||||
|             (*m_checker)(checker(src)); | ||||
|             (*m_tocheck)(tocheck(src)); | ||||
|             get(src).well_formed(); | ||||
|  | @ -296,7 +296,7 @@ namespace datalog { | |||
|             m_tocheck = p.get_manager().mk_filter_interpreted_and_project_fn(tocheck(t), condition, removed_col_cnt, removed_cols);  | ||||
|         } | ||||
| 
 | ||||
|         table_base* operator()(table_base const& src) { | ||||
|         table_base* operator()(table_base const& src) override { | ||||
|             table_base* tchecker = (*m_checker)(checker(src)); | ||||
|             table_base* ttocheck = (*m_tocheck)(tocheck(src)); | ||||
|             check_table* result = alloc(check_table, get(src).get_plugin(), ttocheck->get_signature(), ttocheck, tchecker); | ||||
|  | @ -325,7 +325,7 @@ namespace datalog { | |||
|             m_tocheck = p.get_manager().mk_filter_by_negation_fn(tocheck(t), tocheck(negated_obj), joined_col_cnt, t_cols, negated_cols); | ||||
|         } | ||||
| 
 | ||||
|         virtual void operator()(table_base& src, table_base const& negated_obj) { | ||||
|         void operator()(table_base& src, table_base const& negated_obj) override { | ||||
|             IF_VERBOSE(1, verbose_stream() << __FUNCTION__ << "\n";); | ||||
|             (*m_checker)(checker(src), checker(negated_obj)); | ||||
|             (*m_tocheck)(tocheck(src), tocheck(negated_obj)); | ||||
|  |  | |||
|  | @ -53,34 +53,34 @@ namespace datalog { | |||
|             m_checker(*manager.get_table_plugin(checker)), | ||||
|             m_tocheck(*manager.get_table_plugin(tocheck)), m_count(0) {} | ||||
| 
 | ||||
|         virtual table_base * mk_empty(const table_signature & s); | ||||
|         table_base * mk_empty(const table_signature & s) override; | ||||
| 
 | ||||
|         virtual table_join_fn * mk_join_fn(const table_base & t1, const table_base & t2, | ||||
|             unsigned col_cnt, const unsigned * cols1, const unsigned * cols2); | ||||
|         virtual table_join_fn * mk_join_project_fn(const table_base & t1, const table_base & t2, | ||||
|             unsigned col_cnt, const unsigned * cols1, const unsigned * cols2, unsigned removed_col_cnt,  | ||||
|             const unsigned * removed_cols); | ||||
|         virtual table_union_fn * mk_union_fn(const table_base & tgt, const table_base & src,  | ||||
|             const table_base * delta); | ||||
|         virtual table_transformer_fn * mk_project_fn(const table_base & t, unsigned col_cnt,  | ||||
|             const unsigned * removed_cols); | ||||
|         virtual table_transformer_fn * mk_select_equal_and_project_fn(const table_base & t,  | ||||
|             const table_element & value, unsigned col); | ||||
|         virtual table_transformer_fn * mk_rename_fn(const table_base & t, unsigned permutation_cycle_len, | ||||
|             const unsigned * permutation_cycle); | ||||
|         virtual table_mutator_fn * mk_filter_identical_fn(const table_base & t, unsigned col_cnt,  | ||||
|             const unsigned * identical_cols); | ||||
|         virtual table_mutator_fn * mk_filter_equal_fn(const table_base & t, const table_element & value,  | ||||
|             unsigned col); | ||||
|         virtual table_mutator_fn * mk_filter_interpreted_fn(const table_base & t, app * condition); | ||||
|         virtual table_transformer_fn * mk_filter_interpreted_and_project_fn(const table_base & t, | ||||
|             app * condition, unsigned removed_col_cnt, const unsigned * removed_cols); | ||||
|         virtual table_intersection_filter_fn * mk_filter_by_negation_fn( | ||||
|             const table_base & t,  | ||||
|             const table_base & negated_obj, unsigned joined_col_cnt,  | ||||
|             const unsigned * t_cols, const unsigned * negated_cols); | ||||
|         table_join_fn * mk_join_fn(const table_base & t1, const table_base & t2, | ||||
|             unsigned col_cnt, const unsigned * cols1, const unsigned * cols2) override; | ||||
|         table_join_fn * mk_join_project_fn(const table_base & t1, const table_base & t2, | ||||
|             unsigned col_cnt, const unsigned * cols1, const unsigned * cols2, unsigned removed_col_cnt, | ||||
|             const unsigned * removed_cols) override; | ||||
|         table_union_fn * mk_union_fn(const table_base & tgt, const table_base & src, | ||||
|             const table_base * delta) override; | ||||
|         table_transformer_fn * mk_project_fn(const table_base & t, unsigned col_cnt, | ||||
|             const unsigned * removed_cols) override; | ||||
|         table_transformer_fn * mk_select_equal_and_project_fn(const table_base & t, | ||||
|             const table_element & value, unsigned col) override; | ||||
|         table_transformer_fn * mk_rename_fn(const table_base & t, unsigned permutation_cycle_len, | ||||
|             const unsigned * permutation_cycle) override; | ||||
|         table_mutator_fn * mk_filter_identical_fn(const table_base & t, unsigned col_cnt, | ||||
|             const unsigned * identical_cols) override; | ||||
|         table_mutator_fn * mk_filter_equal_fn(const table_base & t, const table_element & value, | ||||
|             unsigned col) override; | ||||
|         table_mutator_fn * mk_filter_interpreted_fn(const table_base & t, app * condition) override; | ||||
|         table_transformer_fn * mk_filter_interpreted_and_project_fn(const table_base & t, | ||||
|             app * condition, unsigned removed_col_cnt, const unsigned * removed_cols) override; | ||||
|         table_intersection_filter_fn * mk_filter_by_negation_fn( | ||||
|             const table_base & t, | ||||
|             const table_base & negated_obj, unsigned joined_col_cnt, | ||||
|             const unsigned * t_cols, const unsigned * negated_cols) override; | ||||
| 
 | ||||
|         virtual bool can_handle_signature(table_signature const& s); | ||||
|         bool can_handle_signature(table_signature const& s) override; | ||||
| 
 | ||||
|     private: | ||||
|         static check_table& get(table_base& r); | ||||
|  | @ -106,7 +106,7 @@ namespace datalog { | |||
|         check_table(check_table_plugin & p, const table_signature & sig); | ||||
|         check_table(check_table_plugin & p, const table_signature & sig, table_base* tocheck, table_base* checker); | ||||
| 
 | ||||
|         virtual ~check_table(); | ||||
|         ~check_table() override; | ||||
| 
 | ||||
|         bool well_formed() const; | ||||
| 
 | ||||
|  | @ -116,18 +116,18 @@ namespace datalog { | |||
|             return static_cast<check_table_plugin &>(table_base::get_plugin());  | ||||
|         } | ||||
| 
 | ||||
|         virtual bool empty() const; | ||||
|         virtual void add_fact(const table_fact & f); | ||||
|         virtual void remove_fact(const table_element*  fact); | ||||
|         virtual bool contains_fact(const table_fact & f) const;        | ||||
|         virtual table_base * complement(func_decl* p, const table_element * func_columns = 0) const; | ||||
|         virtual table_base * clone() const; | ||||
|         bool empty() const override; | ||||
|         void add_fact(const table_fact & f) override; | ||||
|         void remove_fact(const table_element*  fact) override; | ||||
|         bool contains_fact(const table_fact & f) const override; | ||||
|         table_base * complement(func_decl* p, const table_element * func_columns = 0) const override; | ||||
|         table_base * clone() const override; | ||||
| 
 | ||||
|         virtual iterator begin() const { SASSERT(well_formed()); return m_tocheck->begin(); } | ||||
|         virtual iterator end() const { return m_tocheck->end(); } | ||||
|         iterator begin() const override { SASSERT(well_formed()); return m_tocheck->begin(); } | ||||
|         iterator end() const override { return m_tocheck->end(); } | ||||
| 
 | ||||
|         virtual unsigned get_size_estimate_rows() const { return m_tocheck->get_size_estimate_rows(); } | ||||
|         virtual unsigned get_size_estimate_bytes() const { return m_tocheck->get_size_estimate_bytes(); } | ||||
|         unsigned get_size_estimate_rows() const override { return m_tocheck->get_size_estimate_rows(); } | ||||
|         unsigned get_size_estimate_bytes() const override { return m_tocheck->get_size_estimate_bytes(); } | ||||
|     }; | ||||
| 
 | ||||
|  }; | ||||
|  |  | |||
|  | @ -97,7 +97,7 @@ namespace datalog { | |||
| 
 | ||||
|             void start_rule(rule * r) { SASSERT(!m_current); m_current=r; } | ||||
|             void finish_rule() { m_current = 0; } | ||||
|             virtual void notify(instruction * i) { | ||||
|             void notify(instruction * i) override { | ||||
|                 if(m_current) { | ||||
|                     i->set_accounting_parent_object(m_parent.m_context, m_current); | ||||
|                 } | ||||
|  |  | |||
|  | @ -195,7 +195,7 @@ namespace datalog { | |||
|             m_join_fn = m.mk_func_decl(fid, OP_RA_JOIN, params.size(), params.c_ptr(), 2, domain); | ||||
|         } | ||||
| 
 | ||||
|         virtual relation_base * operator()(const relation_base & r1, const relation_base & r2) { | ||||
|         relation_base * operator()(const relation_base & r1, const relation_base & r2) override { | ||||
|             expr_ref res(m_plugin.get_ast_manager()); | ||||
|             m_args[0] = get(r1).get_relation(); | ||||
|             m_args[1] = get(r2).get_relation(); | ||||
|  | @ -231,7 +231,7 @@ namespace datalog { | |||
|             m_project_fn = m.mk_func_decl(fid, OP_RA_PROJECT, params.size(), params.c_ptr(), 1, &relation_sort); | ||||
|         } | ||||
| 
 | ||||
|         virtual relation_base * operator()(const relation_base & r) { | ||||
|         relation_base * operator()(const relation_base & r) override { | ||||
|             expr_ref res(m_plugin.get_ast_manager()); | ||||
|             expr* rel = get(r).get_relation(); | ||||
|             m_plugin.reduce(m_project_fn, 1, &rel, res);  | ||||
|  | @ -265,7 +265,7 @@ namespace datalog { | |||
|             m_rename_fn = m.mk_func_decl(fid, OP_RA_RENAME, params.size(), params.c_ptr(), 1, &relation_sort); | ||||
|         } | ||||
| 
 | ||||
|         virtual relation_base * operator()(const relation_base & r) { | ||||
|         relation_base * operator()(const relation_base & r) override { | ||||
|             expr* rel = get(r).get_relation(); | ||||
|             expr_ref res(m_plugin.get_ast_manager()); | ||||
|             m_args[0] = rel; | ||||
|  | @ -298,7 +298,7 @@ namespace datalog { | |||
|             m_union_fn = m.mk_func_decl(p.get_family_id(), k, 0, 0, 2, domain); | ||||
|         } | ||||
| 
 | ||||
|         virtual void operator()(relation_base & r, const relation_base & src, relation_base * delta) { | ||||
|         void operator()(relation_base & r, const relation_base & src, relation_base * delta) override { | ||||
|             ast_manager& m = m_plugin.get_ast_manager(); | ||||
|             expr_ref_vector res(m); | ||||
|             m_args[0] = get(r).get_relation(); | ||||
|  | @ -342,7 +342,7 @@ namespace datalog { | |||
|             SASSERT(p.get_ast_manager().is_bool(condition)); | ||||
|         } | ||||
| 
 | ||||
|         virtual void operator()(relation_base & r) { | ||||
|         void operator()(relation_base & r) override { | ||||
|             SASSERT(m_plugin.check_kind(r)); | ||||
|             expr* arg = get(r).get_relation(); | ||||
|             m_plugin.reduce_assign(m_filter_fn, 1, &arg, 1, &arg); | ||||
|  | @ -396,7 +396,7 @@ namespace datalog { | |||
|             } | ||||
|         } | ||||
| 
 | ||||
|         virtual void operator()(relation_base & r) { | ||||
|         void operator()(relation_base & r) override { | ||||
|             expr* r0 = get(r).get_relation(); | ||||
|             for (unsigned i = 0; i < m_filter_fn.size(); ++i) { | ||||
|                 m_plugin.reduce_assign(m_filter_fn[i].get(), 1, &r0, 1, &r0);                   | ||||
|  | @ -436,7 +436,7 @@ namespace datalog { | |||
|             m_negated_filter_fn = m.mk_func_decl(fid, OP_RA_NEGATION_FILTER, params.size(), params.c_ptr(), 2, domain);             | ||||
|         } | ||||
| 
 | ||||
|         void operator()(relation_base & t, const relation_base & negated_obj) { | ||||
|         void operator()(relation_base & t, const relation_base & negated_obj) override { | ||||
|             m_args[0] = get(t).get_relation(); | ||||
|             m_args[1] = get(negated_obj).get_relation(); | ||||
|             m_plugin.reduce_assign(m_negated_filter_fn.get(), 2, m_args, 1, m_args);                        | ||||
|  |  | |||
|  | @ -54,30 +54,30 @@ namespace datalog { | |||
|     public: | ||||
|         external_relation_plugin(external_relation_context& ctx, relation_manager & m); | ||||
| 
 | ||||
|         virtual bool can_handle_signature(const relation_signature & s) { return true; } | ||||
|         bool can_handle_signature(const relation_signature & s) override { return true; } | ||||
| 
 | ||||
|         static symbol get_name() { return symbol("external_relation"); } | ||||
| 
 | ||||
|         virtual relation_base * mk_empty(const relation_signature & s); | ||||
|         relation_base * mk_empty(const relation_signature & s) override; | ||||
| 
 | ||||
|         virtual relation_join_fn * mk_join_fn(const relation_base & t1, const relation_base & t2, | ||||
|             unsigned col_cnt, const unsigned * cols1, const unsigned * cols2); | ||||
|         virtual relation_transformer_fn * mk_project_fn(const relation_base & t, unsigned col_cnt,  | ||||
|             const unsigned * removed_cols); | ||||
|         virtual relation_transformer_fn * mk_rename_fn(const relation_base & t, unsigned permutation_cycle_len,  | ||||
|             const unsigned * permutation_cycle); | ||||
|         virtual relation_union_fn * mk_union_fn(const relation_base & tgt, const relation_base & src,  | ||||
|             const relation_base * delta); | ||||
|         virtual relation_union_fn * mk_widen_fn(const relation_base & tgt, const relation_base & src,  | ||||
|             const relation_base * delta); | ||||
|         virtual relation_mutator_fn * mk_filter_identical_fn(const relation_base & t, unsigned col_cnt,  | ||||
|             const unsigned * identical_cols); | ||||
|         virtual relation_mutator_fn * mk_filter_equal_fn(const relation_base & t, const relation_element & value,  | ||||
|             unsigned col); | ||||
|         virtual relation_mutator_fn * mk_filter_interpreted_fn(const relation_base & t, app * condition); | ||||
|         virtual relation_intersection_filter_fn * mk_filter_by_negation_fn(const relation_base & t,  | ||||
|             const relation_base & negated_obj, unsigned joined_col_cnt,  | ||||
|             const unsigned * t_cols, const unsigned * negated_cols); | ||||
|         relation_join_fn * mk_join_fn(const relation_base & t1, const relation_base & t2, | ||||
|             unsigned col_cnt, const unsigned * cols1, const unsigned * cols2) override; | ||||
|         relation_transformer_fn * mk_project_fn(const relation_base & t, unsigned col_cnt, | ||||
|             const unsigned * removed_cols) override; | ||||
|         relation_transformer_fn * mk_rename_fn(const relation_base & t, unsigned permutation_cycle_len, | ||||
|             const unsigned * permutation_cycle) override; | ||||
|         relation_union_fn * mk_union_fn(const relation_base & tgt, const relation_base & src, | ||||
|             const relation_base * delta) override; | ||||
|         relation_union_fn * mk_widen_fn(const relation_base & tgt, const relation_base & src, | ||||
|             const relation_base * delta) override; | ||||
|         relation_mutator_fn * mk_filter_identical_fn(const relation_base & t, unsigned col_cnt, | ||||
|             const unsigned * identical_cols) override; | ||||
|         relation_mutator_fn * mk_filter_equal_fn(const relation_base & t, const relation_element & value, | ||||
|             unsigned col) override; | ||||
|         relation_mutator_fn * mk_filter_interpreted_fn(const relation_base & t, app * condition) override; | ||||
|         relation_intersection_filter_fn * mk_filter_by_negation_fn(const relation_base & t, | ||||
|             const relation_base & negated_obj, unsigned joined_col_cnt, | ||||
|             const unsigned * t_cols, const unsigned * negated_cols) override; | ||||
| 
 | ||||
|     private: | ||||
| 
 | ||||
|  | @ -123,28 +123,28 @@ namespace datalog { | |||
|         void mk_accessor(decl_kind k, func_decl_ref& fn, const relation_fact& f, bool destructive, expr_ref& res) const; | ||||
| 
 | ||||
|         external_relation(external_relation_plugin & p, const relation_signature & s, expr* r); | ||||
|         virtual ~external_relation(); | ||||
|         ~external_relation() override; | ||||
| 
 | ||||
|     public: | ||||
|         external_relation_plugin & get_plugin() const; | ||||
| 
 | ||||
|         virtual bool empty() const; | ||||
|         bool empty() const override; | ||||
| 
 | ||||
|         virtual void add_fact(const relation_fact & f); | ||||
|         void add_fact(const relation_fact & f) override; | ||||
| 
 | ||||
|         virtual bool contains_fact(const relation_fact & f) const; | ||||
|         bool contains_fact(const relation_fact & f) const override; | ||||
| 
 | ||||
|         virtual external_relation * clone() const; | ||||
|         external_relation * clone() const override; | ||||
| 
 | ||||
|         virtual external_relation * complement(func_decl*) const; | ||||
|         external_relation * complement(func_decl*) const override; | ||||
| 
 | ||||
|         virtual void display(std::ostream & out) const; | ||||
|         void display(std::ostream & out) const override; | ||||
| 
 | ||||
|         virtual void display_tuples(func_decl & pred, std::ostream & out) const; | ||||
|         void display_tuples(func_decl & pred, std::ostream & out) const override; | ||||
| 
 | ||||
|         expr*  get_relation() const { return m_rel.get(); } | ||||
| 
 | ||||
|         virtual void to_formula(expr_ref& fml) const { fml = get_relation(); } | ||||
|         void to_formula(expr_ref& fml) const override { fml = get_relation(); } | ||||
|      | ||||
|     }; | ||||
| 
 | ||||
|  |  | |||
|  | @ -333,7 +333,7 @@ namespace datalog { | |||
|             : convenient_relation_join_fn(sig1, sig2, col_cnt, cols1, cols2), | ||||
|             m_plugin(plugin) {} | ||||
| 
 | ||||
|         virtual relation_base * operator()(const relation_base & r1, const relation_base & r2) { | ||||
|         relation_base * operator()(const relation_base & r1, const relation_base & r2) override { | ||||
|             scoped_rel<finite_product_relation> r1_conv; | ||||
|             if(&r1.get_plugin()!=&m_plugin) { | ||||
|                 r1_conv = convert(r1); | ||||
|  | @ -390,7 +390,7 @@ namespace datalog { | |||
|                     relation_vector & rjoins) | ||||
|                 : m_parent(parent), m_r1(r1), m_r2(r2), m_rjoins(rjoins) {} | ||||
| 
 | ||||
|             virtual bool operator()(table_element * func_columns) { | ||||
|             bool operator()(table_element * func_columns) override { | ||||
|                 const relation_base & or1 = m_r1.get_inner_rel(func_columns[0]); | ||||
|                 const relation_base & or2 = m_r2.get_inner_rel(func_columns[1]); | ||||
|                 SASSERT(&or1); | ||||
|  | @ -450,7 +450,7 @@ namespace datalog { | |||
|             return (*m_rjoin_fn)(r1, r2); | ||||
|         } | ||||
| 
 | ||||
|         virtual relation_base * operator()(const relation_base & rb1, const relation_base & rb2) { | ||||
|         relation_base * operator()(const relation_base & rb1, const relation_base & rb2) override { | ||||
|             finite_product_relation_plugin & plugin = get(rb1).get_plugin(); | ||||
|             relation_manager & rmgr = plugin.get_manager(); | ||||
| 
 | ||||
|  | @ -565,7 +565,7 @@ namespace datalog { | |||
|             project_reducer(project_fn & parent, relation_vector & relations)  | ||||
|                 : m_parent(parent), m_relations(relations) {} | ||||
| 
 | ||||
|             virtual void operator()(table_element * func_columns, const table_element * merged_func_columns) { | ||||
|             void operator()(table_element * func_columns, const table_element * merged_func_columns) override { | ||||
|                 relation_base * tgt = m_relations[static_cast<unsigned>(func_columns[0])]->clone(); | ||||
|                 relation_base & src = *m_relations[static_cast<unsigned>(merged_func_columns[0])]; | ||||
|                 if(!m_parent.m_inner_rel_union) { | ||||
|  | @ -579,7 +579,7 @@ namespace datalog { | |||
|             } | ||||
|         }; | ||||
| 
 | ||||
|         virtual relation_base * operator()(const relation_base & rb) { | ||||
|         relation_base * operator()(const relation_base & rb) override { | ||||
|             const finite_product_relation & r = get(rb); | ||||
|             finite_product_relation_plugin & plugin = r.get_plugin(); | ||||
|             const table_base & rtable = r.get_table(); | ||||
|  | @ -696,7 +696,7 @@ namespace datalog { | |||
| 
 | ||||
|         } | ||||
| 
 | ||||
|         virtual relation_base * operator()(const relation_base & rb) { | ||||
|         relation_base * operator()(const relation_base & rb) override { | ||||
|             const finite_product_relation & r = get(rb); | ||||
|             const table_base & rtable = r.get_table(); | ||||
| 
 | ||||
|  | @ -795,9 +795,9 @@ namespace datalog { | |||
|                 m_delta_indexes(delta_indexes),  | ||||
|                 m_delta_rels(delta_rels) {} | ||||
| 
 | ||||
|             virtual ~union_mapper() {} | ||||
|             ~union_mapper() override {} | ||||
| 
 | ||||
|             virtual bool operator()(table_element * func_columns) { | ||||
|             bool operator()(table_element * func_columns) override { | ||||
|                 relation_base & otgt_orig = m_tgt.get_inner_rel(func_columns[0]); | ||||
|                 const relation_base & osrc = m_src.get_inner_rel(func_columns[1]); | ||||
| 
 | ||||
|  | @ -838,7 +838,7 @@ namespace datalog { | |||
|             src_copying_mapper(finite_product_relation & tgt, const finite_product_relation & src)  | ||||
|                 : m_tgt(tgt), m_src(src) {} | ||||
| 
 | ||||
|             virtual bool operator()(table_element * func_columns) { | ||||
|             bool operator()(table_element * func_columns) override { | ||||
|                 const relation_base & osrc = m_src.get_inner_rel(func_columns[0]); | ||||
|                 unsigned new_tgt_idx = m_tgt.get_next_rel_idx(); | ||||
|                 m_tgt.set_inner_rel(new_tgt_idx, osrc.clone()); | ||||
|  | @ -847,7 +847,7 @@ namespace datalog { | |||
|             } | ||||
|         }; | ||||
| 
 | ||||
|         virtual void operator()(relation_base & tgtb, const relation_base & srcb, relation_base * deltab) { | ||||
|         void operator()(relation_base & tgtb, const relation_base & srcb, relation_base * deltab) override { | ||||
|             finite_product_relation & tgt = get(tgtb); | ||||
|             const finite_product_relation & src0 = get(srcb); | ||||
|             finite_product_relation * delta = get(deltab); | ||||
|  | @ -1088,7 +1088,7 @@ namespace datalog { | |||
|     class finite_product_relation_plugin::converting_union_fn : public relation_union_fn { | ||||
|         scoped_ptr<relation_union_fn> m_tr_union_fun; | ||||
|     public: | ||||
|         virtual void operator()(relation_base & tgtb, const relation_base & srcb, relation_base * deltab) { | ||||
|         void operator()(relation_base & tgtb, const relation_base & srcb, relation_base * deltab) override { | ||||
|             SASSERT(srcb.get_plugin().is_finite_product_relation()); | ||||
|             const finite_product_relation & src = get(srcb); | ||||
|             finite_product_relation_plugin & plugin = src.get_plugin(); | ||||
|  | @ -1164,7 +1164,7 @@ namespace datalog { | |||
|             SASSERT(m_rel_filter); | ||||
|         } | ||||
| 
 | ||||
|         virtual void operator()(relation_base & rb) { | ||||
|         void operator()(relation_base & rb) override { | ||||
|             finite_product_relation & r = get(rb); | ||||
| 
 | ||||
|             if(m_table_cols.size()>1) { | ||||
|  | @ -1212,7 +1212,7 @@ namespace datalog { | |||
|             } | ||||
|         } | ||||
| 
 | ||||
|         virtual void operator()(relation_base & rb) { | ||||
|         void operator()(relation_base & rb) override { | ||||
|             finite_product_relation & r = get(rb); | ||||
| 
 | ||||
|             if(m_table_filter) { | ||||
|  | @ -1339,7 +1339,7 @@ namespace datalog { | |||
|             } | ||||
|         } | ||||
| 
 | ||||
|         virtual void operator()(relation_base & rb) { | ||||
|         void operator()(relation_base & rb) override { | ||||
|             finite_product_relation & r = get(rb); | ||||
|             table_base & rtable = r.get_table(); | ||||
|             table_plugin & tplugin = r.get_table_plugin(); | ||||
|  | @ -1537,7 +1537,7 @@ namespace datalog { | |||
|                         const finite_product_relation & inters) | ||||
|                 : m_parent(parent), m_r(r), m_inters(inters) {} | ||||
| 
 | ||||
|             virtual bool operator()(table_element * func_columns) { | ||||
|             bool operator()(table_element * func_columns) override { | ||||
|                 relation_base * r_inner = m_r.get_inner_rel(func_columns[0]).clone(); | ||||
|                 const relation_base & inters_inner = m_inters.get_inner_rel(func_columns[1]); | ||||
| 
 | ||||
|  | @ -1557,7 +1557,7 @@ namespace datalog { | |||
|         }; | ||||
| 
 | ||||
| 
 | ||||
|         virtual void operator()(relation_base & rb, const relation_base & negb) { | ||||
|         void operator()(relation_base & rb, const relation_base & negb) override { | ||||
|             finite_product_relation & r = get(rb); | ||||
|             const finite_product_relation & neg = get(negb); | ||||
| 
 | ||||
|  | @ -1662,7 +1662,7 @@ namespace datalog { | |||
|             } | ||||
|         } | ||||
| 
 | ||||
|         virtual void operator()(relation_base & rb) { | ||||
|         void operator()(relation_base & rb) override { | ||||
|             finite_product_relation & r = get(rb); | ||||
|             finite_product_relation_plugin & plugin = r.get_plugin(); | ||||
|             table_plugin & tplugin = r.get_table_plugin(); | ||||
|  | @ -2043,7 +2043,7 @@ namespace datalog { | |||
|     public: | ||||
|         live_rel_collection_reducer(idx_set & accumulator) : m_accumulator(accumulator) {} | ||||
| 
 | ||||
|         virtual void operator()(table_element * func_columns, const table_element * merged_func_columns) { | ||||
|         void operator()(table_element * func_columns, const table_element * merged_func_columns) override { | ||||
|             m_accumulator.insert(static_cast<unsigned>(merged_func_columns[0])); | ||||
|         } | ||||
|     }; | ||||
|  |  | |||
|  | @ -93,23 +93,23 @@ namespace datalog { | |||
| 
 | ||||
|         finite_product_relation_plugin(relation_plugin & inner_plugin, relation_manager & manager); | ||||
| 
 | ||||
|         virtual void initialize(family_id fid); | ||||
|         void initialize(family_id fid) override; | ||||
| 
 | ||||
|         relation_plugin & get_inner_plugin() const { return m_inner_plugin; } | ||||
| 
 | ||||
|         virtual bool can_handle_signature(const relation_signature & s); | ||||
|         bool can_handle_signature(const relation_signature & s) override; | ||||
| 
 | ||||
|         virtual relation_base * mk_empty(const relation_signature & s); | ||||
|         relation_base * mk_empty(const relation_signature & s) override; | ||||
|         /**
 | ||||
|            \c inner_kind==null_family_id means we don't care about the kind of the inner relation | ||||
|         */ | ||||
|         finite_product_relation * mk_empty(const relation_signature & s, const bool * table_columns, | ||||
|             family_id inner_kind=null_family_id); | ||||
|         finite_product_relation * mk_empty(const finite_product_relation & original); | ||||
|         virtual relation_base * mk_empty(const relation_base & original); | ||||
|         virtual relation_base * mk_empty(const relation_signature & s, family_id kind); | ||||
|         relation_base * mk_empty(const relation_base & original) override; | ||||
|         relation_base * mk_empty(const relation_signature & s, family_id kind) override; | ||||
| 
 | ||||
|         virtual relation_base * mk_full(func_decl* p, const relation_signature & s); | ||||
|         relation_base * mk_full(func_decl* p, const relation_signature & s) override; | ||||
| 
 | ||||
|         /**
 | ||||
|            \brief Return true if \c r can be converted to \c finite_product_relation_plugin either | ||||
|  | @ -127,22 +127,22 @@ namespace datalog { | |||
|         table_relation * to_table_relation(const finite_product_relation & r); | ||||
| 
 | ||||
|     protected: | ||||
|         virtual relation_join_fn * mk_join_fn(const relation_base & t1, const relation_base & t2, | ||||
|             unsigned col_cnt, const unsigned * cols1, const unsigned * cols2); | ||||
|         virtual relation_transformer_fn * mk_project_fn(const relation_base & t, unsigned col_cnt,  | ||||
|             const unsigned * removed_cols); | ||||
|         virtual relation_transformer_fn * mk_rename_fn(const relation_base & t, unsigned permutation_cycle_len,  | ||||
|             const unsigned * permutation_cycle); | ||||
|         virtual relation_union_fn * mk_union_fn(const relation_base & tgt, const relation_base & src,  | ||||
|             const relation_base * delta); | ||||
|         virtual relation_mutator_fn * mk_filter_identical_fn(const relation_base & t, unsigned col_cnt,  | ||||
|             const unsigned * identical_cols); | ||||
|         virtual relation_mutator_fn * mk_filter_equal_fn(const relation_base & t, const relation_element & value,  | ||||
|             unsigned col); | ||||
|         virtual relation_mutator_fn * mk_filter_interpreted_fn(const relation_base & t, app * condition); | ||||
|         virtual relation_intersection_filter_fn * mk_filter_by_negation_fn(const relation_base & t,  | ||||
|             const relation_base & negated_obj, unsigned joined_col_cnt,  | ||||
|             const unsigned * t_cols, const unsigned * negated_cols); | ||||
|         relation_join_fn * mk_join_fn(const relation_base & t1, const relation_base & t2, | ||||
|             unsigned col_cnt, const unsigned * cols1, const unsigned * cols2) override; | ||||
|         relation_transformer_fn * mk_project_fn(const relation_base & t, unsigned col_cnt, | ||||
|             const unsigned * removed_cols) override; | ||||
|         relation_transformer_fn * mk_rename_fn(const relation_base & t, unsigned permutation_cycle_len, | ||||
|             const unsigned * permutation_cycle) override; | ||||
|         relation_union_fn * mk_union_fn(const relation_base & tgt, const relation_base & src, | ||||
|             const relation_base * delta) override; | ||||
|         relation_mutator_fn * mk_filter_identical_fn(const relation_base & t, unsigned col_cnt, | ||||
|             const unsigned * identical_cols) override; | ||||
|         relation_mutator_fn * mk_filter_equal_fn(const relation_base & t, const relation_element & value, | ||||
|             unsigned col) override; | ||||
|         relation_mutator_fn * mk_filter_interpreted_fn(const relation_base & t, app * condition) override; | ||||
|         relation_intersection_filter_fn * mk_filter_by_negation_fn(const relation_base & t, | ||||
|             const relation_base & negated_obj, unsigned joined_col_cnt, | ||||
|             const unsigned * t_cols, const unsigned * negated_cols) override; | ||||
| 
 | ||||
|     private: | ||||
|         /**
 | ||||
|  | @ -309,7 +309,7 @@ namespace datalog { | |||
| 
 | ||||
|         bool try_modify_specification(const bool * table_cols); | ||||
| 
 | ||||
|         virtual bool can_swap(const relation_base & r) const | ||||
|         bool can_swap(const relation_base & r) const override | ||||
|         { return &get_plugin()==&r.get_plugin(); } | ||||
| 
 | ||||
|         /**
 | ||||
|  | @ -317,7 +317,7 @@ namespace datalog { | |||
| 
 | ||||
|            Both relations must come from the same plugin and be of the same signature. | ||||
|         */ | ||||
|         virtual void swap(relation_base & r); | ||||
|         void swap(relation_base & r) override; | ||||
| 
 | ||||
|         /**
 | ||||
|            \brief Create a \c finite_product_relation object. | ||||
|  | @ -325,7 +325,7 @@ namespace datalog { | |||
|         finite_product_relation(finite_product_relation_plugin & p, const relation_signature & s, | ||||
|             const bool * table_columns, table_plugin & tplugin, relation_plugin & oplugin, family_id other_kind); | ||||
|         finite_product_relation(const finite_product_relation & r); | ||||
|         virtual ~finite_product_relation(); | ||||
|         ~finite_product_relation() override; | ||||
|     public: | ||||
|         context & get_context() const; | ||||
|         finite_product_relation_plugin & get_plugin() const {  | ||||
|  | @ -342,22 +342,22 @@ namespace datalog { | |||
|         /**
 | ||||
|            The function calls garbage_collect, so the internal state may change when it is called. | ||||
|         */ | ||||
|         virtual bool empty() const; | ||||
|         void reset() { m_table->reset(); garbage_collect(false); } | ||||
|         bool empty() const override; | ||||
|         void reset() override { m_table->reset(); garbage_collect(false); } | ||||
| 
 | ||||
|         virtual void add_fact(const relation_fact & f); | ||||
|         virtual bool contains_fact(const relation_fact & f) const; | ||||
|         void add_fact(const relation_fact & f) override; | ||||
|         bool contains_fact(const relation_fact & f) const override; | ||||
| 
 | ||||
|         virtual finite_product_relation * clone() const; | ||||
|         virtual finite_product_relation * complement(func_decl* p) const; | ||||
|         finite_product_relation * clone() const override; | ||||
|         finite_product_relation * complement(func_decl* p) const override; | ||||
| 
 | ||||
|         virtual void display(std::ostream & out) const; | ||||
|         virtual void display_tuples(func_decl & pred, std::ostream & out) const; | ||||
|         void display(std::ostream & out) const override; | ||||
|         void display_tuples(func_decl & pred, std::ostream & out) const override; | ||||
| 
 | ||||
|         virtual unsigned get_size_estimate_rows() const { return m_table->get_size_estimate_rows(); } | ||||
|         virtual unsigned get_size_estimate_bytes() const { return m_table->get_size_estimate_bytes(); } | ||||
|         unsigned get_size_estimate_rows() const override { return m_table->get_size_estimate_rows(); } | ||||
|         unsigned get_size_estimate_bytes() const override { return m_table->get_size_estimate_bytes(); } | ||||
| 
 | ||||
|         virtual void to_formula(expr_ref& fml) const; | ||||
|         void to_formula(expr_ref& fml) const override; | ||||
|     }; | ||||
| 
 | ||||
| }; | ||||
|  |  | |||
|  | @ -192,7 +192,7 @@ namespace datalog { | |||
|     public: | ||||
|         instr_io(bool store, func_decl_ref const& pred, reg_idx reg) | ||||
|             : m_store(store), m_pred(pred), m_reg(reg) {} | ||||
|         virtual bool perform(execution_context & ctx) { | ||||
|         bool perform(execution_context & ctx) override { | ||||
|             log_verbose(ctx);             | ||||
|             if (m_store) { | ||||
|                 if (ctx.reg(m_reg)) { | ||||
|  | @ -218,10 +218,10 @@ namespace datalog { | |||
|             } | ||||
|             return true; | ||||
|         } | ||||
|         virtual void make_annotations(execution_context & ctx) { | ||||
|         void make_annotations(execution_context & ctx) override { | ||||
|             ctx.set_register_annotation(m_reg, m_pred->get_name().bare_str()); | ||||
|         } | ||||
|         virtual void display_head_impl(execution_context const& ctx, std::ostream & out) const { | ||||
|         void display_head_impl(execution_context const& ctx, std::ostream & out) const override { | ||||
|             const char * rel_name = m_pred->get_name().bare_str(); | ||||
|             if (m_store) { | ||||
|                 out << "store " << m_reg << " into " << rel_name; | ||||
|  | @ -245,14 +245,14 @@ namespace datalog { | |||
|         reg_idx m_reg; | ||||
|     public: | ||||
|         instr_dealloc(reg_idx reg) : m_reg(reg) {} | ||||
|         virtual bool perform(execution_context & ctx) { | ||||
|         bool perform(execution_context & ctx) override { | ||||
|             ctx.make_empty(m_reg); | ||||
|             return true; | ||||
|         } | ||||
|         virtual void make_annotations(execution_context & ctx) { | ||||
|         void make_annotations(execution_context & ctx) override { | ||||
|             ctx.set_register_annotation(m_reg, "alloc"); | ||||
|         } | ||||
|         virtual void display_head_impl(execution_context const& ctx, std::ostream & out) const { | ||||
|         void display_head_impl(execution_context const& ctx, std::ostream & out) const override { | ||||
|             out << "dealloc " << m_reg; | ||||
|         } | ||||
|     }; | ||||
|  | @ -268,7 +268,7 @@ namespace datalog { | |||
|     public: | ||||
|         instr_clone_move(bool clone, reg_idx src, reg_idx tgt) | ||||
|             : m_clone(clone), m_src(src), m_tgt(tgt) {} | ||||
|         virtual bool perform(execution_context & ctx) { | ||||
|         bool perform(execution_context & ctx) override { | ||||
|             if (ctx.reg(m_src)) log_verbose(ctx);             | ||||
|             if (m_clone) { | ||||
|                 ctx.set_reg(m_tgt, ctx.reg(m_src) ? ctx.reg(m_src)->clone() : 0); | ||||
|  | @ -278,7 +278,7 @@ namespace datalog { | |||
|             } | ||||
|             return true; | ||||
|         } | ||||
|         virtual void make_annotations(execution_context & ctx) { | ||||
|         void make_annotations(execution_context & ctx) override { | ||||
|             std::string str; | ||||
|             if (ctx.get_register_annotation(m_src, str)) { | ||||
|                 ctx.set_register_annotation(m_tgt, str); | ||||
|  | @ -287,7 +287,7 @@ namespace datalog { | |||
|                 ctx.set_register_annotation(m_src, str); | ||||
|             } | ||||
|         } | ||||
|         virtual void display_head_impl(execution_context const& ctx, std::ostream & out) const { | ||||
|         void display_head_impl(execution_context const& ctx, std::ostream & out) const override { | ||||
|             out << (m_clone ? "clone " : "move ") << m_src << " into " << m_tgt; | ||||
|         } | ||||
|     }; | ||||
|  | @ -317,17 +317,17 @@ namespace datalog { | |||
|             return true; | ||||
|         } | ||||
|     protected: | ||||
|         virtual void process_all_costs() { | ||||
|         void process_all_costs() override { | ||||
|             instruction::process_all_costs(); | ||||
|             m_body->process_all_costs(); | ||||
|         } | ||||
|     public: | ||||
|         instr_while_loop(unsigned control_reg_cnt, const reg_idx * control_regs, instruction_block * body) | ||||
|             : m_controls(control_reg_cnt, control_regs), m_body(body) {} | ||||
|         virtual ~instr_while_loop() { | ||||
|         ~instr_while_loop() override { | ||||
|             dealloc(m_body); | ||||
|         } | ||||
|         virtual bool perform(execution_context & ctx) { | ||||
|         bool perform(execution_context & ctx) override { | ||||
|             log_verbose(ctx);             | ||||
|             TRACE("dl", tout << "loop entered\n";); | ||||
|             unsigned count = 0; | ||||
|  | @ -341,14 +341,14 @@ namespace datalog { | |||
|             TRACE("dl", tout << "while loop exited\n";); | ||||
|             return true; | ||||
|         } | ||||
|         virtual void make_annotations(execution_context & ctx) { | ||||
|         void make_annotations(execution_context & ctx) override { | ||||
|             m_body->make_annotations(ctx); | ||||
|         } | ||||
|         virtual void display_head_impl(execution_context const & ctx, std::ostream & out) const { | ||||
|         void display_head_impl(execution_context const & ctx, std::ostream & out) const override { | ||||
|             out << "while"; | ||||
|             print_container(m_controls, out); | ||||
|         } | ||||
|         virtual void display_body_impl(execution_context const & ctx, std::ostream & out, const std::string & indentation) const { | ||||
|         void display_body_impl(execution_context const & ctx, std::ostream & out, const std::string & indentation) const override { | ||||
|             m_body->display_indented(ctx, out, indentation+"    "); | ||||
|         } | ||||
|     }; | ||||
|  | @ -371,7 +371,7 @@ namespace datalog { | |||
|             const unsigned * cols2, reg_idx result) | ||||
|             : m_rel1(rel1), m_rel2(rel2), m_cols1(col_cnt, cols1),  | ||||
|             m_cols2(col_cnt, cols2), m_res(result) {} | ||||
|         virtual bool perform(execution_context & ctx) { | ||||
|         bool perform(execution_context & ctx) override { | ||||
|             log_verbose(ctx);             | ||||
|             ++ctx.m_stats.m_join; | ||||
|             if (!ctx.reg(m_rel1) || !ctx.reg(m_rel2)) { | ||||
|  | @ -408,13 +408,13 @@ namespace datalog { | |||
|             } | ||||
|             return true; | ||||
|         } | ||||
|         virtual void make_annotations(execution_context & ctx) { | ||||
|         void make_annotations(execution_context & ctx) override { | ||||
|             std::string a1 = "rel1", a2 = "rel2"; | ||||
|             ctx.get_register_annotation(m_rel1, a1); | ||||
|             ctx.get_register_annotation(m_rel1, a1); | ||||
|             ctx.set_register_annotation(m_res, "join " + a1 + " " + a2); | ||||
|         } | ||||
|         virtual void display_head_impl(execution_context const & ctx, std::ostream & out) const { | ||||
|         void display_head_impl(execution_context const & ctx, std::ostream & out) const override { | ||||
|             out << "join " << m_rel1; | ||||
|             print_container(m_cols1, out); | ||||
|             out << " and " << m_rel2; | ||||
|  | @ -435,7 +435,7 @@ namespace datalog { | |||
|     public: | ||||
|         instr_filter_equal(ast_manager & m, reg_idx reg, const relation_element & value, unsigned col) | ||||
|             : m_reg(reg), m_value(value, m), m_col(col) {} | ||||
|         virtual bool perform(execution_context & ctx) { | ||||
|         bool perform(execution_context & ctx) override { | ||||
|             log_verbose(ctx);             | ||||
|             ++ctx.m_stats.m_filter_eq; | ||||
|             if (!ctx.reg(m_reg)) { | ||||
|  | @ -460,12 +460,12 @@ namespace datalog { | |||
|             } | ||||
|             return true; | ||||
|         } | ||||
|         virtual void make_annotations(execution_context & ctx) { | ||||
|         void make_annotations(execution_context & ctx) override { | ||||
|             std::stringstream a; | ||||
|             a << "filter_equal " << m_col << " val: " << ctx.get_rel_context().get_rmanager().to_nice_string(m_value); | ||||
|             ctx.set_register_annotation(m_reg, a.str()); | ||||
|         } | ||||
|         virtual void display_head_impl(execution_context const& ctx, std::ostream & out) const { | ||||
|         void display_head_impl(execution_context const& ctx, std::ostream & out) const override { | ||||
|             out << "filter_equal " << m_reg << " col: " << m_col << " val: " | ||||
|                 << ctx.get_rel_context().get_rmanager().to_nice_string(m_value); | ||||
|         } | ||||
|  | @ -484,7 +484,7 @@ namespace datalog { | |||
|     public: | ||||
|         instr_filter_identical(reg_idx reg, unsigned col_cnt, const unsigned * identical_cols) | ||||
|             : m_reg(reg), m_cols(col_cnt, identical_cols) {} | ||||
|         virtual bool perform(execution_context & ctx) { | ||||
|         bool perform(execution_context & ctx) override { | ||||
|             log_verbose(ctx);             | ||||
|             ++ctx.m_stats.m_filter_id; | ||||
|             if (!ctx.reg(m_reg)) { | ||||
|  | @ -509,11 +509,11 @@ namespace datalog { | |||
|             } | ||||
|             return true; | ||||
|         } | ||||
|         virtual void display_head_impl(execution_context const& ctx, std::ostream & out) const { | ||||
|         void display_head_impl(execution_context const& ctx, std::ostream & out) const override { | ||||
|             out << "filter_identical " << m_reg << " "; | ||||
|             print_container(m_cols, out); | ||||
|         } | ||||
|         virtual void make_annotations(execution_context & ctx) { | ||||
|         void make_annotations(execution_context & ctx) override { | ||||
|             ctx.set_register_annotation(m_reg, "filter_identical"); | ||||
|         } | ||||
|     }; | ||||
|  | @ -529,7 +529,7 @@ namespace datalog { | |||
|     public: | ||||
|         instr_filter_interpreted(reg_idx reg, app_ref & condition) | ||||
|             : m_reg(reg), m_cond(condition) {} | ||||
|         virtual bool perform(execution_context & ctx) { | ||||
|         bool perform(execution_context & ctx) override { | ||||
|             if (!ctx.reg(m_reg)) { | ||||
|                 return true; | ||||
|             } | ||||
|  | @ -557,11 +557,11 @@ namespace datalog { | |||
| 
 | ||||
|             return true; | ||||
|         } | ||||
|         virtual void display_head_impl(execution_context const& ctx, std::ostream & out) const { | ||||
|         void display_head_impl(execution_context const& ctx, std::ostream & out) const override { | ||||
|             out << "filter_interpreted " << m_reg << " using " | ||||
|                 << mk_pp(m_cond, m_cond.get_manager()); | ||||
|         } | ||||
|         virtual void make_annotations(execution_context & ctx) { | ||||
|         void make_annotations(execution_context & ctx) override { | ||||
|             std::stringstream a; | ||||
|             a << "filter_interpreted " << mk_pp(m_cond, m_cond.get_manager()); | ||||
|             ctx.set_register_annotation(m_reg, a.str()); | ||||
|  | @ -584,7 +584,7 @@ namespace datalog { | |||
|             : m_src(src), m_cond(condition), m_cols(col_cnt, removed_cols), | ||||
|               m_res(result) {} | ||||
| 
 | ||||
|         virtual bool perform(execution_context & ctx) { | ||||
|         bool perform(execution_context & ctx) override { | ||||
|             log_verbose(ctx);             | ||||
|             if (!ctx.reg(m_src)) { | ||||
|                 ctx.make_empty(m_res); | ||||
|  | @ -614,14 +614,14 @@ namespace datalog { | |||
|             return true; | ||||
|         } | ||||
| 
 | ||||
|         virtual void display_head_impl(execution_context const& ctx, std::ostream & out) const { | ||||
|         void display_head_impl(execution_context const& ctx, std::ostream & out) const override { | ||||
|             out << "filter_interpreted_and_project " << m_src << " into " << m_res; | ||||
|             out << " using " << mk_pp(m_cond, m_cond.get_manager()); | ||||
|             out << " deleting columns "; | ||||
|             print_container(m_cols, out); | ||||
|         } | ||||
| 
 | ||||
|         virtual void make_annotations(execution_context & ctx) { | ||||
|         void make_annotations(execution_context & ctx) override { | ||||
|             std::stringstream s; | ||||
|             std::string a = "rel_src"; | ||||
|             ctx.get_register_annotation(m_src, a); | ||||
|  | @ -644,7 +644,7 @@ namespace datalog { | |||
|     public: | ||||
|         instr_union(reg_idx src, reg_idx tgt, reg_idx delta, bool widen) | ||||
|             : m_src(src), m_tgt(tgt), m_delta(delta), m_widen(widen) {} | ||||
|         virtual bool perform(execution_context & ctx) { | ||||
|         bool perform(execution_context & ctx) override { | ||||
|             TRACE("dl", tout << "union " << m_src << " into " << m_tgt  | ||||
|                   << " " << ctx.reg(m_src) << " " << ctx.reg(m_tgt) << "\n";); | ||||
|             if (!ctx.reg(m_src)) { | ||||
|  | @ -721,7 +721,7 @@ namespace datalog { | |||
| 
 | ||||
|             return true; | ||||
|         } | ||||
|         virtual void make_annotations(execution_context & ctx) { | ||||
|         void make_annotations(execution_context & ctx) override { | ||||
|             std::string str = "union"; | ||||
|             if (!ctx.get_register_annotation(m_tgt, str)) { | ||||
|                 ctx.set_register_annotation(m_tgt, "union"); | ||||
|  | @ -731,7 +731,7 @@ namespace datalog { | |||
|             } | ||||
|             ctx.set_register_annotation(m_delta, str);             | ||||
|         } | ||||
|         virtual void display_head_impl(execution_context const& ctx, std::ostream & out) const { | ||||
|         void display_head_impl(execution_context const& ctx, std::ostream & out) const override { | ||||
|             out << (m_widen ? "widen " : "union ") << m_src << " into " << m_tgt; | ||||
|             if (m_delta!=execution_context::void_register) { | ||||
|                 out << " with delta " << m_delta; | ||||
|  | @ -758,7 +758,7 @@ namespace datalog { | |||
|         instr_project_rename(bool projection, reg_idx src, unsigned col_cnt, const unsigned * cols,  | ||||
|             reg_idx tgt) : m_projection(projection), m_src(src),  | ||||
|             m_cols(col_cnt, cols), m_tgt(tgt) {} | ||||
|         virtual bool perform(execution_context & ctx) { | ||||
|         bool perform(execution_context & ctx) override { | ||||
|             if (!ctx.reg(m_src)) { | ||||
|                 ctx.make_empty(m_tgt); | ||||
|                 return true; | ||||
|  | @ -787,12 +787,12 @@ namespace datalog { | |||
| 
 | ||||
|             return true; | ||||
|         } | ||||
|         virtual void display_head_impl(execution_context const& ctx, std::ostream & out) const { | ||||
|         void display_head_impl(execution_context const& ctx, std::ostream & out) const override { | ||||
|             out << (m_projection ? "project " : "rename ") << m_src << " into " << m_tgt; | ||||
|             out << (m_projection ? " deleting columns " : " with cycle "); | ||||
|             print_container(m_cols, out); | ||||
|         } | ||||
|         virtual void make_annotations(execution_context & ctx) { | ||||
|         void make_annotations(execution_context & ctx) override { | ||||
|             std::stringstream s; | ||||
|             std::string a = "rel_src"; | ||||
|             ctx.get_register_annotation(m_src, a); | ||||
|  | @ -825,7 +825,7 @@ namespace datalog { | |||
|             : m_rel1(rel1), m_rel2(rel2), m_cols1(joined_col_cnt, cols1),  | ||||
|             m_cols2(joined_col_cnt, cols2), m_removed_cols(removed_col_cnt, removed_cols), m_res(result) { | ||||
|         } | ||||
|         virtual bool perform(execution_context & ctx) { | ||||
|         bool perform(execution_context & ctx) override { | ||||
|             log_verbose(ctx);             | ||||
|             if (!ctx.reg(m_rel1) || !ctx.reg(m_rel2)) { | ||||
|                 ctx.make_empty(m_res); | ||||
|  | @ -852,7 +852,7 @@ namespace datalog { | |||
|             } | ||||
|             return true; | ||||
|         } | ||||
|         virtual void display_head_impl(execution_context const& ctx, std::ostream & out) const { | ||||
|         void display_head_impl(execution_context const& ctx, std::ostream & out) const override { | ||||
|             relation_base const* r1 = ctx.reg(m_rel1); | ||||
|             relation_base const* r2 = ctx.reg(m_rel2); | ||||
|             out << "join_project " << m_rel1;             | ||||
|  | @ -870,7 +870,7 @@ namespace datalog { | |||
|             out << " into " << m_res << " removing columns "; | ||||
|             print_container(m_removed_cols, out); | ||||
|         } | ||||
|         virtual void make_annotations(execution_context & ctx) { | ||||
|         void make_annotations(execution_context & ctx) override { | ||||
|             std::string s1 = "rel1", s2 = "rel2"; | ||||
|             ctx.get_register_annotation(m_rel1, s1); | ||||
|             ctx.get_register_annotation(m_rel2, s2); | ||||
|  | @ -898,7 +898,7 @@ namespace datalog { | |||
|             // TRACE("dl", tout << "src:"  << m_src << " result: " << m_result << " value:" << m_value << " column:" << m_col << "\n";);
 | ||||
|         } | ||||
| 
 | ||||
|         virtual bool perform(execution_context & ctx) { | ||||
|         bool perform(execution_context & ctx) override { | ||||
|             if (!ctx.reg(m_src)) { | ||||
|                 ctx.make_empty(m_result); | ||||
|                 return true; | ||||
|  | @ -923,11 +923,11 @@ namespace datalog { | |||
|             } | ||||
|             return true; | ||||
|         } | ||||
|         virtual void display_head_impl(execution_context const& ctx, std::ostream & out) const { | ||||
|         void display_head_impl(execution_context const& ctx, std::ostream & out) const override { | ||||
|             out << "select_equal_and_project " << m_src <<" into " << m_result << " col: " << m_col  | ||||
|                 << " val: " << ctx.get_rel_context().get_rmanager().to_nice_string(m_value); | ||||
|         } | ||||
|         virtual void make_annotations(execution_context & ctx) { | ||||
|         void make_annotations(execution_context & ctx) override { | ||||
|             std::stringstream s; | ||||
|             std::string s1 = "src"; | ||||
|             ctx.get_register_annotation(m_src, s1); | ||||
|  | @ -953,7 +953,7 @@ namespace datalog { | |||
|         instr_filter_by_negation(reg_idx tgt, reg_idx neg_rel, unsigned col_cnt, const unsigned * cols1,  | ||||
|             const unsigned * cols2) | ||||
|             : m_tgt(tgt), m_neg_rel(neg_rel), m_cols1(col_cnt, cols1), m_cols2(col_cnt, cols2) {} | ||||
|         virtual bool perform(execution_context & ctx) { | ||||
|         bool perform(execution_context & ctx) override { | ||||
|             log_verbose(ctx);             | ||||
|             if (!ctx.reg(m_tgt) || !ctx.reg(m_neg_rel)) { | ||||
|                 return true; | ||||
|  | @ -980,14 +980,14 @@ namespace datalog { | |||
|             } | ||||
|             return true; | ||||
|         } | ||||
|         virtual void display_head_impl(execution_context const& ctx, std::ostream & out) const { | ||||
|         void display_head_impl(execution_context const& ctx, std::ostream & out) const override { | ||||
|             out << "filter_by_negation on " << m_tgt; | ||||
|             print_container(m_cols1, out); | ||||
|             out << " with " << m_neg_rel; | ||||
|             print_container(m_cols2, out); | ||||
|             out << " as the negated table"; | ||||
|         } | ||||
|         virtual void make_annotations(execution_context & ctx) { | ||||
|         void make_annotations(execution_context & ctx) override { | ||||
|             std::string s = "negated relation"; | ||||
|             ctx.get_register_annotation(m_neg_rel, s); | ||||
|             ctx.set_register_annotation(m_tgt, "filter by negation " + s);             | ||||
|  | @ -1011,7 +1011,7 @@ namespace datalog { | |||
|             m_sig.push_back(s); | ||||
|             m_fact.push_back(val); | ||||
|         } | ||||
|         virtual bool perform(execution_context & ctx) { | ||||
|         bool perform(execution_context & ctx) override { | ||||
|             log_verbose(ctx);             | ||||
|             ++ctx.m_stats.m_unary_singleton; | ||||
|             relation_base * rel = ctx.get_rel_context().get_rmanager().mk_empty_relation(m_sig, m_pred); | ||||
|  | @ -1019,12 +1019,12 @@ namespace datalog { | |||
|             ctx.set_reg(m_tgt, rel); | ||||
|             return true; | ||||
|         } | ||||
|         virtual void display_head_impl(execution_context const& ctx, std::ostream & out) const { | ||||
|         void display_head_impl(execution_context const& ctx, std::ostream & out) const override { | ||||
|             out << "mk_unary_singleton into " << m_tgt << " sort:"  | ||||
|                 << ctx.get_rel_context().get_rmanager().to_nice_string(m_sig[0]) << " val:"  | ||||
|                 << ctx.get_rel_context().get_rmanager().to_nice_string(m_sig[0], m_fact[0]); | ||||
|         } | ||||
|         virtual void make_annotations(execution_context & ctx) { | ||||
|         void make_annotations(execution_context & ctx) override { | ||||
|             std::string s; | ||||
|             if (!ctx.get_register_annotation(m_tgt, s)) { | ||||
|                 ctx.set_register_annotation(m_tgt, "mk unary singleton"); | ||||
|  | @ -1044,18 +1044,18 @@ namespace datalog { | |||
|         reg_idx m_tgt; | ||||
|     public: | ||||
|         instr_mk_total(const relation_signature & sig, func_decl* p, reg_idx tgt) : m_sig(sig), m_pred(p), m_tgt(tgt) {} | ||||
|         virtual bool perform(execution_context & ctx) { | ||||
|         bool perform(execution_context & ctx) override { | ||||
|             log_verbose(ctx);             | ||||
|             ++ctx.m_stats.m_total; | ||||
|             ctx.set_reg(m_tgt, ctx.get_rel_context().get_rmanager().mk_full_relation(m_sig, m_pred)); | ||||
|             return true; | ||||
|         } | ||||
|         virtual void display_head_impl(execution_context const& ctx, std::ostream & out) const { | ||||
|         void display_head_impl(execution_context const& ctx, std::ostream & out) const override { | ||||
|             out << "mk_total into " << m_tgt << " sort:"  | ||||
|                 << ctx.get_rel_context().get_rmanager().to_nice_string(m_sig) | ||||
|                 << " " << m_pred->get_name(); | ||||
|         } | ||||
|         virtual void make_annotations(execution_context & ctx) { | ||||
|         void make_annotations(execution_context & ctx) override { | ||||
|             std::string s; | ||||
|             if (!ctx.get_register_annotation(m_tgt, s)) { | ||||
|                 ctx.set_register_annotation(m_tgt, "mk_total"); | ||||
|  | @ -1072,15 +1072,15 @@ namespace datalog { | |||
|     public: | ||||
|         instr_mark_saturated(ast_manager & m, func_decl * pred)  | ||||
|             : m_pred(pred, m) {} | ||||
|         virtual bool perform(execution_context & ctx) { | ||||
|         bool perform(execution_context & ctx) override { | ||||
|             log_verbose(ctx);             | ||||
|             ctx.get_rel_context().get_rmanager().mark_saturated(m_pred); | ||||
|             return true; | ||||
|         } | ||||
|         virtual void display_head_impl(execution_context const& ctx, std::ostream & out) const { | ||||
|         void display_head_impl(execution_context const& ctx, std::ostream & out) const override { | ||||
|             out << "mark_saturated " << m_pred->get_name().bare_str(); | ||||
|         } | ||||
|         virtual void make_annotations(execution_context & ctx) {             | ||||
|         void make_annotations(execution_context & ctx) override { | ||||
|         } | ||||
|     }; | ||||
| 
 | ||||
|  | @ -1094,18 +1094,18 @@ namespace datalog { | |||
|     public: | ||||
|         instr_assert_signature(const relation_signature & s, reg_idx tgt)  | ||||
|             : m_sig(s), m_tgt(tgt) {} | ||||
|         virtual bool perform(execution_context & ctx) { | ||||
|         bool perform(execution_context & ctx) override { | ||||
|             log_verbose(ctx);             | ||||
|             if (ctx.reg(m_tgt)) { | ||||
|                 SASSERT(ctx.reg(m_tgt)->get_signature()==m_sig); | ||||
|             } | ||||
|             return true; | ||||
|         } | ||||
|         virtual void display_head_impl(execution_context const& ctx, std::ostream & out) const { | ||||
|         void display_head_impl(execution_context const& ctx, std::ostream & out) const override { | ||||
|             out << "instr_assert_signature of " << m_tgt << " signature:"; | ||||
|             print_container(m_sig, out); | ||||
|         } | ||||
|         virtual void make_annotations(execution_context & ctx) { | ||||
|         void make_annotations(execution_context & ctx) override { | ||||
|             std::string s; | ||||
|             if (!ctx.get_register_annotation(m_tgt, s)) { | ||||
|                 ctx.set_register_annotation(m_tgt, "assert signature"); | ||||
|  |  | |||
|  | @ -59,7 +59,7 @@ namespace datalog { | |||
|             : convenient_relation_join_fn(o1_sig, o2_sig, col_cnt, cols1, cols2){ | ||||
|         } | ||||
| 
 | ||||
|         virtual relation_base * operator()(const relation_base & _r1, const relation_base & _r2) { | ||||
|         relation_base * operator()(const relation_base & _r1, const relation_base & _r2) override { | ||||
|             interval_relation const& r1 = get(_r1); | ||||
|             interval_relation const& r2 = get(_r2); | ||||
|             interval_relation_plugin& p = r1.get_plugin(); | ||||
|  | @ -84,7 +84,7 @@ namespace datalog { | |||
|             : convenient_relation_project_fn(orig_sig, removed_col_cnt, removed_cols) { | ||||
|         } | ||||
| 
 | ||||
|         virtual relation_base * operator()(const relation_base & _r) { | ||||
|         relation_base * operator()(const relation_base & _r) override { | ||||
|             interval_relation const& r = get(_r); | ||||
|             interval_relation_plugin& p = r.get_plugin(); | ||||
|             interval_relation* result = dynamic_cast<interval_relation*>(p.mk_full(0, get_result_signature()));             | ||||
|  | @ -104,7 +104,7 @@ namespace datalog { | |||
|             : convenient_relation_rename_fn(orig_sig, cycle_len, cycle) { | ||||
|         } | ||||
| 
 | ||||
|         virtual relation_base * operator()(const relation_base & _r) { | ||||
|         relation_base * operator()(const relation_base & _r) override { | ||||
|             interval_relation const& r = get(_r); | ||||
|             interval_relation_plugin& p = r.get_plugin(); | ||||
|             interval_relation* result = dynamic_cast<interval_relation*>(p.mk_full(0, get_result_signature())); | ||||
|  | @ -198,7 +198,7 @@ namespace datalog { | |||
|             m_is_widen(is_widen) {             | ||||
|         } | ||||
| 
 | ||||
|         virtual void operator()(relation_base & _r, const relation_base & _src, relation_base * _delta) { | ||||
|         void operator()(relation_base & _r, const relation_base & _src, relation_base * _delta) override { | ||||
| 
 | ||||
|             TRACE("interval_relation", _r.display(tout << "dst:\n"); _src.display(tout  << "src:\n");); | ||||
| 
 | ||||
|  | @ -237,7 +237,7 @@ namespace datalog { | |||
|         filter_identical_fn(unsigned col_cnt, const unsigned * identical_cols)  | ||||
|             : m_identical_cols(col_cnt, identical_cols) {} | ||||
| 
 | ||||
|         virtual void operator()(relation_base & r) { | ||||
|         void operator()(relation_base & r) override { | ||||
|             interval_relation & pr = get(r); | ||||
|             for (unsigned i = 1; i < m_identical_cols.size(); ++i) { | ||||
|                 unsigned c1 = m_identical_cols[0]; | ||||
|  | @ -266,7 +266,7 @@ namespace datalog { | |||
|             VERIFY(arith.is_numeral(value, m_value));             | ||||
|         } | ||||
| 
 | ||||
|         virtual void operator()(relation_base & _r) { | ||||
|         void operator()(relation_base & _r) override { | ||||
|             interval_relation & r = get(_r); | ||||
|             interval_relation_plugin & p = r.get_plugin(); | ||||
|             r.mk_intersect(m_col, interval(p.dep(), m_value)); | ||||
|  | @ -290,7 +290,7 @@ namespace datalog { | |||
|             m_cond(cond, t.get_plugin().get_ast_manager()) { | ||||
|         } | ||||
| 
 | ||||
|         void operator()(relation_base& t) { | ||||
|         void operator()(relation_base& t) override { | ||||
|             get(t).filter_interpreted(m_cond); | ||||
|             TRACE("interval_relation", tout << mk_pp(m_cond, m_cond.get_manager()) << "\n"; t.display(tout);); | ||||
|         } | ||||
|  |  | |||
|  | @ -53,25 +53,25 @@ namespace datalog { | |||
| 
 | ||||
|     public: | ||||
|         interval_relation_plugin(relation_manager& m); | ||||
|         virtual bool can_handle_signature(const relation_signature & s); | ||||
|         bool can_handle_signature(const relation_signature & s) override; | ||||
|         static symbol get_name() { return symbol("interval_relation"); } | ||||
|         virtual relation_base * mk_empty(const relation_signature & s); | ||||
|         virtual relation_base * mk_full(func_decl* p, const relation_signature & s); | ||||
|         virtual relation_join_fn * mk_join_fn(const relation_base & t1, const relation_base & t2, | ||||
|             unsigned col_cnt, const unsigned * cols1, const unsigned * cols2); | ||||
|         virtual relation_transformer_fn * mk_project_fn(const relation_base & t, unsigned col_cnt,  | ||||
|             const unsigned * removed_cols); | ||||
|         virtual relation_transformer_fn * mk_rename_fn(const relation_base & t, unsigned permutation_cycle_len,  | ||||
|             const unsigned * permutation_cycle); | ||||
|         virtual relation_union_fn * mk_union_fn(const relation_base & tgt, const relation_base & src,  | ||||
|             const relation_base * delta); | ||||
|         virtual relation_union_fn * mk_widen_fn(const relation_base & tgt, const relation_base & src,  | ||||
|             const relation_base * delta); | ||||
|         virtual relation_mutator_fn * mk_filter_identical_fn(const relation_base & t, unsigned col_cnt,  | ||||
|             const unsigned * identical_cols); | ||||
|         virtual relation_mutator_fn * mk_filter_equal_fn(const relation_base & t, const relation_element & value,  | ||||
|             unsigned col); | ||||
|         virtual relation_mutator_fn * mk_filter_interpreted_fn(const relation_base & t, app * condition); | ||||
|         relation_base * mk_empty(const relation_signature & s) override; | ||||
|         relation_base * mk_full(func_decl* p, const relation_signature & s) override; | ||||
|         relation_join_fn * mk_join_fn(const relation_base & t1, const relation_base & t2, | ||||
|             unsigned col_cnt, const unsigned * cols1, const unsigned * cols2) override; | ||||
|         relation_transformer_fn * mk_project_fn(const relation_base & t, unsigned col_cnt, | ||||
|             const unsigned * removed_cols) override; | ||||
|         relation_transformer_fn * mk_rename_fn(const relation_base & t, unsigned permutation_cycle_len, | ||||
|             const unsigned * permutation_cycle) override; | ||||
|         relation_union_fn * mk_union_fn(const relation_base & tgt, const relation_base & src, | ||||
|             const relation_base * delta) override; | ||||
|         relation_union_fn * mk_widen_fn(const relation_base & tgt, const relation_base & src, | ||||
|             const relation_base * delta) override; | ||||
|         relation_mutator_fn * mk_filter_identical_fn(const relation_base & t, unsigned col_cnt, | ||||
|             const unsigned * identical_cols) override; | ||||
|         relation_mutator_fn * mk_filter_equal_fn(const relation_base & t, const relation_element & value, | ||||
|             unsigned col) override; | ||||
|         relation_mutator_fn * mk_filter_interpreted_fn(const relation_base & t, app * condition) override; | ||||
| 
 | ||||
|         static bool is_empty(unsigned idx, interval const& i); | ||||
|         static bool is_infinite(interval const& i); | ||||
|  | @ -97,39 +97,39 @@ namespace datalog { | |||
|     public: | ||||
|         interval_relation(interval_relation_plugin& p, relation_signature const& s, bool is_empty); | ||||
| 
 | ||||
|         virtual void add_fact(const relation_fact & f); | ||||
|         virtual bool contains_fact(const relation_fact & f) const; | ||||
|         virtual interval_relation * clone() const; | ||||
|         virtual interval_relation * complement(func_decl*) const; | ||||
|         virtual void to_formula(expr_ref& fml) const; | ||||
|         void add_fact(const relation_fact & f) override; | ||||
|         bool contains_fact(const relation_fact & f) const override; | ||||
|         interval_relation * clone() const override; | ||||
|         interval_relation * complement(func_decl*) const override; | ||||
|         void to_formula(expr_ref& fml) const override; | ||||
|         interval_relation_plugin& get_plugin() const;  | ||||
| 
 | ||||
|         void filter_interpreted(app* cond); | ||||
|         virtual bool is_precise() const { return false; } | ||||
|         bool is_precise() const override { return false; } | ||||
| 
 | ||||
|     private: | ||||
| 
 | ||||
|         virtual interval mk_intersect(interval const& t1, interval const& t2, bool& is_empty) const {  | ||||
|         interval mk_intersect(interval const& t1, interval const& t2, bool& is_empty) const override { | ||||
|             return get_plugin().meet(t1, t2, is_empty);  | ||||
|         } | ||||
| 
 | ||||
|         virtual interval mk_unite(interval const& t1, interval const& t2) const { return get_plugin().unite(t1,t2); } | ||||
|         interval mk_unite(interval const& t1, interval const& t2) const override { return get_plugin().unite(t1,t2); } | ||||
| 
 | ||||
|         virtual interval mk_widen(interval const& t1, interval const& t2) const { return get_plugin().widen(t1,t2); } | ||||
|         interval mk_widen(interval const& t1, interval const& t2) const override { return get_plugin().widen(t1,t2); } | ||||
| 
 | ||||
|         virtual bool is_subset_of(interval const& t1, interval const& t2) const { NOT_IMPLEMENTED_YET(); return false; } | ||||
|         bool is_subset_of(interval const& t1, interval const& t2) const override { NOT_IMPLEMENTED_YET(); return false; } | ||||
| 
 | ||||
|         virtual bool is_full(interval const& t) const {  | ||||
|         bool is_full(interval const& t) const override { | ||||
|             return interval_relation_plugin::is_infinite(t); | ||||
|         } | ||||
| 
 | ||||
|         virtual bool is_empty(unsigned idx, interval const& t) const { | ||||
|         bool is_empty(unsigned idx, interval const& t) const override { | ||||
|             return interval_relation_plugin::is_empty(idx, t); | ||||
|         } | ||||
| 
 | ||||
|         virtual void mk_rename_elem(interval& i, unsigned col_cnt, unsigned const* cycle); | ||||
|         void mk_rename_elem(interval& i, unsigned col_cnt, unsigned const* cycle) override; | ||||
| 
 | ||||
|         virtual void display_index(unsigned idx, interval const & i, std::ostream& out) const; | ||||
|         void display_index(unsigned idx, interval const & i, std::ostream& out) const override; | ||||
| 
 | ||||
|         void mk_intersect(unsigned idx, interval const& i); | ||||
| 
 | ||||
|  |  | |||
|  | @ -50,7 +50,7 @@ namespace datalog { | |||
|                 unsigned const* cols1, unsigned const* cols2): | ||||
|             convenient_table_join_fn(s1, s2, col_cnt, cols1, cols2) {} | ||||
|                                    | ||||
|         virtual table_base* operator()(const table_base& _t1, const table_base& _t2) { | ||||
|         table_base* operator()(const table_base& _t1, const table_base& _t2) override { | ||||
|             lazy_table const& t1 = get(_t1); | ||||
|             lazy_table const& t2 = get(_t2); | ||||
|             lazy_table_ref* tr = alloc(lazy_table_join, m_cols1.size(), m_cols1.c_ptr(), m_cols2.c_ptr(), t1, t2, get_result_signature()); | ||||
|  | @ -75,7 +75,7 @@ namespace datalog { | |||
|     class lazy_table_plugin::union_fn : public table_union_fn { | ||||
|     public: | ||||
|         void operator()(table_base & _tgt, const table_base & _src,  | ||||
|                         table_base * _delta) { | ||||
|                         table_base * _delta) override { | ||||
|             lazy_table& tgt = get(_tgt); | ||||
|             lazy_table const& src = get(_src); | ||||
|             lazy_table* delta = get(_delta);   | ||||
|  | @ -111,7 +111,7 @@ namespace datalog { | |||
|             convenient_table_project_fn(orig_sig, cnt, cols) | ||||
|         {} | ||||
| 
 | ||||
|         virtual table_base* operator()(table_base const& _t) { | ||||
|         table_base* operator()(table_base const& _t) override { | ||||
|             lazy_table const& t = get(_t); | ||||
|             return alloc(lazy_table, alloc(lazy_table_project, m_removed_cols.size(), m_removed_cols.c_ptr(), t, get_result_signature())); | ||||
|         } | ||||
|  | @ -137,7 +137,7 @@ namespace datalog { | |||
|             convenient_table_rename_fn(orig_sig, cnt, cols) | ||||
|         {} | ||||
| 
 | ||||
|         virtual table_base* operator()(table_base const& _t) { | ||||
|         table_base* operator()(table_base const& _t) override { | ||||
|             lazy_table const& t = get(_t); | ||||
|             return alloc(lazy_table, alloc(lazy_table_rename, m_cycle.size(), m_cycle.c_ptr(), t, get_result_signature())); | ||||
|         } | ||||
|  | @ -163,7 +163,7 @@ namespace datalog { | |||
|     public: | ||||
|         filter_identical_fn(unsigned cnt, unsigned const* cols): m_cols(cnt, cols) {} | ||||
|          | ||||
|         virtual void operator()(table_base& _t) { | ||||
|         void operator()(table_base& _t) override { | ||||
|             lazy_table& t = get(_t); | ||||
|             t.set(alloc(lazy_table_filter_identical, m_cols.size(), m_cols.c_ptr(), t)); | ||||
|         } | ||||
|  | @ -188,7 +188,7 @@ namespace datalog { | |||
|     public: | ||||
|         filter_interpreted_fn(app_ref& p): m_condition(p) {} | ||||
| 
 | ||||
|         virtual void operator()(table_base& _t) { | ||||
|         void operator()(table_base& _t) override { | ||||
|             lazy_table& t = get(_t); | ||||
|             t.set(alloc(lazy_table_filter_interpreted, t, m_condition)); | ||||
|         } | ||||
|  | @ -214,7 +214,7 @@ namespace datalog { | |||
|     public: | ||||
|         filter_by_negation_fn(unsigned cnt, unsigned const* cols1, unsigned const* cols2): | ||||
|             m_cols1(cnt, cols1), m_cols2(cnt, cols2) {} | ||||
|         virtual void operator()(table_base & _t, const table_base & _intersected_obj) { | ||||
|         void operator()(table_base & _t, const table_base & _intersected_obj) override { | ||||
|             lazy_table& t = get(_t); | ||||
|             lazy_table const& it = get(_intersected_obj); | ||||
|             t.set(alloc(lazy_table_filter_by_negation, t, it, m_cols1, m_cols2)); | ||||
|  | @ -246,7 +246,7 @@ namespace datalog { | |||
|             m_col(col) | ||||
|         { } | ||||
| 
 | ||||
|         virtual void operator()(table_base& _t) { | ||||
|         void operator()(table_base& _t) override { | ||||
|             lazy_table& t = get(_t); | ||||
|             t.set(alloc(lazy_table_filter_equal, m_col, m_value, t)); | ||||
|         } | ||||
|  |  | |||
|  | @ -48,37 +48,37 @@ namespace datalog { | |||
|             table_plugin(mk_name(p), p.get_manager()),  | ||||
|             m_plugin(p) {} | ||||
|          | ||||
|         virtual bool can_handle_signature(const table_signature & s) { | ||||
|         bool can_handle_signature(const table_signature & s) override { | ||||
|             return m_plugin.can_handle_signature(s); | ||||
|         }  | ||||
|          | ||||
|         virtual table_base * mk_empty(const table_signature & s); | ||||
|         table_base * mk_empty(const table_signature & s) override; | ||||
|                  | ||||
|         static table_plugin* mk_sparse(relation_manager& rm); | ||||
|          | ||||
|     protected: | ||||
|         virtual table_join_fn * mk_join_fn( | ||||
|         table_join_fn * mk_join_fn( | ||||
|             const table_base & t1, const table_base & t2, | ||||
|             unsigned col_cnt, const unsigned * cols1, const unsigned * cols2); | ||||
|         virtual table_union_fn * mk_union_fn( | ||||
|             const table_base & tgt, const table_base & src,  | ||||
|             const table_base * delta); | ||||
|         virtual table_transformer_fn * mk_project_fn( | ||||
|             const table_base & t, unsigned col_cnt,  | ||||
|             const unsigned * removed_cols); | ||||
|         virtual table_transformer_fn * mk_rename_fn( | ||||
|             unsigned col_cnt, const unsigned * cols1, const unsigned * cols2) override; | ||||
|         table_union_fn * mk_union_fn( | ||||
|             const table_base & tgt, const table_base & src, | ||||
|             const table_base * delta) override; | ||||
|         table_transformer_fn * mk_project_fn( | ||||
|             const table_base & t, unsigned col_cnt, | ||||
|             const unsigned * removed_cols) override; | ||||
|         table_transformer_fn * mk_rename_fn( | ||||
|             const table_base & t, unsigned permutation_cycle_len, | ||||
|             const unsigned * permutation_cycle); | ||||
|         virtual table_mutator_fn * mk_filter_identical_fn( | ||||
|             const table_base & t, unsigned col_cnt, const unsigned * identical_cols); | ||||
|         virtual table_mutator_fn * mk_filter_equal_fn( | ||||
|             const table_base & t, const table_element & value, unsigned col); | ||||
|         virtual table_mutator_fn * mk_filter_interpreted_fn( | ||||
|             const table_base & t, app * condition); | ||||
|         virtual table_intersection_filter_fn * mk_filter_by_negation_fn( | ||||
|             const table_base & t,  | ||||
|             const table_base & negated_obj, unsigned joined_col_cnt,  | ||||
|             const unsigned * t_cols, const unsigned * negated_cols);         | ||||
|             const unsigned * permutation_cycle) override; | ||||
|         table_mutator_fn * mk_filter_identical_fn( | ||||
|             const table_base & t, unsigned col_cnt, const unsigned * identical_cols) override; | ||||
|         table_mutator_fn * mk_filter_equal_fn( | ||||
|             const table_base & t, const table_element & value, unsigned col) override; | ||||
|         table_mutator_fn * mk_filter_interpreted_fn( | ||||
|             const table_base & t, app * condition) override; | ||||
|         table_intersection_filter_fn * mk_filter_by_negation_fn( | ||||
|             const table_base & t, | ||||
|             const table_base & negated_obj, unsigned joined_col_cnt, | ||||
|             const unsigned * t_cols, const unsigned * negated_cols) override; | ||||
| 
 | ||||
|         static lazy_table const& get(table_base const& tb); | ||||
|         static lazy_table& get(table_base& tb); | ||||
|  | @ -129,30 +129,30 @@ namespace datalog { | |||
|             m_ref(t) | ||||
|         {} | ||||
| 
 | ||||
|         virtual ~lazy_table() {} | ||||
|         ~lazy_table() override {} | ||||
| 
 | ||||
|         lazy_table_plugin& get_lplugin() const {  | ||||
|             return dynamic_cast<lazy_table_plugin&>(table_base::get_plugin());  | ||||
|         } | ||||
| 
 | ||||
|         virtual table_base * clone() const; | ||||
|         virtual table_base * complement(func_decl* p, const table_element * func_columns = 0) const; | ||||
|         virtual bool empty() const; | ||||
|         virtual bool contains_fact(const table_fact & f) const; | ||||
|         virtual void remove_fact(table_element const* fact); | ||||
|         virtual void remove_facts(unsigned fact_cnt, const table_fact * facts); | ||||
|         virtual void remove_facts(unsigned fact_cnt, const table_element * facts); | ||||
|         virtual void reset(); | ||||
|         virtual void add_fact(table_fact const& f); | ||||
|         table_base * clone() const override; | ||||
|         table_base * complement(func_decl* p, const table_element * func_columns = 0) const override; | ||||
|         bool empty() const override; | ||||
|         bool contains_fact(const table_fact & f) const override; | ||||
|         void remove_fact(table_element const* fact) override; | ||||
|         void remove_facts(unsigned fact_cnt, const table_fact * facts) override; | ||||
|         void remove_facts(unsigned fact_cnt, const table_element * facts) override; | ||||
|         void reset() override; | ||||
|         void add_fact(table_fact const& f) override; | ||||
|         | ||||
|         virtual unsigned get_size_estimate_rows() const { return 1; } | ||||
|         virtual unsigned get_size_estimate_bytes() const { return 1; } | ||||
|         virtual bool knows_exact_size() const { return false; } | ||||
|         unsigned get_size_estimate_rows() const override { return 1; } | ||||
|         unsigned get_size_estimate_bytes() const override { return 1; } | ||||
|         bool knows_exact_size() const override { return false; } | ||||
| 
 | ||||
|         table_base* eval() const; | ||||
| 
 | ||||
|         virtual table_base::iterator begin() const; | ||||
|         virtual table_base::iterator end() const; | ||||
|         table_base::iterator begin() const override; | ||||
|         table_base::iterator end() const override; | ||||
| 
 | ||||
|         lazy_table_ref* get_ref() const { return m_ref.get(); } | ||||
|         void set(lazy_table_ref* r) { m_ref = r; } | ||||
|  | @ -165,9 +165,9 @@ namespace datalog { | |||
|             m_table = table; | ||||
|             // SASSERT(&p.m_plugin == &table->get_lplugin());
 | ||||
|         } | ||||
|         virtual ~lazy_table_base() {} | ||||
|         virtual lazy_table_kind kind() const { return LAZY_TABLE_BASE; } | ||||
|         virtual table_base* force() { return m_table.get(); }        | ||||
|         ~lazy_table_base() override {} | ||||
|         lazy_table_kind kind() const override { return LAZY_TABLE_BASE; } | ||||
|         table_base* force() override { return m_table.get(); } | ||||
|     }; | ||||
| 
 | ||||
|     class lazy_table_join : public lazy_table_ref { | ||||
|  | @ -184,13 +184,13 @@ namespace datalog { | |||
|               m_cols2(col_cnt, cols2), | ||||
|               m_t1(t1.get_ref()), | ||||
|               m_t2(t2.get_ref()) { } | ||||
|         virtual ~lazy_table_join() {} | ||||
|         virtual lazy_table_kind kind() const { return LAZY_TABLE_JOIN; } | ||||
|         ~lazy_table_join() override {} | ||||
|         lazy_table_kind kind() const override { return LAZY_TABLE_JOIN; } | ||||
|         unsigned_vector const& cols1() const { return m_cols1; } | ||||
|         unsigned_vector const& cols2() const { return m_cols2; } | ||||
|         lazy_table_ref* t1() const { return m_t1.get(); } | ||||
|         lazy_table_ref* t2() const { return m_t2.get(); } | ||||
|         virtual table_base* force(); | ||||
|         table_base* force() override; | ||||
|     }; | ||||
| 
 | ||||
| 
 | ||||
|  | @ -202,12 +202,12 @@ namespace datalog { | |||
|             : lazy_table_ref(src.get_lplugin(), sig),  | ||||
|               m_cols(col_cnt, cols),  | ||||
|               m_src(src.get_ref()) {} | ||||
|         virtual ~lazy_table_project() {} | ||||
|         ~lazy_table_project() override {} | ||||
|          | ||||
|         virtual lazy_table_kind kind() const { return LAZY_TABLE_PROJECT; } | ||||
|         lazy_table_kind kind() const override { return LAZY_TABLE_PROJECT; } | ||||
|         unsigned_vector const& cols() const { return m_cols; } | ||||
|         lazy_table_ref* src() const { return m_src.get(); } | ||||
|         virtual table_base* force(); | ||||
|         table_base* force() override; | ||||
|     }; | ||||
| 
 | ||||
|     class lazy_table_rename : public lazy_table_ref { | ||||
|  | @ -218,12 +218,12 @@ namespace datalog { | |||
|             : lazy_table_ref(src.get_lplugin(), sig),  | ||||
|               m_cols(col_cnt, cols),  | ||||
|               m_src(src.get_ref()) {} | ||||
|         virtual ~lazy_table_rename() {} | ||||
|         ~lazy_table_rename() override {} | ||||
|          | ||||
|         virtual lazy_table_kind kind() const { return LAZY_TABLE_RENAME; } | ||||
|         lazy_table_kind kind() const override { return LAZY_TABLE_RENAME; } | ||||
|         unsigned_vector const& cols() const { return m_cols; } | ||||
|         lazy_table_ref* src() const { return m_src.get(); } | ||||
|         virtual table_base* force(); | ||||
|         table_base* force() override; | ||||
|     }; | ||||
| 
 | ||||
|     class lazy_table_filter_identical : public lazy_table_ref { | ||||
|  | @ -232,12 +232,12 @@ namespace datalog { | |||
|     public: | ||||
|         lazy_table_filter_identical(unsigned col_cnt, const unsigned * cols, lazy_table const& src) | ||||
|             : lazy_table_ref(src.get_lplugin(), src.get_signature()), m_cols(col_cnt, cols), m_src(src.get_ref()) {} | ||||
|         virtual ~lazy_table_filter_identical() {} | ||||
|         ~lazy_table_filter_identical() override {} | ||||
|          | ||||
|         virtual lazy_table_kind kind() const { return LAZY_TABLE_FILTER_IDENTICAL; } | ||||
|         lazy_table_kind kind() const override { return LAZY_TABLE_FILTER_IDENTICAL; } | ||||
|         unsigned_vector const& cols() const { return m_cols; } | ||||
|         lazy_table_ref* src() const { return m_src.get(); } | ||||
|         virtual table_base* force(); | ||||
|         table_base* force() override; | ||||
|     }; | ||||
| 
 | ||||
|     class lazy_table_filter_equal : public lazy_table_ref { | ||||
|  | @ -250,13 +250,13 @@ namespace datalog { | |||
|             m_col(col),  | ||||
|             m_value(value),  | ||||
|             m_src(src.get_ref()) {} | ||||
|         virtual ~lazy_table_filter_equal() {} | ||||
|         ~lazy_table_filter_equal() override {} | ||||
|          | ||||
|         virtual lazy_table_kind kind() const { return LAZY_TABLE_FILTER_EQUAL; } | ||||
|         lazy_table_kind kind() const override { return LAZY_TABLE_FILTER_EQUAL; } | ||||
|         unsigned        col() const { return m_col; } | ||||
|         table_element   value() const { return m_value; } | ||||
|         lazy_table_ref* src() const { return m_src.get(); } | ||||
|         virtual table_base* force(); | ||||
|         table_base* force() override; | ||||
|     }; | ||||
| 
 | ||||
|     class lazy_table_filter_interpreted : public lazy_table_ref { | ||||
|  | @ -266,12 +266,12 @@ namespace datalog { | |||
|         lazy_table_filter_interpreted(lazy_table const& src, app* condition) | ||||
|             : lazy_table_ref(src.get_lplugin(), src.get_signature()),  | ||||
|               m_condition(condition, src.get_lplugin().get_ast_manager()), m_src(src.get_ref()) {} | ||||
|         virtual ~lazy_table_filter_interpreted() {} | ||||
|         ~lazy_table_filter_interpreted() override {} | ||||
|          | ||||
|         virtual lazy_table_kind kind() const { return LAZY_TABLE_FILTER_INTERPRETED; } | ||||
|         lazy_table_kind kind() const override { return LAZY_TABLE_FILTER_INTERPRETED; } | ||||
|         app* condition() const { return m_condition; }         | ||||
|         lazy_table_ref* src() const { return m_src.get(); } | ||||
|         virtual table_base* force(); | ||||
|         table_base* force() override; | ||||
|     }; | ||||
| 
 | ||||
| 
 | ||||
|  | @ -288,13 +288,13 @@ namespace datalog { | |||
|             m_src(src.get_ref()),  | ||||
|             m_cols1(c1), | ||||
|             m_cols2(c2) {} | ||||
|         virtual ~lazy_table_filter_by_negation() {} | ||||
|         virtual lazy_table_kind kind() const { return LAZY_TABLE_FILTER_BY_NEGATION; } | ||||
|         ~lazy_table_filter_by_negation() override {} | ||||
|         lazy_table_kind kind() const override { return LAZY_TABLE_FILTER_BY_NEGATION; } | ||||
|         lazy_table_ref* tgt() const { return m_tgt.get(); } | ||||
|         lazy_table_ref* src() const { return m_src.get(); } | ||||
|         unsigned_vector const& cols1() const { return m_cols1; } | ||||
|         unsigned_vector const& cols2() const { return m_cols2; } | ||||
|         virtual table_base* force(); | ||||
|         table_base* force() override; | ||||
|     }; | ||||
| 
 | ||||
| 
 | ||||
|  |  | |||
|  | @ -69,7 +69,7 @@ namespace datalog { | |||
|             m_relation_level_explanations(relation_level), | ||||
|             m_union_decl(mk_explanations::get_union_decl(get_context()), get_ast_manager()) {} | ||||
| 
 | ||||
|         ~explanation_relation_plugin() { | ||||
|         ~explanation_relation_plugin() override { | ||||
|             for (unsigned i = 0; i < m_pool.size(); ++i) { | ||||
|                 for (unsigned j = 0; j < m_pool[i].size(); ++j) { | ||||
|                     dealloc(m_pool[i][j]); | ||||
|  | @ -77,7 +77,7 @@ namespace datalog { | |||
|             } | ||||
|         } | ||||
| 
 | ||||
|         virtual bool can_handle_signature(const relation_signature & s) { | ||||
|         bool can_handle_signature(const relation_signature & s) override { | ||||
|             unsigned n=s.size(); | ||||
|             for (unsigned i=0; i<n; i++) { | ||||
|                 if (!get_context().get_decl_util().is_rule_sort(s[i])) { | ||||
|  | @ -87,27 +87,27 @@ namespace datalog { | |||
|             return true; | ||||
|         } | ||||
|          | ||||
|         virtual relation_base * mk_empty(const relation_signature & s); | ||||
|         relation_base * mk_empty(const relation_signature & s) override; | ||||
| 
 | ||||
|         void recycle(explanation_relation* r); | ||||
| 
 | ||||
|     protected: | ||||
| 
 | ||||
|         virtual relation_join_fn * mk_join_fn(const relation_base & t1, const relation_base & t2, | ||||
|             unsigned col_cnt, const unsigned * cols1, const unsigned * cols2); | ||||
|         virtual relation_transformer_fn * mk_project_fn(const relation_base & t, unsigned col_cnt,  | ||||
|             const unsigned * removed_cols); | ||||
|         virtual relation_transformer_fn * mk_rename_fn(const relation_base & t, unsigned permutation_cycle_len,  | ||||
|             const unsigned * permutation_cycle); | ||||
|         virtual relation_union_fn * mk_union_fn(const relation_base & tgt, const relation_base & src,  | ||||
|             const relation_base * delta); | ||||
|         virtual relation_mutator_fn * mk_filter_interpreted_fn(const relation_base & t, app * condition); | ||||
|         virtual relation_intersection_filter_fn * mk_filter_by_negation_fn(const relation_base & t,  | ||||
|             const relation_base & negated_obj, unsigned joined_col_cnt,  | ||||
|             const unsigned * t_cols, const unsigned * negated_cols); | ||||
|         virtual relation_intersection_filter_fn * mk_filter_by_intersection_fn(const relation_base & t,  | ||||
|                 const relation_base & src, unsigned joined_col_cnt,  | ||||
|                 const unsigned * t_cols, const unsigned * src_cols); | ||||
|         relation_join_fn * mk_join_fn(const relation_base & t1, const relation_base & t2, | ||||
|             unsigned col_cnt, const unsigned * cols1, const unsigned * cols2) override; | ||||
|         relation_transformer_fn * mk_project_fn(const relation_base & t, unsigned col_cnt, | ||||
|             const unsigned * removed_cols) override; | ||||
|         relation_transformer_fn * mk_rename_fn(const relation_base & t, unsigned permutation_cycle_len, | ||||
|             const unsigned * permutation_cycle) override; | ||||
|         relation_union_fn * mk_union_fn(const relation_base & tgt, const relation_base & src, | ||||
|             const relation_base * delta) override; | ||||
|         relation_mutator_fn * mk_filter_interpreted_fn(const relation_base & t, app * condition) override; | ||||
|         relation_intersection_filter_fn * mk_filter_by_negation_fn(const relation_base & t, | ||||
|             const relation_base & negated_obj, unsigned joined_col_cnt, | ||||
|             const unsigned * t_cols, const unsigned * negated_cols) override; | ||||
|         relation_intersection_filter_fn * mk_filter_by_intersection_fn(const relation_base & t, | ||||
|                 const relation_base & src, unsigned joined_col_cnt, | ||||
|                 const unsigned * t_cols, const unsigned * src_cols) override; | ||||
| 
 | ||||
|     }; | ||||
| 
 | ||||
|  | @ -173,7 +173,7 @@ namespace datalog { | |||
|             } | ||||
|         } | ||||
| 
 | ||||
|         virtual void deallocate() { | ||||
|         void deallocate() override { | ||||
|             get_plugin().recycle(this); | ||||
|         } | ||||
| 
 | ||||
|  | @ -183,7 +183,7 @@ namespace datalog { | |||
|             return static_cast<explanation_relation_plugin &>(relation_base::get_plugin()); | ||||
|         } | ||||
| 
 | ||||
|         virtual void to_formula(expr_ref& fml) const {     | ||||
|         void to_formula(expr_ref& fml) const override { | ||||
|             ast_manager& m = fml.get_manager(); | ||||
|             fml = m.mk_eq(m.mk_var(0, m.get_sort(m_data[0])), m_data[0]); | ||||
|         } | ||||
|  | @ -204,23 +204,23 @@ namespace datalog { | |||
|             return true; | ||||
|         } | ||||
| 
 | ||||
|         virtual bool empty() const { return m_empty; } | ||||
|         bool empty() const override { return m_empty; } | ||||
| 
 | ||||
|         virtual void reset() { | ||||
|         void reset() override { | ||||
|             m_empty = true; | ||||
|         } | ||||
| 
 | ||||
|         virtual void add_fact(const relation_fact & f) { | ||||
|         void add_fact(const relation_fact & f) override { | ||||
|             SASSERT(empty()); | ||||
|             assign_data(f); | ||||
|         } | ||||
| 
 | ||||
|         virtual bool contains_fact(const relation_fact & f) const { | ||||
|         bool contains_fact(const relation_fact & f) const override { | ||||
|             UNREACHABLE(); | ||||
|             throw 0; | ||||
|         } | ||||
| 
 | ||||
|         virtual explanation_relation * clone() const { | ||||
|         explanation_relation * clone() const override { | ||||
|             explanation_relation * res = static_cast<explanation_relation *>(get_plugin().mk_empty(get_signature())); | ||||
|             res->m_empty = m_empty; | ||||
|             SASSERT(res->m_data.empty()); | ||||
|  | @ -228,7 +228,7 @@ namespace datalog { | |||
|             return res; | ||||
|         } | ||||
| 
 | ||||
|         virtual relation_base * complement(func_decl* pred) const { | ||||
|         relation_base * complement(func_decl* pred) const override { | ||||
|             explanation_relation * res = static_cast<explanation_relation *>(get_plugin().mk_empty(get_signature())); | ||||
|             if (empty()) { | ||||
|                 res->set_undefined(); | ||||
|  | @ -247,7 +247,7 @@ namespace datalog { | |||
|             } | ||||
|         } | ||||
| 
 | ||||
|         virtual void display(std::ostream & out) const { | ||||
|         void display(std::ostream & out) const override { | ||||
|             if (empty()) { | ||||
|                 out << "<empty explanation relation>\n"; | ||||
|                 return; | ||||
|  | @ -298,7 +298,7 @@ namespace datalog { | |||
|         join_fn(const relation_signature & sig1, const relation_signature & sig2) | ||||
|             : convenient_relation_join_fn(sig1, sig2, 0, 0, 0) {} | ||||
| 
 | ||||
|         virtual relation_base * operator()(const relation_base & r1_0, const relation_base & r2_0) { | ||||
|         relation_base * operator()(const relation_base & r1_0, const relation_base & r2_0) override { | ||||
|             const explanation_relation & r1 = static_cast<const explanation_relation &>(r1_0); | ||||
|             const explanation_relation & r2 = static_cast<const explanation_relation &>(r2_0); | ||||
|             explanation_relation_plugin & plugin = r1.get_plugin(); | ||||
|  | @ -331,7 +331,7 @@ namespace datalog { | |||
|         project_fn(const relation_signature & sig, unsigned col_cnt, const unsigned * removed_cols) | ||||
|             : convenient_relation_project_fn(sig, col_cnt, removed_cols) {} | ||||
| 
 | ||||
|         virtual relation_base * operator()(const relation_base & r0) { | ||||
|         relation_base * operator()(const relation_base & r0) override { | ||||
|             const explanation_relation & r = static_cast<const explanation_relation &>(r0); | ||||
|             explanation_relation_plugin & plugin = r.get_plugin(); | ||||
| 
 | ||||
|  | @ -359,7 +359,7 @@ namespace datalog { | |||
|         rename_fn(const relation_signature & sig, unsigned permutation_cycle_len, const unsigned * permutation_cycle) | ||||
|             : convenient_relation_rename_fn(sig, permutation_cycle_len, permutation_cycle) {} | ||||
| 
 | ||||
|         virtual relation_base * operator()(const relation_base & r0) { | ||||
|         relation_base * operator()(const relation_base & r0) override { | ||||
|             const explanation_relation & r = static_cast<const explanation_relation &>(r0); | ||||
|             explanation_relation_plugin & plugin = r.get_plugin(); | ||||
| 
 | ||||
|  | @ -382,7 +382,7 @@ namespace datalog { | |||
|     class explanation_relation_plugin::union_fn : public relation_union_fn { | ||||
|         scoped_ptr<relation_union_fn> m_delta_union_fun; | ||||
|     public: | ||||
|         virtual void operator()(relation_base & tgt0, const relation_base & src0, relation_base * delta0) { | ||||
|         void operator()(relation_base & tgt0, const relation_base & src0, relation_base * delta0) override { | ||||
|             explanation_relation & tgt = static_cast<explanation_relation &>(tgt0); | ||||
|             const explanation_relation & src = static_cast<const explanation_relation &>(src0); | ||||
|             explanation_relation * delta = delta0 ? static_cast<explanation_relation *>(delta0) : 0; | ||||
|  | @ -418,7 +418,7 @@ namespace datalog { | |||
|     class explanation_relation_plugin::foreign_union_fn : public relation_union_fn { | ||||
|         scoped_ptr<relation_union_fn> m_delta_union_fun; | ||||
|     public: | ||||
|         virtual void operator()(relation_base & tgt0, const relation_base & src, relation_base * delta0) { | ||||
|         void operator()(relation_base & tgt0, const relation_base & src, relation_base * delta0) override { | ||||
|             explanation_relation & tgt = static_cast<explanation_relation &>(tgt0); | ||||
|             explanation_relation * delta = delta0 ? static_cast<explanation_relation *>(delta0) : 0; | ||||
| 
 | ||||
|  | @ -456,7 +456,7 @@ namespace datalog { | |||
|               m_col_idx(col_idx),  | ||||
|               m_new_rule(std::move(new_rule)) {} | ||||
| 
 | ||||
|         virtual void operator()(relation_base & r0) { | ||||
|         void operator()(relation_base & r0) override { | ||||
|             explanation_relation & r = static_cast<explanation_relation &>(r0); | ||||
| 
 | ||||
|             if (!r.is_undefined(m_col_idx)) { | ||||
|  | @ -509,7 +509,7 @@ namespace datalog { | |||
| 
 | ||||
|     class explanation_relation_plugin::negation_filter_fn : public relation_intersection_filter_fn { | ||||
|     public: | ||||
|         virtual void operator()(relation_base & r, const relation_base & neg) { | ||||
|         void operator()(relation_base & r, const relation_base & neg) override { | ||||
|             if (!neg.empty()) { | ||||
|                 r.reset(); | ||||
|             } | ||||
|  | @ -531,7 +531,7 @@ namespace datalog { | |||
|         intersection_filter_fn(explanation_relation_plugin & plugin) | ||||
|             : m_union_decl(plugin.m_union_decl) {} | ||||
| 
 | ||||
|         virtual void operator()(relation_base & tgt0, const relation_base & src0) { | ||||
|         void operator()(relation_base & tgt0, const relation_base & src0) override { | ||||
|             explanation_relation & tgt = static_cast<explanation_relation &>(tgt0); | ||||
|             const explanation_relation & src = static_cast<const explanation_relation &>(src0); | ||||
| 
 | ||||
|  |  | |||
|  | @ -76,7 +76,7 @@ namespace datalog { | |||
|             return get_union_decl(m_context); | ||||
|         } | ||||
| 
 | ||||
|         rule_set * operator()(rule_set const & source); | ||||
|         rule_set * operator()(rule_set const & source) override; | ||||
| 
 | ||||
|         static expr* get_explanation(relation_base const& r); | ||||
|     }; | ||||
|  |  | |||
|  | @ -69,7 +69,7 @@ namespace datalog { | |||
|     public: | ||||
|         mk_similarity_compressor(context & ctx); | ||||
|          | ||||
|         rule_set * operator()(rule_set const & source); | ||||
|         rule_set * operator()(rule_set const & source) override; | ||||
|     }; | ||||
| 
 | ||||
| }; | ||||
|  |  | |||
|  | @ -54,7 +54,7 @@ namespace datalog { | |||
|     public: | ||||
|         mk_simple_joins(context & ctx); | ||||
|          | ||||
|         rule_set * operator()(rule_set const & source); | ||||
|         rule_set * operator()(rule_set const & source) override; | ||||
|     }; | ||||
| 
 | ||||
| }; | ||||
|  |  | |||
|  | @ -444,12 +444,12 @@ namespace datalog { | |||
|             init(r1.get_signature(), 1, rels1, r2.get_signature(), 1, rels2, col_cnt, cols1, cols2); | ||||
|         } | ||||
| 
 | ||||
|         ~join_fn() {  | ||||
|         ~join_fn() override { | ||||
|             dealloc_ptr_vector_content(m_joins); | ||||
|             dealloc_ptr_vector_content(m_full); | ||||
|         } | ||||
| 
 | ||||
|         virtual relation_base * operator()(const relation_base & _r1, const relation_base & _r2) { | ||||
|         relation_base * operator()(const relation_base & _r1, const relation_base & _r2) override { | ||||
|             TRACE("dl", _r1.display(tout); _r2.display(tout);); | ||||
|             ptr_vector<relation_base> relations; | ||||
|             unsigned sz = m_joins.size(); | ||||
|  | @ -491,9 +491,9 @@ namespace datalog { | |||
|           m_sig(std::move(s)), | ||||
|           m_transforms(num_trans, trans) {} | ||||
| 
 | ||||
|           ~transform_fn() { dealloc_ptr_vector_content(m_transforms); } | ||||
|           ~transform_fn() override { dealloc_ptr_vector_content(m_transforms); } | ||||
| 
 | ||||
|         virtual relation_base * operator()(const relation_base & _r) { | ||||
|         relation_base * operator()(const relation_base & _r) override { | ||||
|             product_relation const& r = get(_r); | ||||
|             product_relation_plugin& p = r.get_plugin(); | ||||
|             SASSERT(m_transforms.size() == r.size()); | ||||
|  | @ -628,14 +628,14 @@ namespace datalog { | |||
|             init(tgt.m_relations, src.m_relations, delta ? &delta->m_relations : 0); | ||||
|         } | ||||
| 
 | ||||
|         ~aligned_union_fn() { | ||||
|         ~aligned_union_fn() override { | ||||
|             unsigned sz = m_unions.size(); | ||||
|             for(unsigned i=0; i<sz; i++) { | ||||
|                 dealloc_ptr_vector_content(m_unions[i]); | ||||
|             } | ||||
|         } | ||||
| 
 | ||||
|         virtual void operator()(relation_base& _tgt, const relation_base& _src, relation_base* _delta) { | ||||
|         void operator()(relation_base& _tgt, const relation_base& _src, relation_base* _delta) override { | ||||
|             TRACE("dl", _tgt.display(tout << "dst:\n"); _src.display(tout  << "src:\n");); | ||||
|             SASSERT(m_plugin.check_kind(_tgt)); | ||||
|             SASSERT(m_plugin.check_kind(_src)); | ||||
|  | @ -748,7 +748,7 @@ namespace datalog { | |||
|         } | ||||
| 
 | ||||
| 
 | ||||
|         virtual void operator()(relation_base& _tgt, const relation_base& _src, relation_base* _delta) { | ||||
|         void operator()(relation_base& _tgt, const relation_base& _src, relation_base* _delta) override { | ||||
|             TRACE("dl_verbose", _tgt.display(tout << "dst:\n"); _src.display(tout  << "src:\n");); | ||||
|             product_relation& tgt = get(_tgt); | ||||
|             product_relation const& src0 = get(_src); | ||||
|  | @ -783,7 +783,7 @@ namespace datalog { | |||
|                 : m_single_rel_idx(single_rel_idx), | ||||
|                 m_inner_union_fun(inner_union_fun) {} | ||||
| 
 | ||||
|         virtual void operator()(relation_base& tgt, const relation_base& _src, relation_base* delta) { | ||||
|         void operator()(relation_base& tgt, const relation_base& _src, relation_base* delta) override { | ||||
|             TRACE("dl", tgt.display(tout); _src.display(tout); ); | ||||
|             product_relation const& src = get(_src); | ||||
|             (*m_inner_union_fun)(tgt, src[m_single_rel_idx], delta); | ||||
|  | @ -834,9 +834,9 @@ namespace datalog { | |||
|         mutator_fn(unsigned sz, relation_mutator_fn** muts): | ||||
|           m_mutators(sz, muts) {} | ||||
| 
 | ||||
|        ~mutator_fn() { dealloc_ptr_vector_content(m_mutators); } | ||||
|        ~mutator_fn() override { dealloc_ptr_vector_content(m_mutators); } | ||||
| 
 | ||||
|         virtual void operator()(relation_base & _r) { | ||||
|         void operator()(relation_base & _r) override { | ||||
|             TRACE("dl", _r.display(tout);); | ||||
|             product_relation& r = get(_r); | ||||
|             SASSERT(m_mutators.size() == r.size()); | ||||
|  | @ -911,9 +911,9 @@ namespace datalog { | |||
|             } | ||||
|         } | ||||
| 
 | ||||
|         ~filter_interpreted_fn() { dealloc_ptr_vector_content(m_mutators); } | ||||
|         ~filter_interpreted_fn() override { dealloc_ptr_vector_content(m_mutators); } | ||||
| 
 | ||||
|         void operator()(relation_base& _r) { | ||||
|         void operator()(relation_base& _r) override { | ||||
|             TRACE("dl", _r.display(tout);); | ||||
|             product_relation const& r = get(_r); | ||||
|             for (unsigned i = 0; i < m_attach.size(); ++i) { | ||||
|  |  | |||
|  | @ -59,37 +59,37 @@ namespace datalog { | |||
| 
 | ||||
|         product_relation_plugin(relation_manager& m); | ||||
| 
 | ||||
|         virtual void initialize(family_id fid); | ||||
|         void initialize(family_id fid) override; | ||||
| 
 | ||||
|         virtual bool can_handle_signature(const relation_signature & s); | ||||
|         virtual bool can_handle_signature(const relation_signature & s, family_id kind); | ||||
|         bool can_handle_signature(const relation_signature & s) override; | ||||
|         bool can_handle_signature(const relation_signature & s, family_id kind) override; | ||||
| 
 | ||||
|         static symbol get_name() { return symbol("product_relation"); } | ||||
| 
 | ||||
|         family_id get_relation_kind(const relation_signature & sig, const rel_spec & spec); | ||||
| 
 | ||||
|         virtual relation_base * mk_empty(const relation_signature & s); | ||||
|         virtual relation_base * mk_empty(const relation_signature & s, family_id kind); | ||||
|         relation_base * mk_empty(const relation_signature & s) override; | ||||
|         relation_base * mk_empty(const relation_signature & s, family_id kind) override; | ||||
| 
 | ||||
|         virtual relation_base * mk_full(func_decl* p, const relation_signature & s); | ||||
|         virtual relation_base * mk_full(func_decl* p, const relation_signature & s, family_id kind); | ||||
|         relation_base * mk_full(func_decl* p, const relation_signature & s) override; | ||||
|         relation_base * mk_full(func_decl* p, const relation_signature & s, family_id kind) override; | ||||
| 
 | ||||
|     protected: | ||||
|         virtual relation_join_fn * mk_join_fn(const relation_base & t1, const relation_base & t2, | ||||
|             unsigned col_cnt, const unsigned * cols1, const unsigned * cols2); | ||||
|         virtual relation_transformer_fn * mk_project_fn(const relation_base & t, unsigned col_cnt,  | ||||
|             const unsigned * removed_cols); | ||||
|         virtual relation_transformer_fn * mk_rename_fn(const relation_base & t, unsigned permutation_cycle_len,  | ||||
|             const unsigned * permutation_cycle); | ||||
|         virtual relation_union_fn * mk_union_fn(const relation_base & tgt, const relation_base & src,  | ||||
|             const relation_base * delta); | ||||
|         virtual relation_union_fn * mk_widen_fn(const relation_base & tgt, const relation_base & src,  | ||||
|             const relation_base * delta); | ||||
|         virtual relation_mutator_fn * mk_filter_identical_fn(const relation_base & t, unsigned col_cnt,  | ||||
|             const unsigned * identical_cols); | ||||
|         virtual relation_mutator_fn * mk_filter_equal_fn(const relation_base & t, const relation_element & value,  | ||||
|             unsigned col); | ||||
|         virtual relation_mutator_fn * mk_filter_interpreted_fn(const relation_base & t, app * condition); | ||||
|         relation_join_fn * mk_join_fn(const relation_base & t1, const relation_base & t2, | ||||
|             unsigned col_cnt, const unsigned * cols1, const unsigned * cols2) override; | ||||
|         relation_transformer_fn * mk_project_fn(const relation_base & t, unsigned col_cnt, | ||||
|             const unsigned * removed_cols) override; | ||||
|         relation_transformer_fn * mk_rename_fn(const relation_base & t, unsigned permutation_cycle_len, | ||||
|             const unsigned * permutation_cycle) override; | ||||
|         relation_union_fn * mk_union_fn(const relation_base & tgt, const relation_base & src, | ||||
|             const relation_base * delta) override; | ||||
|         relation_union_fn * mk_widen_fn(const relation_base & tgt, const relation_base & src, | ||||
|             const relation_base * delta) override; | ||||
|         relation_mutator_fn * mk_filter_identical_fn(const relation_base & t, unsigned col_cnt, | ||||
|             const unsigned * identical_cols) override; | ||||
|         relation_mutator_fn * mk_filter_equal_fn(const relation_base & t, const relation_element & value, | ||||
|             unsigned col) override; | ||||
|         relation_mutator_fn * mk_filter_interpreted_fn(const relation_base & t, app * condition) override; | ||||
| 
 | ||||
|         static bool is_product_relation(relation_base const& r); | ||||
| 
 | ||||
|  | @ -154,15 +154,15 @@ namespace datalog { | |||
|         product_relation(product_relation_plugin& p, relation_signature const& s); | ||||
|         product_relation(product_relation_plugin& p, relation_signature const& s, unsigned num_relations, relation_base** relations); | ||||
| 
 | ||||
|         ~product_relation(); | ||||
|         ~product_relation() override; | ||||
| 
 | ||||
|         virtual bool empty() const; | ||||
|         virtual void add_fact(const relation_fact & f); | ||||
|         virtual bool contains_fact(const relation_fact & f) const; | ||||
|         virtual product_relation * clone() const; | ||||
|         virtual product_relation * complement(func_decl* p) const; | ||||
|         virtual void display(std::ostream & out) const; | ||||
|         virtual void to_formula(expr_ref& fml) const; | ||||
|         bool empty() const override; | ||||
|         void add_fact(const relation_fact & f) override; | ||||
|         bool contains_fact(const relation_fact & f) const override; | ||||
|         product_relation * clone() const override; | ||||
|         product_relation * complement(func_decl* p) const override; | ||||
|         void display(std::ostream & out) const override; | ||||
|         void to_formula(expr_ref& fml) const override; | ||||
|         product_relation_plugin& get_plugin() const;  | ||||
| 
 | ||||
|         unsigned size() const { return m_relations.size(); } | ||||
|  | @ -175,7 +175,7 @@ namespace datalog { | |||
|         */ | ||||
|         bool try_get_single_non_transparent(unsigned & idx) const; | ||||
| 
 | ||||
|         virtual bool is_precise() const {  | ||||
|         bool is_precise() const override { | ||||
|             for (unsigned i = 0; i < m_relations.size(); ++i) { | ||||
|                 if (!m_relations[i]->is_precise()) { | ||||
|                     return false; | ||||
|  |  | |||
|  | @ -538,7 +538,7 @@ namespace datalog { | |||
| 
 | ||||
|     class relation_manager::empty_signature_relation_join_fn : public relation_join_fn { | ||||
|     public: | ||||
|         virtual relation_base * operator()(const relation_base & r1, const relation_base & r2) { | ||||
|         relation_base * operator()(const relation_base & r1, const relation_base & r2) override { | ||||
|             TRACE("dl", tout << r1.get_plugin().get_name() << " " << r2.get_plugin().get_name() << "\n";); | ||||
|             if(r1.get_signature().empty()) { | ||||
|                 if(r1.empty()) { | ||||
|  | @ -615,7 +615,7 @@ namespace datalog { | |||
|               m_project(0),  | ||||
|               m_removed_cols(removed_col_cnt, removed_cols) {} | ||||
| 
 | ||||
|         virtual relation_base * operator()(const relation_base & t) { | ||||
|         relation_base * operator()(const relation_base & t) override { | ||||
|             scoped_rel<relation_base> t1 = t.clone(); | ||||
|             (*m_filter)(*t1); | ||||
|             if( !m_project) { | ||||
|  | @ -658,11 +658,11 @@ namespace datalog { | |||
|         default_relation_apply_sequential_fn(unsigned n, relation_mutator_fn ** mutators): | ||||
|             m_mutators(n, mutators) {             | ||||
|         } | ||||
|         virtual ~default_relation_apply_sequential_fn() { | ||||
|         ~default_relation_apply_sequential_fn() override { | ||||
|             std::for_each(m_mutators.begin(), m_mutators.end(), delete_proc<relation_mutator_fn>()); | ||||
|         } | ||||
|          | ||||
|         virtual void operator()(relation_base& t) { | ||||
|         void operator()(relation_base& t) override { | ||||
|             for (unsigned i = 0; i < m_mutators.size(); ++i) { | ||||
|                 if (t.empty()) return; | ||||
|                 (*(m_mutators[i]))(t); | ||||
|  | @ -688,7 +688,7 @@ namespace datalog { | |||
|             const unsigned * removed_cols) | ||||
|             : m_join(join), m_project(0), m_removed_cols(removed_col_cnt, removed_cols) {} | ||||
| 
 | ||||
|         virtual relation_base * operator()(const relation_base & t1, const relation_base & t2) { | ||||
|         relation_base * operator()(const relation_base & t1, const relation_base & t2) override { | ||||
|             scoped_rel<relation_base> aux = (*m_join)(t1, t2); | ||||
|             if(!m_project) { | ||||
|                 relation_manager & rmgr = aux->get_plugin().get_manager(); | ||||
|  | @ -787,7 +787,7 @@ namespace datalog { | |||
|         default_relation_select_equal_and_project_fn(relation_mutator_fn * filter, relation_transformer_fn * project) | ||||
|             : m_filter(filter), m_project(project) {} | ||||
| 
 | ||||
|         virtual relation_base * operator()(const relation_base & t1) { | ||||
|         relation_base * operator()(const relation_base & t1) override { | ||||
|             TRACE("dl", tout << t1.get_plugin().get_name() << "\n";); | ||||
|             scoped_rel<relation_base> aux = t1.clone(); | ||||
|             (*m_filter)(*aux); | ||||
|  | @ -823,7 +823,7 @@ namespace datalog { | |||
|         default_relation_intersection_filter_fn(relation_join_fn * join_fun, relation_union_fn * union_fun)  | ||||
|             : m_join_fun(join_fun), m_union_fun(union_fun) {} | ||||
| 
 | ||||
|         virtual void operator()(relation_base & tgt, const relation_base & intersected_obj) { | ||||
|         void operator()(relation_base & tgt, const relation_base & intersected_obj) override { | ||||
|             scoped_rel<relation_base> filtered_rel = (*m_join_fun)(tgt, intersected_obj); | ||||
|             TRACE("dl",  | ||||
|                   tgt.display(tout << "tgt:\n");  | ||||
|  | @ -926,7 +926,7 @@ namespace datalog { | |||
|             const unsigned * cols1, const unsigned * cols2)  | ||||
|             : convenient_table_join_fn(t1_sig, t2_sig, col_cnt, cols1, cols2), m_col_cnt(col_cnt) {} | ||||
| 
 | ||||
|         virtual table_base * operator()(const table_base & t1, const table_base & t2) { | ||||
|         table_base * operator()(const table_base & t1, const table_base & t2) override { | ||||
|             table_plugin * plugin = &t1.get_plugin(); | ||||
| 
 | ||||
|             const table_signature & res_sign = get_result_signature(); | ||||
|  | @ -1037,15 +1037,15 @@ namespace datalog { | |||
|                 SASSERT(removed_col_cnt>0); | ||||
|         } | ||||
| 
 | ||||
|         virtual const table_signature & get_result_signature() const { | ||||
|         const table_signature & get_result_signature() const override { | ||||
|             return convenient_table_project_fn::get_result_signature(); | ||||
|         } | ||||
| 
 | ||||
|         virtual void modify_fact(table_fact & f) const { | ||||
|         void modify_fact(table_fact & f) const override { | ||||
|             project_out_vector_columns(f, m_removed_cols); | ||||
|         } | ||||
| 
 | ||||
|         virtual table_base * operator()(const table_base & t) { | ||||
|         table_base * operator()(const table_base & t) override { | ||||
|             return auxiliary_table_transformer_fn::operator()(t); | ||||
|         } | ||||
|     }; | ||||
|  | @ -1054,7 +1054,7 @@ namespace datalog { | |||
|         const table_signature m_empty_sig; | ||||
|     public: | ||||
|         null_signature_table_project_fn() : m_empty_sig() {} | ||||
|         virtual table_base * operator()(const table_base & t) { | ||||
|         table_base * operator()(const table_base & t) override { | ||||
|             relation_manager & m = t.get_plugin().get_manager(); | ||||
|             table_base * res = m.mk_empty_table(m_empty_sig); | ||||
|             if(!t.empty()) { | ||||
|  | @ -1096,14 +1096,14 @@ namespace datalog { | |||
|             m_removed_cols(removed_col_cnt, removed_cols) {} | ||||
| 
 | ||||
|         class unreachable_reducer : public table_row_pair_reduce_fn { | ||||
|             virtual void operator()(table_element * func_columns, const table_element * merged_func_columns) { | ||||
|             void operator()(table_element * func_columns, const table_element * merged_func_columns) override { | ||||
|                 //we do project_with_reduce only if we are sure there will be no reductions
 | ||||
|                 //(see code of the table_signature::from_join_project function)
 | ||||
|                 UNREACHABLE(); | ||||
|             } | ||||
|         }; | ||||
| 
 | ||||
|         virtual table_base * operator()(const table_base & t1, const table_base & t2) { | ||||
|         table_base * operator()(const table_base & t1, const table_base & t2) override { | ||||
|             table_base * aux = (*m_join)(t1, t2); | ||||
|             if(m_project==0) { | ||||
|                 relation_manager & rmgr = aux->get_plugin().get_manager(); | ||||
|  | @ -1154,15 +1154,15 @@ namespace datalog { | |||
|             SASSERT(permutation_cycle_len>=2); | ||||
|         } | ||||
| 
 | ||||
|         virtual const table_signature & get_result_signature() const { | ||||
|         const table_signature & get_result_signature() const override { | ||||
|             return convenient_table_rename_fn::get_result_signature(); | ||||
|         } | ||||
| 
 | ||||
|         virtual void modify_fact(table_fact & f) const { | ||||
|         void modify_fact(table_fact & f) const override { | ||||
|             permutate_by_cycle(f, m_cycle); | ||||
|         } | ||||
| 
 | ||||
|         virtual table_base * operator()(const table_base & t) { | ||||
|         table_base * operator()(const table_base & t) override { | ||||
|             return auxiliary_table_transformer_fn::operator()(t); | ||||
|         } | ||||
| 
 | ||||
|  | @ -1190,7 +1190,7 @@ namespace datalog { | |||
|     class relation_manager::default_table_union_fn : public table_union_fn { | ||||
|         table_fact m_row; | ||||
|     public: | ||||
|         virtual void operator()(table_base & tgt, const table_base & src, table_base * delta) { | ||||
|         void operator()(table_base & tgt, const table_base & src, table_base * delta) override { | ||||
|             table_base::iterator it = src.begin(); | ||||
|             table_base::iterator iend = src.end(); | ||||
| 
 | ||||
|  | @ -1283,7 +1283,7 @@ namespace datalog { | |||
|             SASSERT(col_cnt>=2); | ||||
|         } | ||||
| 
 | ||||
|         virtual bool should_remove(const table_fact & f) const { | ||||
|         bool should_remove(const table_fact & f) const override { | ||||
|             table_element val=f[m_identical_cols[0]]; | ||||
|             for(unsigned i=1; i<m_col_cnt; i++) { | ||||
|                 if(f[m_identical_cols[i]]!=val) { | ||||
|  | @ -1293,7 +1293,7 @@ namespace datalog { | |||
|             return false; | ||||
|         } | ||||
| 
 | ||||
|         virtual void operator()(table_base & t) { | ||||
|         void operator()(table_base & t) override { | ||||
|             auxiliary_table_filter_fn::operator()(t); | ||||
|         } | ||||
| 
 | ||||
|  | @ -1318,11 +1318,11 @@ namespace datalog { | |||
|                 : m_value(value), | ||||
|                 m_col(col) {} | ||||
| 
 | ||||
|         virtual bool should_remove(const table_fact & f) const { | ||||
|         bool should_remove(const table_fact & f) const override { | ||||
|             return f[m_col]!=m_value; | ||||
|         } | ||||
| 
 | ||||
|         virtual void operator()(table_base & t) { | ||||
|         void operator()(table_base & t) override { | ||||
|             auxiliary_table_filter_fn::operator()(t); | ||||
|         } | ||||
|     }; | ||||
|  | @ -1346,11 +1346,11 @@ namespace datalog { | |||
|               m_value(value) { | ||||
|         } | ||||
| 
 | ||||
|         virtual bool should_remove(const table_fact & f) const { | ||||
|         bool should_remove(const table_fact & f) const override { | ||||
|             return f[m_column] == m_value; | ||||
|         } | ||||
| 
 | ||||
|         virtual void operator()(table_base & t) { | ||||
|         void operator()(table_base & t) override { | ||||
|             auxiliary_table_filter_fn::operator()(t); | ||||
|         } | ||||
| 
 | ||||
|  | @ -1402,7 +1402,7 @@ namespace datalog { | |||
|             m_free_vars(m_condition); | ||||
|         } | ||||
| 
 | ||||
|         virtual bool should_remove(const table_fact & f) const { | ||||
|         bool should_remove(const table_fact & f) const override { | ||||
|             expr_ref_vector& args = const_cast<expr_ref_vector&>(m_args); | ||||
| 
 | ||||
|             args.reset(); | ||||
|  | @ -1425,7 +1425,7 @@ namespace datalog { | |||
|             return m_ast_manager.is_false(ground); | ||||
|         } | ||||
| 
 | ||||
|         virtual void operator()(table_base & t) { | ||||
|         void operator()(table_base & t) override { | ||||
|             auxiliary_table_filter_fn::operator()(t); | ||||
|         } | ||||
|     }; | ||||
|  | @ -1455,7 +1455,7 @@ namespace datalog { | |||
|                 : m_filter(filter), m_condition(condition, ctx.get_manager()), | ||||
|                 m_removed_cols(removed_col_cnt, removed_cols) {} | ||||
| 
 | ||||
|         virtual table_base* operator()(const table_base & tb) { | ||||
|         table_base* operator()(const table_base & tb) override { | ||||
|             table_base *t2 = tb.clone(); | ||||
|             (*m_filter)(*t2); | ||||
|             if (!m_project) { | ||||
|  | @ -1506,7 +1506,7 @@ namespace datalog { | |||
|             m_aux_fact.resize(neg_t.get_signature().size()); | ||||
|         } | ||||
| 
 | ||||
|         virtual bool should_remove(const table_fact & f) const { | ||||
|         bool should_remove(const table_fact & f) const override { | ||||
|             if(!m_all_neg_bound || m_overlap) { | ||||
|                 table_base::iterator nit = m_negated_table->begin(); | ||||
|                 table_base::iterator nend = m_negated_table->end(); | ||||
|  | @ -1524,7 +1524,7 @@ namespace datalog { | |||
|             } | ||||
|         } | ||||
| 
 | ||||
|         virtual void operator()(table_base & tgt, const table_base & negated_table) { | ||||
|         void operator()(table_base & tgt, const table_base & negated_table) override { | ||||
|             SASSERT(m_negated_table==0); | ||||
|             flet<const table_base *> flet_neg_table(m_negated_table, &negated_table); | ||||
|             auxiliary_table_filter_fn::operator()(tgt); | ||||
|  | @ -1568,7 +1568,7 @@ namespace datalog { | |||
|         default_table_select_equal_and_project_fn(table_mutator_fn * filter, table_transformer_fn * project) | ||||
|             : m_filter(filter), m_project(project) {} | ||||
| 
 | ||||
|         virtual table_base * operator()(const table_base & t1) { | ||||
|         table_base * operator()(const table_base & t1) override { | ||||
|             TRACE("dl", tout << t1.get_plugin().get_name() << "\n";); | ||||
|             scoped_rel<table_base> aux = t1.clone(); | ||||
|             (*m_filter)(*aux); | ||||
|  | @ -1606,9 +1606,9 @@ namespace datalog { | |||
|             m_union_fn = plugin.mk_union_fn(t, *m_aux_table, static_cast<table_base *>(0)); | ||||
|         } | ||||
| 
 | ||||
|         virtual ~default_table_map_fn() {} | ||||
|         ~default_table_map_fn() override {} | ||||
| 
 | ||||
|         virtual void operator()(table_base & t) { | ||||
|         void operator()(table_base & t) override { | ||||
|             SASSERT(t.get_signature()==m_aux_table->get_signature()); | ||||
|             if(!m_aux_table->empty()) { | ||||
|                 m_aux_table->reset(); | ||||
|  | @ -1664,7 +1664,7 @@ namespace datalog { | |||
|             m_former_row.resize(get_result_signature().size()); | ||||
|         } | ||||
| 
 | ||||
|         virtual ~default_table_project_with_reduce_fn() {} | ||||
|         ~default_table_project_with_reduce_fn() override {} | ||||
| 
 | ||||
|         virtual void modify_fact(table_fact & f) const { | ||||
|             unsigned ofs=1; | ||||
|  | @ -1693,7 +1693,7 @@ namespace datalog { | |||
|             } | ||||
|         } | ||||
| 
 | ||||
|         virtual table_base * operator()(const table_base & t) { | ||||
|         table_base * operator()(const table_base & t) override { | ||||
|             table_plugin & plugin = t.get_plugin(); | ||||
|             const table_signature & res_sign = get_result_signature(); | ||||
|             SASSERT(plugin.can_handle_signature(res_sign)); | ||||
|  |  | |||
|  | @ -294,7 +294,7 @@ namespace datalog { | |||
|             } | ||||
|         } | ||||
| 
 | ||||
|         virtual relation_base * operator()(const relation_base & r1, const relation_base & r2) { | ||||
|         relation_base * operator()(const relation_base & r1, const relation_base & r2) override { | ||||
|             bool r1_sieved = r1.get_plugin().is_sieve_relation(); | ||||
|             bool r2_sieved = r2.get_plugin().is_sieve_relation(); | ||||
|             SASSERT(r1_sieved || r2_sieved); | ||||
|  | @ -357,7 +357,7 @@ namespace datalog { | |||
|             get_result_signature() = result_sig; | ||||
|         } | ||||
| 
 | ||||
|         virtual relation_base * operator()(const relation_base & r0) { | ||||
|         relation_base * operator()(const relation_base & r0) override { | ||||
|             SASSERT(r0.get_plugin().is_sieve_relation()); | ||||
|             const sieve_relation & r = static_cast<const sieve_relation &>(r0); | ||||
|             sieve_relation_plugin & plugin = r.get_plugin(); | ||||
|  | @ -439,7 +439,7 @@ namespace datalog { | |||
|     public: | ||||
|         union_fn(relation_union_fn * union_fun) : m_union_fun(union_fun) {} | ||||
| 
 | ||||
|         virtual void operator()(relation_base & tgt, const relation_base & src, relation_base * delta) { | ||||
|         void operator()(relation_base & tgt, const relation_base & src, relation_base * delta) override { | ||||
|             bool tgt_sieved = tgt.get_plugin().is_sieve_relation(); | ||||
|             bool src_sieved = src.get_plugin().is_sieve_relation(); | ||||
|             bool delta_sieved = delta && delta->get_plugin().is_sieve_relation(); | ||||
|  | @ -504,7 +504,7 @@ namespace datalog { | |||
|         filter_fn(relation_mutator_fn * inner_fun)  | ||||
|             : m_inner_fun(inner_fun) {} | ||||
| 
 | ||||
|         virtual void operator()(relation_base & r0) { | ||||
|         void operator()(relation_base & r0) override { | ||||
|             SASSERT(r0.get_plugin().is_sieve_relation()); | ||||
|             sieve_relation & r = static_cast<sieve_relation &>(r0); | ||||
| 
 | ||||
|  | @ -600,7 +600,7 @@ namespace datalog { | |||
|         negation_filter_fn(relation_intersection_filter_fn * inner_fun) | ||||
|             : m_inner_fun(inner_fun) {} | ||||
| 
 | ||||
|         virtual void operator()(relation_base & r, const relation_base & neg) { | ||||
|         void operator()(relation_base & r, const relation_base & neg) override { | ||||
|             bool r_sieved = r.get_plugin().is_sieve_relation(); | ||||
|             bool neg_sieved = neg.get_plugin().is_sieve_relation(); | ||||
|             SASSERT(r_sieved || neg_sieved); | ||||
|  |  | |||
|  | @ -85,7 +85,7 @@ namespace datalog { | |||
| 
 | ||||
|         sieve_relation_plugin(relation_manager & manager); | ||||
| 
 | ||||
|         virtual void initialize(family_id fid); | ||||
|         void initialize(family_id fid) override; | ||||
| 
 | ||||
|         family_id get_relation_kind(const relation_signature & sig, const bool * inner_columns,  | ||||
|             family_id inner_kind); | ||||
|  | @ -95,15 +95,15 @@ namespace datalog { | |||
|             return get_relation_kind(sig, inner_columns.c_ptr(), inner_kind); | ||||
|         } | ||||
| 
 | ||||
|         virtual bool can_handle_signature(const relation_signature & s); | ||||
|         bool can_handle_signature(const relation_signature & s) override; | ||||
|          | ||||
|         virtual relation_base * mk_empty(const relation_signature & s); | ||||
|         relation_base * mk_empty(const relation_signature & s) override; | ||||
|         sieve_relation * mk_empty(const sieve_relation & original); | ||||
|         virtual relation_base * mk_empty(const relation_base & original); | ||||
|         virtual relation_base * mk_empty(const relation_signature & s, family_id kind); | ||||
|         relation_base * mk_empty(const relation_base & original) override; | ||||
|         relation_base * mk_empty(const relation_signature & s, family_id kind) override; | ||||
|         sieve_relation * mk_empty(const relation_signature & s, relation_plugin & inner_plugin); | ||||
| 
 | ||||
|         virtual relation_base * mk_full(func_decl* p, const relation_signature & s); | ||||
|         relation_base * mk_full(func_decl* p, const relation_signature & s) override; | ||||
|         sieve_relation * full(func_decl* p, const relation_signature & s, relation_plugin & inner_plugin); | ||||
| 
 | ||||
|         sieve_relation * mk_from_inner(const relation_signature & s, const bool * inner_columns,  | ||||
|  | @ -116,22 +116,22 @@ namespace datalog { | |||
| 
 | ||||
|     protected: | ||||
| 
 | ||||
|         virtual relation_join_fn * mk_join_fn(const relation_base & t1, const relation_base & t2, | ||||
|             unsigned col_cnt, const unsigned * cols1, const unsigned * cols2); | ||||
|         virtual relation_transformer_fn * mk_project_fn(const relation_base & t, unsigned col_cnt,  | ||||
|             const unsigned * removed_cols); | ||||
|         virtual relation_transformer_fn * mk_rename_fn(const relation_base & t, unsigned permutation_cycle_len,  | ||||
|             const unsigned * permutation_cycle); | ||||
|         virtual relation_union_fn * mk_union_fn(const relation_base & tgt, const relation_base & src,  | ||||
|             const relation_base * delta); | ||||
|         virtual relation_mutator_fn * mk_filter_identical_fn(const relation_base & t, unsigned col_cnt,  | ||||
|             const unsigned * identical_cols); | ||||
|         virtual relation_mutator_fn * mk_filter_equal_fn(const relation_base & t, const relation_element & value,  | ||||
|             unsigned col); | ||||
|         virtual relation_mutator_fn * mk_filter_interpreted_fn(const relation_base & t, app * condition); | ||||
|         virtual relation_intersection_filter_fn * mk_filter_by_negation_fn(const relation_base & t,  | ||||
|             const relation_base & negated_obj, unsigned joined_col_cnt,  | ||||
|             const unsigned * t_cols, const unsigned * negated_cols); | ||||
|         relation_join_fn * mk_join_fn(const relation_base & t1, const relation_base & t2, | ||||
|             unsigned col_cnt, const unsigned * cols1, const unsigned * cols2) override; | ||||
|         relation_transformer_fn * mk_project_fn(const relation_base & t, unsigned col_cnt, | ||||
|             const unsigned * removed_cols) override; | ||||
|         relation_transformer_fn * mk_rename_fn(const relation_base & t, unsigned permutation_cycle_len, | ||||
|             const unsigned * permutation_cycle) override; | ||||
|         relation_union_fn * mk_union_fn(const relation_base & tgt, const relation_base & src, | ||||
|             const relation_base * delta) override; | ||||
|         relation_mutator_fn * mk_filter_identical_fn(const relation_base & t, unsigned col_cnt, | ||||
|             const unsigned * identical_cols) override; | ||||
|         relation_mutator_fn * mk_filter_equal_fn(const relation_base & t, const relation_element & value, | ||||
|             unsigned col) override; | ||||
|         relation_mutator_fn * mk_filter_interpreted_fn(const relation_base & t, app * condition) override; | ||||
|         relation_intersection_filter_fn * mk_filter_by_negation_fn(const relation_base & t, | ||||
|             const relation_base & negated_obj, unsigned joined_col_cnt, | ||||
|             const unsigned * t_cols, const unsigned * negated_cols) override; | ||||
|     }; | ||||
| 
 | ||||
| 
 | ||||
|  | @ -176,18 +176,18 @@ namespace datalog { | |||
|         relation_base & get_inner() { return *m_inner; } | ||||
|         const relation_base & get_inner() const { return *m_inner; } | ||||
| 
 | ||||
|         virtual void add_fact(const relation_fact & f); | ||||
|         virtual bool contains_fact(const relation_fact & f) const; | ||||
|         virtual sieve_relation * clone() const; | ||||
|         virtual relation_base * complement(func_decl*p) const; | ||||
|         virtual void to_formula(expr_ref& fml) const; | ||||
|         void add_fact(const relation_fact & f) override; | ||||
|         bool contains_fact(const relation_fact & f) const override; | ||||
|         sieve_relation * clone() const override; | ||||
|         relation_base * complement(func_decl*p) const override; | ||||
|         void to_formula(expr_ref& fml) const override; | ||||
| 
 | ||||
|         virtual bool empty() const { return get_inner().empty(); } | ||||
|         virtual void reset() { get_inner().reset(); } | ||||
|         virtual unsigned get_size_estimate_rows() const { return get_inner().get_size_estimate_rows(); } | ||||
|         virtual unsigned get_size_estimate_bytes() const { return get_inner().get_size_estimate_bytes(); } | ||||
|         bool empty() const override { return get_inner().empty(); } | ||||
|         void reset() override { get_inner().reset(); } | ||||
|         unsigned get_size_estimate_rows() const override { return get_inner().get_size_estimate_rows(); } | ||||
|         unsigned get_size_estimate_bytes() const override { return get_inner().get_size_estimate_bytes(); } | ||||
| 
 | ||||
|         virtual void display(std::ostream & out) const; | ||||
|         void display(std::ostream & out) const override; | ||||
|     }; | ||||
| 
 | ||||
| 
 | ||||
|  |  | |||
|  | @ -198,7 +198,7 @@ namespace datalog { | |||
|               row_interface(t),  | ||||
|               m_parent(parent) {} | ||||
| 
 | ||||
|             virtual table_element operator[](unsigned col) const { | ||||
|             table_element operator[](unsigned col) const override { | ||||
|                 return m_parent.m_layout.get(m_parent.m_ptr, col); | ||||
|             } | ||||
| 
 | ||||
|  | @ -218,15 +218,15 @@ namespace datalog { | |||
|           m_row_obj(t, *this), | ||||
|           m_layout(t.m_column_layout) {} | ||||
| 
 | ||||
|         virtual bool is_finished() const { | ||||
|         bool is_finished() const override { | ||||
|             return m_ptr == m_end; | ||||
|         } | ||||
| 
 | ||||
|         virtual row_interface & operator*() { | ||||
|         row_interface & operator*() override { | ||||
|             SASSERT(!is_finished()); | ||||
|             return m_row_obj; | ||||
|         } | ||||
|         virtual void operator++() { | ||||
|         void operator++() override { | ||||
|             SASSERT(!is_finished()); | ||||
|             m_ptr+=m_fact_size; | ||||
|         } | ||||
|  | @ -312,7 +312,7 @@ namespace datalog { | |||
|             m_keys(key_len*sizeof(table_element)),  | ||||
|             m_first_nonindexed(0) {} | ||||
| 
 | ||||
|         virtual void update(const sparse_table & t) { | ||||
|         void update(const sparse_table & t) override { | ||||
|             if (m_first_nonindexed == t.m_data.after_last_offset()) { | ||||
|                 return; | ||||
|             } | ||||
|  | @ -351,7 +351,7 @@ namespace datalog { | |||
|             m_first_nonindexed = t.m_data.after_last_offset(); | ||||
|         } | ||||
| 
 | ||||
|         virtual query_result get_matching_offsets(const key_value & key) const { | ||||
|         query_result get_matching_offsets(const key_value & key) const override { | ||||
|             key_to_reserve(key); | ||||
|             store_offset ofs; | ||||
|             if (!m_keys.find_reserve_content(ofs)) { | ||||
|  | @ -406,9 +406,9 @@ namespace datalog { | |||
|             m_key_fact.resize(t.get_signature().size()); | ||||
|         } | ||||
| 
 | ||||
|         virtual ~full_signature_key_indexer() {} | ||||
|         ~full_signature_key_indexer() override {} | ||||
| 
 | ||||
|         virtual query_result get_matching_offsets(const key_value & key) const { | ||||
|         query_result get_matching_offsets(const key_value & key) const override { | ||||
|             unsigned key_len = m_key_cols.size(); | ||||
|             for (unsigned i=0; i<key_len; i++) { | ||||
|                 m_key_fact[m_permutation[i]] = key[i]; | ||||
|  | @ -826,7 +826,7 @@ namespace datalog { | |||
|             m_removed_cols.push_back(UINT_MAX); | ||||
|         } | ||||
| 
 | ||||
|         virtual table_base * operator()(const table_base & tb1, const table_base & tb2) { | ||||
|         table_base * operator()(const table_base & tb1, const table_base & tb2) override { | ||||
| 
 | ||||
|             const sparse_table & t1 = get(tb1); | ||||
|             const sparse_table & t2 = get(tb2); | ||||
|  | @ -882,7 +882,7 @@ namespace datalog { | |||
| 
 | ||||
|     class sparse_table_plugin::union_fn : public table_union_fn { | ||||
|     public: | ||||
|         virtual void operator()(table_base & tgt0, const table_base & src0, table_base * delta0) { | ||||
|         void operator()(table_base & tgt0, const table_base & src0, table_base * delta0) override { | ||||
|             verbose_action  _va("union"); | ||||
|             sparse_table & tgt = get(tgt0); | ||||
|             const sparse_table & src = get(src0); | ||||
|  | @ -941,7 +941,7 @@ namespace datalog { | |||
|                 SASSERT(r_idx == m_removed_col_cnt); | ||||
|         } | ||||
| 
 | ||||
|         virtual table_base * operator()(const table_base & tb) { | ||||
|         table_base * operator()(const table_base & tb) override { | ||||
|             verbose_action  _va("project"); | ||||
|             const sparse_table & t = get(tb); | ||||
| 
 | ||||
|  | @ -985,7 +985,7 @@ namespace datalog { | |||
|             m_key.push_back(val); | ||||
|         } | ||||
| 
 | ||||
|         virtual table_base * operator()(const table_base & tb) { | ||||
|         table_base * operator()(const table_base & tb) override { | ||||
|             verbose_action  _va("select_equal_and_project"); | ||||
|             const sparse_table & t = get(tb); | ||||
| 
 | ||||
|  | @ -1072,7 +1072,7 @@ namespace datalog { | |||
|                 } | ||||
|         } | ||||
| 
 | ||||
|         virtual table_base * operator()(const table_base & tb) { | ||||
|         table_base * operator()(const table_base & tb) override { | ||||
|             verbose_action  _va("rename"); | ||||
| 
 | ||||
|             const sparse_table & t = get(tb); | ||||
|  | @ -1210,7 +1210,7 @@ namespace datalog { | |||
|             } | ||||
|         } | ||||
| 
 | ||||
|         virtual void operator()(table_base & tgt0, const table_base & neg0) { | ||||
|         void operator()(table_base & tgt0, const table_base & neg0) override { | ||||
|             sparse_table & tgt = get(tgt0); | ||||
|             const sparse_table & neg = get(neg0); | ||||
|             | ||||
|  | @ -1310,7 +1310,7 @@ namespace datalog { | |||
|             m_s2_cols.append(src2_cols); | ||||
|         } | ||||
| 
 | ||||
|         virtual void operator()(table_base & _t, const table_base & _s1, const table_base& _s2) { | ||||
|         void operator()(table_base & _t, const table_base & _s1, const table_base& _s2) override { | ||||
| 
 | ||||
|             verbose_action  _va("negated_join"); | ||||
|             sparse_table& t = get(_t); | ||||
|  |  | |||
|  | @ -69,39 +69,39 @@ namespace datalog { | |||
|         typedef sparse_table table; | ||||
| 
 | ||||
|         sparse_table_plugin(relation_manager & manager); | ||||
|         ~sparse_table_plugin(); | ||||
|         ~sparse_table_plugin() override; | ||||
| 
 | ||||
|         virtual bool can_handle_signature(const table_signature & s)  | ||||
|         bool can_handle_signature(const table_signature & s) override | ||||
|         { return s.size()>0; } | ||||
| 
 | ||||
|         virtual table_base * mk_empty(const table_signature & s); | ||||
|         table_base * mk_empty(const table_signature & s) override; | ||||
|         sparse_table * mk_clone(const sparse_table & t); | ||||
| 
 | ||||
|     protected: | ||||
|         virtual table_join_fn * mk_join_fn(const table_base & t1, const table_base & t2, | ||||
|             unsigned col_cnt, const unsigned * cols1, const unsigned * cols2); | ||||
|         virtual table_join_fn * mk_join_project_fn(const table_base & t1, const table_base & t2, | ||||
|             unsigned col_cnt, const unsigned * cols1, const unsigned * cols2, unsigned removed_col_cnt,  | ||||
|             const unsigned * removed_cols); | ||||
|         virtual table_union_fn * mk_union_fn(const table_base & tgt, const table_base & src,  | ||||
|             const table_base * delta); | ||||
|         virtual table_transformer_fn * mk_project_fn(const table_base & t, unsigned col_cnt,  | ||||
|             const unsigned * removed_cols); | ||||
|         virtual table_transformer_fn * mk_rename_fn(const table_base & t, unsigned permutation_cycle_len, | ||||
|             const unsigned * permutation_cycle); | ||||
|         virtual table_transformer_fn * mk_select_equal_and_project_fn(const table_base & t,  | ||||
|             const table_element & value, unsigned col); | ||||
|         virtual table_intersection_filter_fn * mk_filter_by_negation_fn(const table_base & t,  | ||||
|                 const table_base & negated_obj, unsigned joined_col_cnt,  | ||||
|                 const unsigned * t_cols, const unsigned * negated_cols); | ||||
|         virtual table_intersection_join_filter_fn* mk_filter_by_negated_join_fn( | ||||
|             const table_base & t,  | ||||
|             const table_base & src1,  | ||||
|             const table_base & src2,  | ||||
|         table_join_fn * mk_join_fn(const table_base & t1, const table_base & t2, | ||||
|             unsigned col_cnt, const unsigned * cols1, const unsigned * cols2) override; | ||||
|         table_join_fn * mk_join_project_fn(const table_base & t1, const table_base & t2, | ||||
|             unsigned col_cnt, const unsigned * cols1, const unsigned * cols2, unsigned removed_col_cnt, | ||||
|             const unsigned * removed_cols) override; | ||||
|         table_union_fn * mk_union_fn(const table_base & tgt, const table_base & src, | ||||
|             const table_base * delta) override; | ||||
|         table_transformer_fn * mk_project_fn(const table_base & t, unsigned col_cnt, | ||||
|             const unsigned * removed_cols) override; | ||||
|         table_transformer_fn * mk_rename_fn(const table_base & t, unsigned permutation_cycle_len, | ||||
|             const unsigned * permutation_cycle) override; | ||||
|         table_transformer_fn * mk_select_equal_and_project_fn(const table_base & t, | ||||
|             const table_element & value, unsigned col) override; | ||||
|         table_intersection_filter_fn * mk_filter_by_negation_fn(const table_base & t, | ||||
|                 const table_base & negated_obj, unsigned joined_col_cnt, | ||||
|                 const unsigned * t_cols, const unsigned * negated_cols) override; | ||||
|         table_intersection_join_filter_fn* mk_filter_by_negated_join_fn( | ||||
|             const table_base & t, | ||||
|             const table_base & src1, | ||||
|             const table_base & src2, | ||||
|             unsigned_vector const& t_cols, | ||||
|             unsigned_vector const& src_cols, | ||||
|             unsigned_vector const& src1_cols, | ||||
|             unsigned_vector const& src2_cols); | ||||
|             unsigned_vector const& src2_cols) override; | ||||
| 
 | ||||
|         static sparse_table const& get(table_base const&); | ||||
|         static sparse_table& get(table_base&); | ||||
|  | @ -463,10 +463,10 @@ namespace datalog { | |||
| 
 | ||||
|         sparse_table(sparse_table_plugin & p, const table_signature & sig, unsigned init_capacity=0); | ||||
|         sparse_table(const sparse_table & t); | ||||
|         virtual ~sparse_table(); | ||||
|         ~sparse_table() override; | ||||
|     public: | ||||
| 
 | ||||
|         virtual void deallocate() { | ||||
|         void deallocate() override { | ||||
|             get_plugin().recycle(this); | ||||
|         } | ||||
| 
 | ||||
|  | @ -475,22 +475,22 @@ namespace datalog { | |||
|         sparse_table_plugin & get_plugin() const  | ||||
|         { return static_cast<sparse_table_plugin &>(table_base::get_plugin()); } | ||||
| 
 | ||||
|         virtual bool empty() const { return row_count()==0; } | ||||
|         virtual void add_fact(const table_fact & f); | ||||
|         virtual bool contains_fact(const table_fact & f) const; | ||||
|         virtual bool fetch_fact(table_fact & f) const; | ||||
|         virtual void ensure_fact(const table_fact & f); | ||||
|         virtual void remove_fact(const table_element* fact); | ||||
|         virtual void reset(); | ||||
|         bool empty() const override { return row_count()==0; } | ||||
|         void add_fact(const table_fact & f) override; | ||||
|         bool contains_fact(const table_fact & f) const override; | ||||
|         bool fetch_fact(table_fact & f) const override; | ||||
|         void ensure_fact(const table_fact & f) override; | ||||
|         void remove_fact(const table_element* fact) override; | ||||
|         void reset() override; | ||||
| 
 | ||||
|         virtual table_base * clone() const; | ||||
|         table_base * clone() const override; | ||||
| 
 | ||||
|         virtual table_base::iterator begin() const; | ||||
|         virtual table_base::iterator end() const; | ||||
|         table_base::iterator begin() const override; | ||||
|         table_base::iterator end() const override; | ||||
| 
 | ||||
|         virtual unsigned get_size_estimate_rows() const { return row_count(); } | ||||
|         virtual unsigned get_size_estimate_bytes() const; | ||||
|         virtual bool knows_exact_size() const { return true; } | ||||
|         unsigned get_size_estimate_rows() const override { return row_count(); } | ||||
|         unsigned get_size_estimate_bytes() const override; | ||||
|         bool knows_exact_size() const override { return true; } | ||||
|     }; | ||||
| 
 | ||||
|  }; | ||||
|  |  | |||
|  | @ -43,7 +43,7 @@ namespace datalog { | |||
|             : convenient_table_join_fn(t1_sig, t2_sig, col_cnt, cols1, cols2), | ||||
|             m_joined_col_cnt(col_cnt) {} | ||||
| 
 | ||||
|         virtual table_base * operator()(const table_base & t1, const table_base & t2) { | ||||
|         table_base * operator()(const table_base & t1, const table_base & t2) override { | ||||
| 
 | ||||
|             const hashtable_table & ht1 = static_cast<const hashtable_table &>(t1); | ||||
|             const hashtable_table & ht2 = static_cast<const hashtable_table &>(t2); | ||||
|  | @ -105,10 +105,10 @@ namespace datalog { | |||
|         public: | ||||
|             our_row(const our_iterator_core & parent) : row_interface(parent.m_parent), m_parent(parent) {} | ||||
| 
 | ||||
|             virtual void get_fact(table_fact & result) const { | ||||
|             void get_fact(table_fact & result) const override { | ||||
|                 result = *m_parent.m_inner; | ||||
|             } | ||||
|             virtual table_element operator[](unsigned col) const { | ||||
|             table_element operator[](unsigned col) const override { | ||||
|                 return (*m_parent.m_inner)[col]; | ||||
|             } | ||||
| 
 | ||||
|  | @ -121,15 +121,15 @@ namespace datalog { | |||
|             m_parent(t), m_inner(finished ? t.m_data.end() : t.m_data.begin()),  | ||||
|             m_end(t.m_data.end()), m_row_obj(*this) {} | ||||
| 
 | ||||
|         virtual bool is_finished() const { | ||||
|         bool is_finished() const override { | ||||
|             return m_inner==m_end; | ||||
|         } | ||||
| 
 | ||||
|         virtual row_interface & operator*() { | ||||
|         row_interface & operator*() override { | ||||
|             SASSERT(!is_finished()); | ||||
|             return m_row_obj; | ||||
|         } | ||||
|         virtual void operator++() { | ||||
|         void operator++() override { | ||||
|             SASSERT(!is_finished()); | ||||
|             ++m_inner; | ||||
|         } | ||||
|  | @ -192,7 +192,7 @@ namespace datalog { | |||
|             const bv_iterator& m_parent; | ||||
|         public: | ||||
|             our_row(const bv_iterator & p) : caching_row_interface(p.m_bv), m_parent(p) {} | ||||
|             virtual void get_fact(table_fact& result) const { | ||||
|             void get_fact(table_fact& result) const override { | ||||
|                 if (result.size() < size()) { | ||||
|                     result.resize(size(), 0); | ||||
|                 } | ||||
|  | @ -210,15 +210,15 @@ namespace datalog { | |||
|             } | ||||
|         } | ||||
| 
 | ||||
|         virtual bool is_finished() const { | ||||
|         bool is_finished() const override { | ||||
|             return m_offset == m_bv.m_bv.size(); | ||||
|         } | ||||
| 
 | ||||
|         virtual row_interface & operator*() { | ||||
|         row_interface & operator*() override { | ||||
|             SASSERT(!is_finished()); | ||||
|             return m_row_obj; | ||||
|         } | ||||
|         virtual void operator++() { | ||||
|         void operator++() override { | ||||
|             SASSERT(!is_finished()); | ||||
|             ++m_offset; | ||||
|             while (!is_finished() && !m_bv.m_bv.get(m_offset)) { | ||||
|  |  | |||
|  | @ -61,10 +61,10 @@ namespace datalog { | |||
|         hashtable_table_plugin(relation_manager & manager)  | ||||
|             : table_plugin(symbol("hashtable"), manager) {} | ||||
| 
 | ||||
|         virtual table_base * mk_empty(const table_signature & s); | ||||
|         table_base * mk_empty(const table_signature & s) override; | ||||
| 
 | ||||
|         virtual table_join_fn * mk_join_fn(const table_base & t1, const table_base & t2, | ||||
|             unsigned col_cnt, const unsigned * cols1, const unsigned * cols2); | ||||
|         table_join_fn * mk_join_fn(const table_base & t1, const table_base & t2, | ||||
|             unsigned col_cnt, const unsigned * cols1, const unsigned * cols2) override; | ||||
|     }; | ||||
| 
 | ||||
|     class hashtable_table : public table_base { | ||||
|  | @ -84,23 +84,23 @@ namespace datalog { | |||
|         hashtable_table_plugin & get_plugin() const | ||||
|         { return static_cast<hashtable_table_plugin &>(table_base::get_plugin()); } | ||||
| 
 | ||||
|         virtual void add_fact(const table_fact & f) { | ||||
|         void add_fact(const table_fact & f) override { | ||||
|             m_data.insert(f); | ||||
|         } | ||||
|         virtual void remove_fact(const table_element* fact) { | ||||
|         void remove_fact(const table_element* fact) override { | ||||
|             table_fact f(get_signature().size(), fact); | ||||
|             m_data.remove(f); | ||||
|         } | ||||
|         virtual bool contains_fact(const table_fact & f) const { | ||||
|         bool contains_fact(const table_fact & f) const override { | ||||
|             return m_data.contains(f); | ||||
|         } | ||||
| 
 | ||||
|         virtual iterator begin() const; | ||||
|         virtual iterator end() const; | ||||
|         iterator begin() const override; | ||||
|         iterator end() const override; | ||||
| 
 | ||||
|         virtual unsigned get_size_estimate_rows() const { return m_data.size(); } | ||||
|         virtual unsigned get_size_estimate_bytes() const { return m_data.size()*get_signature().size()*8; } | ||||
|         virtual bool knows_exact_size() const { return true; } | ||||
|         unsigned get_size_estimate_rows() const override { return m_data.size(); } | ||||
|         unsigned get_size_estimate_bytes() const override { return m_data.size()*get_signature().size()*8; } | ||||
|         bool knows_exact_size() const override { return true; } | ||||
|     }; | ||||
| 
 | ||||
|     // -----------------------------------
 | ||||
|  | @ -118,9 +118,9 @@ namespace datalog { | |||
|         bitvector_table_plugin(relation_manager & manager)  | ||||
|             : table_plugin(symbol("bitvector"), manager) {} | ||||
| 
 | ||||
|         virtual bool can_handle_signature(const table_signature & s); | ||||
|         bool can_handle_signature(const table_signature & s) override; | ||||
| 
 | ||||
|         virtual table_base * mk_empty(const table_signature & s); | ||||
|         table_base * mk_empty(const table_signature & s) override; | ||||
|     }; | ||||
| 
 | ||||
|     class bitvector_table : public table_base { | ||||
|  | @ -137,11 +137,11 @@ namespace datalog { | |||
| 
 | ||||
|         bitvector_table(bitvector_table_plugin & plugin, const table_signature & sig); | ||||
|     public: | ||||
|         virtual void add_fact(const table_fact & f); | ||||
|         virtual void remove_fact(const table_element* fact);                    | ||||
|         virtual bool contains_fact(const table_fact & f) const; | ||||
|         virtual iterator begin() const; | ||||
|         virtual iterator end() const; | ||||
|         void add_fact(const table_fact & f) override; | ||||
|         void remove_fact(const table_element* fact) override; | ||||
|         bool contains_fact(const table_fact & f) const override; | ||||
|         iterator begin() const override; | ||||
|         iterator end() const override; | ||||
|     }; | ||||
| 
 | ||||
| 
 | ||||
|  |  | |||
|  | @ -82,7 +82,7 @@ namespace datalog { | |||
|             : convenient_relation_join_project_fn(s1, s2, col_cnt, cols1, cols2, removed_col_cnt, | ||||
|                     removed_cols), m_tfun(tfun) {} | ||||
|          | ||||
|         virtual relation_base * operator()(const relation_base & t1, const relation_base & t2) { | ||||
|         relation_base * operator()(const relation_base & t1, const relation_base & t2) override { | ||||
|             SASSERT(t1.from_table()); | ||||
|             SASSERT(t2.from_table()); | ||||
|             table_relation_plugin & plugin = static_cast<table_relation_plugin &>(t1.get_plugin()); | ||||
|  | @ -146,7 +146,7 @@ namespace datalog { | |||
|         tr_transformer_fn(const relation_signature & rsig, table_transformer_fn * tfun)  | ||||
|             : m_tfun(tfun) { get_result_signature() = rsig; } | ||||
| 
 | ||||
|         virtual relation_base * operator()(const relation_base & t) { | ||||
|         relation_base * operator()(const relation_base & t) override { | ||||
|             SASSERT(t.from_table()); | ||||
|             table_relation_plugin & plugin = static_cast<table_relation_plugin &>(t.get_plugin()); | ||||
| 
 | ||||
|  | @ -235,7 +235,7 @@ namespace datalog { | |||
|        by iterating through the table and calling \c add_fact of the target relation. | ||||
|     */ | ||||
|     class table_relation_plugin::universal_target_union_fn : public relation_union_fn { | ||||
|         virtual void operator()(relation_base & tgt, const relation_base & src, relation_base * delta) { | ||||
|         void operator()(relation_base & tgt, const relation_base & src, relation_base * delta) override { | ||||
|             SASSERT(src.from_table()); | ||||
| 
 | ||||
|             const table_relation & tr_src = static_cast<const table_relation &>(src); | ||||
|  | @ -271,7 +271,7 @@ namespace datalog { | |||
|     public: | ||||
|         tr_union_fn(table_union_fn * tfun) : m_tfun(tfun) {} | ||||
| 
 | ||||
|         virtual void operator()(relation_base & tgt, const relation_base & src, relation_base * delta) { | ||||
|         void operator()(relation_base & tgt, const relation_base & src, relation_base * delta) override { | ||||
|             SASSERT(tgt.from_table()); | ||||
|             SASSERT(src.from_table()); | ||||
|             SASSERT(!delta || delta->from_table()); | ||||
|  | @ -311,7 +311,7 @@ namespace datalog { | |||
|     public: | ||||
|         tr_mutator_fn(table_mutator_fn * tfun) : m_tfun(tfun) {} | ||||
| 
 | ||||
|         virtual void operator()(relation_base & r) { | ||||
|         void operator()(relation_base & r) override { | ||||
|             SASSERT(r.from_table()); | ||||
|             table_relation & tr = static_cast<table_relation &>(r);             | ||||
|             (*m_tfun)(tr.get_table()); | ||||
|  | @ -377,7 +377,7 @@ namespace datalog { | |||
|     public: | ||||
|         tr_intersection_filter_fn(table_intersection_filter_fn * tfun) : m_tfun(tfun) {} | ||||
| 
 | ||||
|         virtual void operator()(relation_base & r, const relation_base & src) { | ||||
|         void operator()(relation_base & r, const relation_base & src) override { | ||||
|             SASSERT(r.from_table());  | ||||
|             SASSERT(src.from_table()); | ||||
| 
 | ||||
|  |  | |||
|  | @ -46,40 +46,40 @@ namespace datalog { | |||
| 
 | ||||
|         table_plugin & get_table_plugin() { return m_table_plugin; } | ||||
| 
 | ||||
|         virtual bool can_handle_signature(const relation_signature & s); | ||||
|         bool can_handle_signature(const relation_signature & s) override; | ||||
|          | ||||
|         virtual relation_base * mk_empty(const relation_signature & s); | ||||
|         relation_base * mk_empty(const relation_signature & s) override; | ||||
|         virtual relation_base * mk_full_relation(const relation_signature & s, func_decl* p, family_id kind); | ||||
|         relation_base * mk_from_table(const relation_signature & s, table_base * t); | ||||
| 
 | ||||
|     protected: | ||||
|         virtual relation_join_fn * mk_join_fn(const relation_base & t1, const relation_base & t2, | ||||
|             unsigned col_cnt, const unsigned * cols1, const unsigned * cols2); | ||||
|         virtual relation_join_fn * mk_join_project_fn(const relation_base & t1, const relation_base & t2, | ||||
|             unsigned joined_col_cnt, const unsigned * cols1, const unsigned * cols2, unsigned removed_col_cnt,  | ||||
|             const unsigned * removed_cols); | ||||
|         virtual relation_transformer_fn * mk_project_fn(const relation_base & t, unsigned col_cnt,  | ||||
|             const unsigned * removed_cols); | ||||
|         virtual relation_transformer_fn * mk_rename_fn(const relation_base & t, unsigned permutation_cycle_len,  | ||||
|             const unsigned * permutation_cycle); | ||||
|         virtual relation_transformer_fn * mk_permutation_rename_fn(const relation_base & t,  | ||||
|             const unsigned * permutation); | ||||
|         virtual relation_union_fn * mk_union_fn(const relation_base & tgt, const relation_base & src,  | ||||
|             const relation_base * delta); | ||||
|         virtual relation_mutator_fn * mk_filter_identical_fn(const relation_base & t, unsigned col_cnt,  | ||||
|             const unsigned * identical_cols); | ||||
|         virtual relation_mutator_fn * mk_filter_equal_fn(const relation_base & t, const relation_element & value,  | ||||
|             unsigned col); | ||||
|         virtual relation_mutator_fn * mk_filter_interpreted_fn(const relation_base & t, app * condition); | ||||
|         virtual relation_transformer_fn * mk_filter_interpreted_and_project_fn(const relation_base & t, | ||||
|             app * condition, unsigned removed_col_cnt, const unsigned * removed_cols); | ||||
|         virtual relation_intersection_filter_fn * mk_filter_by_intersection_fn(const relation_base & t,  | ||||
|             const relation_base & src, unsigned joined_col_cnt, const unsigned * t_cols, const unsigned * src_cols); | ||||
|         virtual relation_intersection_filter_fn * mk_filter_by_negation_fn(const relation_base & t,  | ||||
|             const relation_base & negated_obj, unsigned joined_col_cnt,  | ||||
|             const unsigned * t_cols, const unsigned * negated_cols); | ||||
|         virtual relation_transformer_fn * mk_select_equal_and_project_fn(const relation_base & t,  | ||||
|             const relation_element & value, unsigned col); | ||||
|         relation_join_fn * mk_join_fn(const relation_base & t1, const relation_base & t2, | ||||
|             unsigned col_cnt, const unsigned * cols1, const unsigned * cols2) override; | ||||
|         relation_join_fn * mk_join_project_fn(const relation_base & t1, const relation_base & t2, | ||||
|             unsigned joined_col_cnt, const unsigned * cols1, const unsigned * cols2, unsigned removed_col_cnt, | ||||
|             const unsigned * removed_cols) override; | ||||
|         relation_transformer_fn * mk_project_fn(const relation_base & t, unsigned col_cnt, | ||||
|             const unsigned * removed_cols) override; | ||||
|         relation_transformer_fn * mk_rename_fn(const relation_base & t, unsigned permutation_cycle_len, | ||||
|             const unsigned * permutation_cycle) override; | ||||
|         relation_transformer_fn * mk_permutation_rename_fn(const relation_base & t, | ||||
|             const unsigned * permutation) override; | ||||
|         relation_union_fn * mk_union_fn(const relation_base & tgt, const relation_base & src, | ||||
|             const relation_base * delta) override; | ||||
|         relation_mutator_fn * mk_filter_identical_fn(const relation_base & t, unsigned col_cnt, | ||||
|             const unsigned * identical_cols) override; | ||||
|         relation_mutator_fn * mk_filter_equal_fn(const relation_base & t, const relation_element & value, | ||||
|             unsigned col) override; | ||||
|         relation_mutator_fn * mk_filter_interpreted_fn(const relation_base & t, app * condition) override; | ||||
|         relation_transformer_fn * mk_filter_interpreted_and_project_fn(const relation_base & t, | ||||
|             app * condition, unsigned removed_col_cnt, const unsigned * removed_cols) override; | ||||
|         relation_intersection_filter_fn * mk_filter_by_intersection_fn(const relation_base & t, | ||||
|             const relation_base & src, unsigned joined_col_cnt, const unsigned * t_cols, const unsigned * src_cols) override; | ||||
|         relation_intersection_filter_fn * mk_filter_by_negation_fn(const relation_base & t, | ||||
|             const relation_base & negated_obj, unsigned joined_col_cnt, | ||||
|             const unsigned * t_cols, const unsigned * negated_cols) override; | ||||
|         relation_transformer_fn * mk_select_equal_and_project_fn(const relation_base & t, | ||||
|             const relation_element & value, unsigned col) override; | ||||
|     }; | ||||
| 
 | ||||
|     class table_relation : public relation_base { | ||||
|  | @ -107,24 +107,24 @@ namespace datalog { | |||
|         table_base & get_table() { return *m_table; } | ||||
|         const table_base & get_table() const { return *m_table; } | ||||
| 
 | ||||
|         virtual bool empty() const { return m_table->empty(); } | ||||
|         bool empty() const override { return m_table->empty(); } | ||||
| 
 | ||||
|         void add_table_fact(const table_fact & f); | ||||
| 
 | ||||
|         virtual void add_fact(const relation_fact & f); | ||||
|         virtual bool contains_fact(const relation_fact & f) const; | ||||
|         virtual relation_base * clone() const; | ||||
|         virtual relation_base * complement(func_decl* p) const; | ||||
|         virtual void to_formula(expr_ref& fml) const { get_table().to_formula(get_signature(), fml); } | ||||
|         void add_fact(const relation_fact & f) override; | ||||
|         bool contains_fact(const relation_fact & f) const override; | ||||
|         relation_base * clone() const override; | ||||
|         relation_base * complement(func_decl* p) const override; | ||||
|         void to_formula(expr_ref& fml) const override { get_table().to_formula(get_signature(), fml); } | ||||
| 
 | ||||
|         virtual void display(std::ostream & out) const { | ||||
|         void display(std::ostream & out) const override { | ||||
|             get_table().display(out); | ||||
|         } | ||||
|         virtual void display_tuples(func_decl & pred, std::ostream & out) const; | ||||
|         void display_tuples(func_decl & pred, std::ostream & out) const override; | ||||
| 
 | ||||
|         virtual unsigned get_size_estimate_rows() const { return m_table->get_size_estimate_rows(); } | ||||
|         virtual unsigned get_size_estimate_bytes() const { return m_table->get_size_estimate_bytes(); } | ||||
|         virtual bool knows_exact_size() const { return m_table->knows_exact_size(); } | ||||
|         unsigned get_size_estimate_rows() const override { return m_table->get_size_estimate_rows(); } | ||||
|         unsigned get_size_estimate_bytes() const override { return m_table->get_size_estimate_bytes(); } | ||||
|         bool knows_exact_size() const override { return m_table->knows_exact_size(); } | ||||
|     }; | ||||
| 
 | ||||
| }; | ||||
|  |  | |||
|  | @ -55,12 +55,12 @@ namespace datalog { | |||
|             } | ||||
|         } | ||||
| 
 | ||||
|         virtual ~vector_relation() { | ||||
|         ~vector_relation() override { | ||||
|             dealloc(m_eqs); | ||||
|             dealloc(m_elems); | ||||
|         } | ||||
| 
 | ||||
|         virtual void swap(relation_base& other) { | ||||
|         void swap(relation_base& other) override { | ||||
|             vector_relation& o = dynamic_cast<vector_relation&>(other); | ||||
|             if (&o == this) return; | ||||
|             std::swap(o.m_eqs, m_eqs); | ||||
|  | @ -85,7 +85,7 @@ namespace datalog { | |||
|         } | ||||
| 
 | ||||
| 
 | ||||
|         virtual bool empty() const { return m_empty; } | ||||
|         bool empty() const override { return m_empty; } | ||||
| 
 | ||||
|         T& operator[](unsigned i) { return (*m_elems)[find(i)]; } | ||||
| 
 | ||||
|  | @ -93,7 +93,7 @@ namespace datalog { | |||
| 
 | ||||
|         virtual void display_index(unsigned i, T const& t, std::ostream& out) const = 0; | ||||
| 
 | ||||
|         virtual void display(std::ostream & out) const { | ||||
|         void display(std::ostream & out) const override { | ||||
|             if (empty()) { | ||||
|                 out << "empty\n"; | ||||
|                 return; | ||||
|  |  | |||
|  | @ -36,13 +36,13 @@ namespace datalog { | |||
|         { | ||||
|         } | ||||
| 
 | ||||
|         virtual bool empty() const {  | ||||
|         bool empty() const override { | ||||
|             return m_empty; | ||||
|         } | ||||
| 
 | ||||
|         virtual bool is_precise() const { return false; } | ||||
|         bool is_precise() const override { return false; } | ||||
| 
 | ||||
|         virtual void add_fact(const relation_fact & f) { | ||||
|         void add_fact(const relation_fact & f) override { | ||||
|             SASSERT(m_empty); | ||||
|             SASSERT(!m_basis_valid); | ||||
|             m_empty = false; | ||||
|  | @ -60,12 +60,12 @@ namespace datalog { | |||
|             } | ||||
|         } | ||||
| 
 | ||||
|         virtual bool contains_fact(const relation_fact & f) const {             | ||||
|         bool contains_fact(const relation_fact & f) const override { | ||||
|             UNREACHABLE(); | ||||
|             return false; | ||||
|         } | ||||
| 
 | ||||
|         virtual void display(std::ostream & out) const { | ||||
|         void display(std::ostream & out) const override { | ||||
|             if (m_fn) { | ||||
|                 out << m_fn->get_name() << "\n"; | ||||
|             } | ||||
|  | @ -82,18 +82,18 @@ namespace datalog { | |||
|             } | ||||
|         } | ||||
| 
 | ||||
|         virtual karr_relation * clone() const { | ||||
|         karr_relation * clone() const override { | ||||
|             karr_relation* result = alloc(karr_relation, m_plugin, m_fn, get_signature(), m_empty); | ||||
|             result->copy(*this); | ||||
|             return result; | ||||
|         } | ||||
| 
 | ||||
|         virtual karr_relation * complement(func_decl*) const { | ||||
|         karr_relation * complement(func_decl*) const override { | ||||
|             UNREACHABLE(); | ||||
|             return 0; | ||||
|         } | ||||
| 
 | ||||
|         virtual void to_formula(expr_ref& fml) const { | ||||
|         void to_formula(expr_ref& fml) const override { | ||||
|             if (empty()) { | ||||
|                 fml = m.mk_false(); | ||||
|             } | ||||
|  | @ -514,7 +514,7 @@ namespace datalog { | |||
|             : convenient_relation_join_fn(o1_sig, o2_sig, col_cnt, cols1, cols2){ | ||||
|         } | ||||
|          | ||||
|         virtual relation_base * operator()(const relation_base & _r1, const relation_base & _r2) { | ||||
|         relation_base * operator()(const relation_base & _r1, const relation_base & _r2) override { | ||||
|             karr_relation const& r1 = get(_r1); | ||||
|             karr_relation const& r2 = get(_r2); | ||||
|             karr_relation_plugin& p = r1.get_plugin(); | ||||
|  | @ -540,7 +540,7 @@ namespace datalog { | |||
|             : convenient_relation_project_fn(orig_sig, removed_col_cnt, removed_cols) { | ||||
|         } | ||||
| 
 | ||||
|         virtual relation_base * operator()(const relation_base & _r) { | ||||
|         relation_base * operator()(const relation_base & _r) override { | ||||
|             karr_relation const& r = get(_r); | ||||
|             karr_relation_plugin& p = r.get_plugin(); | ||||
|             karr_relation* result = dynamic_cast<karr_relation*>(p.mk_full(0, get_result_signature()));             | ||||
|  | @ -559,7 +559,7 @@ namespace datalog { | |||
|         rename_fn(karr_relation_plugin& p, const relation_signature & orig_sig, unsigned cycle_len, const unsigned * cycle)  | ||||
|             : convenient_relation_rename_fn(orig_sig, cycle_len, cycle) {} | ||||
| 
 | ||||
|         virtual relation_base * operator()(const relation_base & _r) { | ||||
|         relation_base * operator()(const relation_base & _r) override { | ||||
|             karr_relation const& r = get(_r); | ||||
|             karr_relation_plugin& p = r.get_plugin(); | ||||
|             karr_relation* result = dynamic_cast<karr_relation*>(p.mk_full(0, get_result_signature())); | ||||
|  | @ -676,7 +676,7 @@ namespace datalog { | |||
|     public: | ||||
|         union_fn() {} | ||||
| 
 | ||||
|         virtual void operator()(relation_base & _r, const relation_base & _src, relation_base * _delta) { | ||||
|         void operator()(relation_base & _r, const relation_base & _src, relation_base * _delta) override { | ||||
| 
 | ||||
|             karr_relation& r = get(_r); | ||||
|             karr_relation const& src = get(_src); | ||||
|  | @ -707,7 +707,7 @@ namespace datalog { | |||
|         filter_identical_fn(unsigned col_cnt, const unsigned * identical_cols)  | ||||
|             : m_identical_cols(col_cnt, identical_cols) {} | ||||
| 
 | ||||
|         virtual void operator()(relation_base & _r) { | ||||
|         void operator()(relation_base & _r) override { | ||||
|             karr_relation & r = get(_r); | ||||
|             TRACE("dl", r.display(tout << "src:\n");); | ||||
|             r.get_ineqs(); | ||||
|  | @ -747,7 +747,7 @@ namespace datalog { | |||
|             m_valid = arith.is_numeral(value, m_value) && m_value.is_int(); | ||||
|         } | ||||
| 
 | ||||
|         virtual void operator()(relation_base & _r) { | ||||
|         void operator()(relation_base & _r) override { | ||||
|             karr_relation & r = get(_r); | ||||
|             if (m_valid) { | ||||
|                 r.get_ineqs(); | ||||
|  | @ -779,7 +779,7 @@ namespace datalog { | |||
|             m_cond(cond, t.get_plugin().get_ast_manager()) { | ||||
|         } | ||||
| 
 | ||||
|         void operator()(relation_base& t) { | ||||
|         void operator()(relation_base& t) override { | ||||
|             get(t).filter_interpreted(m_cond); | ||||
|             TRACE("dl", tout << mk_pp(m_cond, m_cond.get_manager()) << "\n"; t.display(tout);); | ||||
|         } | ||||
|  |  | |||
|  | @ -45,33 +45,33 @@ namespace datalog { | |||
|             a(get_ast_manager()) | ||||
|         {}             | ||||
|          | ||||
|         virtual bool can_handle_signature(const relation_signature & sig) { | ||||
|         bool can_handle_signature(const relation_signature & sig) override { | ||||
|             return get_manager().get_context().karr(); | ||||
|         } | ||||
| 
 | ||||
|         static symbol get_name() { return symbol("karr_relation"); } | ||||
| 
 | ||||
|         virtual relation_base * mk_empty(const relation_signature & s); | ||||
|         relation_base * mk_empty(const relation_signature & s) override; | ||||
| 
 | ||||
|         virtual relation_base * mk_full(func_decl* p, const relation_signature & s); | ||||
|         relation_base * mk_full(func_decl* p, const relation_signature & s) override; | ||||
| 
 | ||||
|         static karr_relation& get(relation_base& r); | ||||
|         static karr_relation const & get(relation_base const& r);    | ||||
| 
 | ||||
|         virtual relation_join_fn * mk_join_fn( | ||||
|             const relation_base & t1, const relation_base & t2,  | ||||
|             unsigned col_cnt, const unsigned * cols1, const unsigned * cols2); | ||||
|         virtual relation_transformer_fn * mk_project_fn(const relation_base & t, unsigned col_cnt,  | ||||
|             const unsigned * removed_cols); | ||||
|         virtual relation_transformer_fn * mk_rename_fn(const relation_base & t, unsigned permutation_cycle_len,  | ||||
|             const unsigned * permutation_cycle); | ||||
|         virtual relation_union_fn * mk_union_fn(const relation_base & tgt, const relation_base & src,  | ||||
|             const relation_base * delta); | ||||
|         virtual relation_mutator_fn * mk_filter_identical_fn(const relation_base & t, unsigned col_cnt,  | ||||
|             const unsigned * identical_cols); | ||||
|         virtual relation_mutator_fn * mk_filter_equal_fn(const relation_base & t, const relation_element & value,  | ||||
|             unsigned col); | ||||
|         virtual relation_mutator_fn * mk_filter_interpreted_fn(const relation_base & t, app * condition); | ||||
|         relation_join_fn * mk_join_fn( | ||||
|             const relation_base & t1, const relation_base & t2, | ||||
|             unsigned col_cnt, const unsigned * cols1, const unsigned * cols2) override; | ||||
|         relation_transformer_fn * mk_project_fn(const relation_base & t, unsigned col_cnt, | ||||
|             const unsigned * removed_cols) override; | ||||
|         relation_transformer_fn * mk_rename_fn(const relation_base & t, unsigned permutation_cycle_len, | ||||
|             const unsigned * permutation_cycle) override; | ||||
|         relation_union_fn * mk_union_fn(const relation_base & tgt, const relation_base & src, | ||||
|             const relation_base * delta) override; | ||||
|         relation_mutator_fn * mk_filter_identical_fn(const relation_base & t, unsigned col_cnt, | ||||
|             const unsigned * identical_cols) override; | ||||
|         relation_mutator_fn * mk_filter_equal_fn(const relation_base & t, const relation_element & value, | ||||
|             unsigned col) override; | ||||
|         relation_mutator_fn * mk_filter_interpreted_fn(const relation_base & t, app * condition) override; | ||||
| 
 | ||||
|     private: | ||||
|         bool dualizeI(matrix& dst, matrix const& src); | ||||
|  |  | |||
|  | @ -56,72 +56,72 @@ namespace datalog { | |||
|     public: | ||||
|         rel_context(context& ctx); | ||||
| 
 | ||||
|         virtual ~rel_context(); | ||||
|         ~rel_context() override; | ||||
| 
 | ||||
|         virtual relation_manager & get_rmanager(); | ||||
|         virtual const relation_manager & get_rmanager() const; | ||||
|         relation_manager & get_rmanager() override; | ||||
|         const relation_manager & get_rmanager() const override; | ||||
|         ast_manager& get_manager() const { return m; } | ||||
|         context&     get_context() const { return m_context; } | ||||
|         virtual relation_base & get_relation(func_decl * pred);  | ||||
|         virtual relation_base * try_get_relation(func_decl * pred) const;  | ||||
|         virtual bool is_empty_relation(func_decl* pred) const; | ||||
|         virtual expr_ref try_get_formula(func_decl * pred) const; | ||||
|         virtual expr_ref get_answer() { return m_answer; } | ||||
|         relation_base & get_relation(func_decl * pred) override; | ||||
|         relation_base * try_get_relation(func_decl * pred) const override; | ||||
|         bool is_empty_relation(func_decl* pred) const override; | ||||
|         expr_ref try_get_formula(func_decl * pred) const override; | ||||
|         expr_ref get_answer() override { return m_answer; } | ||||
| 
 | ||||
|         virtual bool output_profile() const; | ||||
|         bool output_profile() const override; | ||||
| 
 | ||||
|         virtual lbool query(expr* q); | ||||
|         virtual lbool query(unsigned num_rels, func_decl * const* rels); | ||||
|         lbool query(expr* q) override; | ||||
|         lbool query(unsigned num_rels, func_decl * const* rels) override; | ||||
| 
 | ||||
|         virtual void set_predicate_representation(func_decl * pred, unsigned relation_name_cnt,  | ||||
|                                           symbol const * relation_names); | ||||
|         void set_predicate_representation(func_decl * pred, unsigned relation_name_cnt,  | ||||
|                                           symbol const * relation_names) override; | ||||
|          | ||||
|         virtual void inherit_predicate_kind(func_decl* new_pred, func_decl* orig_pred); | ||||
|         void inherit_predicate_kind(func_decl* new_pred, func_decl* orig_pred) override; | ||||
| 
 | ||||
|         virtual void collect_statistics(statistics& st) const; | ||||
|         void collect_statistics(statistics& st) const override; | ||||
| 
 | ||||
|         virtual void updt_params(); | ||||
|         void updt_params() override; | ||||
| 
 | ||||
|         /**
 | ||||
|            \brief Restrict the set of used predicates to \c res. | ||||
| 
 | ||||
|            The function deallocates unsused relations, it does not deal with rules. | ||||
|          */ | ||||
|         virtual void restrict_predicates(func_decl_set const& predicates); | ||||
|         void restrict_predicates(func_decl_set const& predicates) override; | ||||
| 
 | ||||
|         virtual void transform_rules(); | ||||
|         void transform_rules() override; | ||||
| 
 | ||||
|         virtual bool try_get_size(func_decl* pred, unsigned& rel_size) const; | ||||
|         bool try_get_size(func_decl* pred, unsigned& rel_size) const override; | ||||
|         /**
 | ||||
|            \brief query result if it contains fact. | ||||
|          */ | ||||
|         virtual bool result_contains_fact(relation_fact const& f); | ||||
|         bool result_contains_fact(relation_fact const& f) override; | ||||
| 
 | ||||
|         virtual void collect_non_empty_predicates(func_decl_set& ps) { | ||||
|         void collect_non_empty_predicates(func_decl_set& ps) override { | ||||
|             return get_rmanager().collect_non_empty_predicates(ps); | ||||
|         } | ||||
| 
 | ||||
|         /** \brief add facts to relation
 | ||||
|         */ | ||||
|         virtual void add_fact(func_decl* pred, relation_fact const& fact); | ||||
|         virtual void add_fact(func_decl* pred, table_fact const& fact); | ||||
|         void add_fact(func_decl* pred, relation_fact const& fact) override; | ||||
|         void add_fact(func_decl* pred, table_fact const& fact) override; | ||||
| 
 | ||||
|         /** \brief check if facts were added to relation
 | ||||
|         */ | ||||
|         virtual bool has_facts(func_decl * pred) const; | ||||
|         bool has_facts(func_decl * pred) const override; | ||||
|          | ||||
|         /**
 | ||||
|            \brief Store the relation \c rel under the predicate \c pred. The \c context object | ||||
|            takes over the ownership of the relation object. | ||||
|         */ | ||||
|         virtual void store_relation(func_decl * pred, relation_base * rel); | ||||
|         void store_relation(func_decl * pred, relation_base * rel) override; | ||||
| 
 | ||||
|         virtual void display_output_facts(rule_set const& rules, std::ostream & out) const; | ||||
|         virtual void display_facts(std::ostream & out) const; | ||||
|         void display_output_facts(rule_set const& rules, std::ostream & out) const override; | ||||
|         void display_facts(std::ostream & out) const override; | ||||
| 
 | ||||
|         virtual void display_profile(std::ostream& out); | ||||
|         void display_profile(std::ostream& out) override; | ||||
| 
 | ||||
|         virtual lbool saturate(); | ||||
|         lbool saturate() override; | ||||
| 
 | ||||
|     }; | ||||
| }; | ||||
|  |  | |||
|  | @ -328,7 +328,7 @@ namespace datalog { | |||
|             t2.expand_column_vector(m_cols2); | ||||
|         } | ||||
| 
 | ||||
|         virtual relation_base * operator()(const relation_base & _r1, const relation_base & _r2) { | ||||
|         relation_base * operator()(const relation_base & _r1, const relation_base & _r2) override { | ||||
|             udoc_relation const& r1 = get(_r1); | ||||
|             udoc_relation const& r2 = get(_r2); | ||||
|             TRACE("doc", r1.display(tout << "r1:\n"); r2.display(tout  << "r2:\n");); | ||||
|  | @ -369,7 +369,7 @@ namespace datalog { | |||
|             } | ||||
|         } | ||||
| 
 | ||||
|         virtual relation_base * operator()(const relation_base & tb) { | ||||
|         relation_base * operator()(const relation_base & tb) override { | ||||
|             TRACE("doc", tb.display(tout << "src:\n");); | ||||
|             udoc_relation const& t = get(tb); | ||||
|             udoc_plugin& p = t.get_plugin(); | ||||
|  | @ -462,7 +462,7 @@ namespace datalog { | |||
|             } | ||||
|         } | ||||
| 
 | ||||
|         virtual relation_base * operator()(const relation_base & _r) { | ||||
|         relation_base * operator()(const relation_base & _r) override { | ||||
|             udoc_relation const& r = get(_r); | ||||
|             TRACE("doc", r.display(tout << "r:\n");); | ||||
|             udoc_plugin& p = r.get_plugin();             | ||||
|  | @ -494,7 +494,7 @@ namespace datalog { | |||
|     public: | ||||
|         union_fn() {} | ||||
| 
 | ||||
|         virtual void operator()(relation_base & _r, const relation_base & _src, relation_base * _delta) { | ||||
|         void operator()(relation_base & _r, const relation_base & _src, relation_base * _delta) override { | ||||
|             TRACE("doc", _r.display(tout << "dst:\n"); _src.display(tout  << "src:\n");); | ||||
|             udoc_relation& r = get(_r); | ||||
|             udoc_relation const& src = get(_src); | ||||
|  | @ -574,7 +574,7 @@ namespace datalog { | |||
|             } | ||||
|         } | ||||
|          | ||||
|         virtual void operator()(relation_base & _r) { | ||||
|         void operator()(relation_base & _r) override { | ||||
|             udoc_relation& r = get(_r); | ||||
|             udoc& d = r.get_udoc(); | ||||
|             doc_manager& dm = r.get_dm(); | ||||
|  | @ -602,10 +602,10 @@ namespace datalog { | |||
|             SASSERT(num_bits == hi - lo); | ||||
|             dm.tbvm().set(m_filter->pos(), r, hi-1, lo); | ||||
|         } | ||||
|         virtual ~filter_equal_fn() { | ||||
|         ~filter_equal_fn() override { | ||||
|             dm.deallocate(m_filter); | ||||
|         }         | ||||
|         virtual void operator()(relation_base & tb) { | ||||
|         void operator()(relation_base & tb) override { | ||||
|             udoc_relation & t = get(tb); | ||||
|             t.get_udoc().intersect(dm, *m_filter); | ||||
|             SASSERT(t.get_udoc().well_formed(t.get_dm())); | ||||
|  | @ -932,11 +932,11 @@ namespace datalog { | |||
|                   m_udoc.display(dm, tout) << "\n";); | ||||
|         } | ||||
| 
 | ||||
|         virtual ~filter_interpreted_fn() { | ||||
|         ~filter_interpreted_fn() override { | ||||
|             m_udoc.reset(dm); | ||||
|         } | ||||
|          | ||||
|         virtual void operator()(relation_base & tb) {             | ||||
|         void operator()(relation_base & tb) override { | ||||
|             udoc_relation & t = get(tb); | ||||
|             udoc& u = t.get_udoc(); | ||||
|             SASSERT(u.well_formed(dm)); | ||||
|  | @ -987,7 +987,7 @@ namespace datalog { | |||
| 
 | ||||
| 
 | ||||
|         // TBD: replace this by "join" given below.
 | ||||
|         virtual relation_base* operator()(relation_base const& t1, relation_base const& t2) { | ||||
|         relation_base* operator()(relation_base const& t1, relation_base const& t2) override { | ||||
| #if 1 | ||||
|             return join(get(t1), get(t2)); | ||||
| #else | ||||
|  | @ -1043,7 +1043,7 @@ namespace datalog { | |||
|     public: | ||||
|       join_project_and_fn() {} | ||||
| 
 | ||||
|       virtual relation_base* operator()(relation_base const& t1, relation_base const& t2) { | ||||
|       relation_base* operator()(relation_base const& t1, relation_base const& t2) override { | ||||
|           udoc_relation *result = get(t1.clone()); | ||||
|           result->get_udoc().intersect(result->get_dm(), get(t2).get_udoc()); | ||||
|           return result; | ||||
|  | @ -1121,7 +1121,7 @@ namespace datalog { | |||
|             neg.expand_column_vector(m_neg_cols); | ||||
|         } | ||||
|          | ||||
|         virtual void operator()(relation_base& tb, const relation_base& negb) { | ||||
|         void operator()(relation_base& tb, const relation_base& negb) override { | ||||
|             udoc_relation& t = get(tb); | ||||
|             udoc_relation const& n = get(negb); | ||||
|             IF_VERBOSE(3, t.display(verbose_stream() << "dst:");); | ||||
|  | @ -1223,10 +1223,10 @@ namespace datalog { | |||
|             t.compile_guard(guard, m_udoc, m_to_delete); | ||||
|         } | ||||
|          | ||||
|         virtual ~filter_proj_fn() { | ||||
|         ~filter_proj_fn() override { | ||||
|             m_udoc.reset(dm); | ||||
|         } | ||||
|         virtual relation_base* operator()(const relation_base & tb) { | ||||
|         relation_base* operator()(const relation_base & tb) override { | ||||
|             udoc_relation const & t = get(tb); | ||||
|             udoc const& u1 = t.get_udoc(); | ||||
|             doc_manager& dm = t.get_dm(); | ||||
|  |  | |||
|  | @ -39,21 +39,21 @@ namespace datalog { | |||
|         expr_ref to_formula(doc const& d) const; | ||||
|     public: | ||||
|         udoc_relation(udoc_plugin& p, relation_signature const& s); | ||||
|         virtual ~udoc_relation(); | ||||
|         virtual void reset(); | ||||
|         virtual void add_fact(const relation_fact & f); | ||||
|         virtual void add_new_fact(const relation_fact & f); | ||||
|         virtual bool contains_fact(const relation_fact & f) const; | ||||
|         virtual udoc_relation * clone() const; | ||||
|         virtual udoc_relation * complement(func_decl*) const; | ||||
|         virtual void to_formula(expr_ref& fml) const; | ||||
|         ~udoc_relation() override; | ||||
|         void reset() override; | ||||
|         void add_fact(const relation_fact & f) override; | ||||
|         void add_new_fact(const relation_fact & f) override; | ||||
|         bool contains_fact(const relation_fact & f) const override; | ||||
|         udoc_relation * clone() const override; | ||||
|         udoc_relation * complement(func_decl*) const override; | ||||
|         void to_formula(expr_ref& fml) const override; | ||||
|         udoc_plugin& get_plugin() const;  | ||||
|         virtual bool fast_empty() const { return m_elems.is_empty(); } | ||||
|         virtual bool empty() const;  | ||||
|         virtual void display(std::ostream& out) const; | ||||
|         virtual bool is_precise() const { return true; } | ||||
|         virtual unsigned get_size_estimate_rows() const { return m_elems.size(); } | ||||
|         virtual unsigned get_size_estimate_bytes() const; | ||||
|         bool fast_empty() const override { return m_elems.is_empty(); } | ||||
|         bool empty() const override; | ||||
|         void display(std::ostream& out) const override; | ||||
|         bool is_precise() const override { return true; } | ||||
|         unsigned get_size_estimate_rows() const override { return m_elems.size(); } | ||||
|         unsigned get_size_estimate_bytes() const override; | ||||
| 
 | ||||
|         doc_manager& get_dm() const { return dm; } | ||||
|         udoc const& get_udoc() const { return m_elems; } | ||||
|  | @ -113,38 +113,38 @@ namespace datalog { | |||
|         expr* mk_numeral(rational const& r, sort* s); | ||||
|     public: | ||||
|         udoc_plugin(relation_manager& rm); | ||||
|         ~udoc_plugin(); | ||||
|         virtual bool can_handle_signature(const relation_signature & s); | ||||
|         ~udoc_plugin() override; | ||||
|         bool can_handle_signature(const relation_signature & s) override; | ||||
|         static symbol get_name() { return symbol("doc"); } | ||||
|         virtual relation_base * mk_empty(const relation_signature & s); | ||||
|         virtual relation_base * mk_full(func_decl* p, const relation_signature & s); | ||||
|         virtual relation_join_fn * mk_join_fn(const relation_base & t1, const relation_base & t2, | ||||
|             unsigned col_cnt, const unsigned * cols1, const unsigned * cols2); | ||||
|         virtual relation_transformer_fn * mk_project_fn(const relation_base & t, unsigned col_cnt,  | ||||
|             const unsigned * removed_cols); | ||||
|         virtual relation_transformer_fn * mk_rename_fn(const relation_base & t, unsigned permutation_cycle_len,  | ||||
|             const unsigned * permutation_cycle); | ||||
|         virtual relation_union_fn * mk_union_fn(const relation_base & tgt, const relation_base & src,  | ||||
|             const relation_base * delta); | ||||
|         virtual relation_union_fn * mk_widen_fn(const relation_base & tgt, const relation_base & src,  | ||||
|             const relation_base * delta); | ||||
|         virtual relation_mutator_fn * mk_filter_identical_fn(const relation_base & t, unsigned col_cnt,  | ||||
|             const unsigned * identical_cols); | ||||
|         virtual relation_mutator_fn * mk_filter_equal_fn(const relation_base & t, const relation_element & value,  | ||||
|             unsigned col); | ||||
|         virtual relation_mutator_fn * mk_filter_interpreted_fn(const relation_base & t, app * condition); | ||||
|         virtual relation_intersection_filter_fn * mk_filter_by_negation_fn( | ||||
|         relation_base * mk_empty(const relation_signature & s) override; | ||||
|         relation_base * mk_full(func_decl* p, const relation_signature & s) override; | ||||
|         relation_join_fn * mk_join_fn(const relation_base & t1, const relation_base & t2, | ||||
|             unsigned col_cnt, const unsigned * cols1, const unsigned * cols2) override; | ||||
|         relation_transformer_fn * mk_project_fn(const relation_base & t, unsigned col_cnt, | ||||
|             const unsigned * removed_cols) override; | ||||
|         relation_transformer_fn * mk_rename_fn(const relation_base & t, unsigned permutation_cycle_len, | ||||
|             const unsigned * permutation_cycle) override; | ||||
|         relation_union_fn * mk_union_fn(const relation_base & tgt, const relation_base & src, | ||||
|             const relation_base * delta) override; | ||||
|         relation_union_fn * mk_widen_fn(const relation_base & tgt, const relation_base & src, | ||||
|             const relation_base * delta) override; | ||||
|         relation_mutator_fn * mk_filter_identical_fn(const relation_base & t, unsigned col_cnt, | ||||
|             const unsigned * identical_cols) override; | ||||
|         relation_mutator_fn * mk_filter_equal_fn(const relation_base & t, const relation_element & value, | ||||
|             unsigned col) override; | ||||
|         relation_mutator_fn * mk_filter_interpreted_fn(const relation_base & t, app * condition) override; | ||||
|         relation_intersection_filter_fn * mk_filter_by_negation_fn( | ||||
|             const relation_base& t, | ||||
|             const relation_base& neg, unsigned joined_col_cnt, const unsigned *t_cols, | ||||
|             const unsigned *negated_cols); | ||||
|         virtual relation_transformer_fn * mk_filter_interpreted_and_project_fn( | ||||
|             const unsigned *negated_cols) override; | ||||
|         relation_transformer_fn * mk_filter_interpreted_and_project_fn( | ||||
|             const relation_base & t, app * condition, | ||||
|             unsigned removed_col_cnt, const unsigned * removed_cols); | ||||
|         virtual relation_join_fn * mk_join_project_fn( | ||||
|             unsigned removed_col_cnt, const unsigned * removed_cols) override; | ||||
|         relation_join_fn * mk_join_project_fn( | ||||
|             relation_base const& t1, relation_base const& t2, | ||||
|             unsigned joined_col_cnt, const unsigned * cols1, const unsigned * cols2,  | ||||
|             unsigned removed_col_cnt, const unsigned * removed_cols); | ||||
|               | ||||
|             unsigned joined_col_cnt, const unsigned * cols1, const unsigned * cols2, | ||||
|             unsigned removed_col_cnt, const unsigned * removed_cols) override; | ||||
| 
 | ||||
|         void disable_fast_pass() { m_disable_fast_pass = true; } | ||||
|     }; | ||||
| }; | ||||
|  |  | |||
|  | @ -45,39 +45,39 @@ class dl_interface : public datalog::engine_base { | |||
| 
 | ||||
| public: | ||||
|     dl_interface(datalog::context& ctx); | ||||
|     ~dl_interface(); | ||||
|     ~dl_interface() override; | ||||
| 
 | ||||
|     lbool query(expr* query); | ||||
|     lbool query(expr* query) override; | ||||
| 
 | ||||
|     lbool query_from_lvl(expr* query, unsigned lvl); | ||||
|     lbool query_from_lvl(expr* query, unsigned lvl) override; | ||||
| 
 | ||||
|     void display_certificate(std::ostream& out) const; | ||||
|     void display_certificate(std::ostream& out) const override; | ||||
| 
 | ||||
|     void collect_statistics(statistics& st) const; | ||||
|     void collect_statistics(statistics& st) const override; | ||||
| 
 | ||||
|     void reset_statistics(); | ||||
|     void reset_statistics() override; | ||||
| 
 | ||||
|     expr_ref get_answer(); | ||||
|     expr_ref get_answer() override; | ||||
| 
 | ||||
|     expr_ref get_ground_sat_answer(); | ||||
|     expr_ref get_ground_sat_answer() override; | ||||
| 
 | ||||
|     void get_rules_along_trace(datalog::rule_ref_vector& rules); | ||||
|     void get_rules_along_trace(datalog::rule_ref_vector& rules) override; | ||||
| 
 | ||||
|     unsigned get_num_levels(func_decl* pred); | ||||
|     unsigned get_num_levels(func_decl* pred) override; | ||||
| 
 | ||||
|     expr_ref get_cover_delta(int level, func_decl* pred); | ||||
|     expr_ref get_cover_delta(int level, func_decl* pred) override; | ||||
| 
 | ||||
|     void add_cover(int level, func_decl* pred, expr* property); | ||||
|     void add_cover(int level, func_decl* pred, expr* property) override; | ||||
| 
 | ||||
|     void add_invariant(func_decl* pred, expr* property); | ||||
|     void add_invariant(func_decl* pred, expr* property) override; | ||||
| 
 | ||||
|     expr_ref get_reachable(func_decl *pred); | ||||
|     expr_ref get_reachable(func_decl *pred) override; | ||||
| 
 | ||||
|     void updt_params(); | ||||
|     void updt_params() override; | ||||
| 
 | ||||
|     model_ref get_model(); | ||||
|     model_ref get_model() override; | ||||
| 
 | ||||
|     proof_ref get_proof(); | ||||
|     proof_ref get_proof() override; | ||||
| 
 | ||||
| }; | ||||
| } | ||||
|  |  | |||
|  | @ -30,8 +30,8 @@ namespace spacer { | |||
| class lemma_sanity_checker : public lemma_generalizer { | ||||
| public: | ||||
|     lemma_sanity_checker(context& ctx) : lemma_generalizer(ctx) {} | ||||
|     virtual ~lemma_sanity_checker() {} | ||||
|     virtual void operator()(lemma_ref &lemma); | ||||
|     ~lemma_sanity_checker() override {} | ||||
|     void operator()(lemma_ref &lemma) override; | ||||
| }; | ||||
| 
 | ||||
| /**
 | ||||
|  | @ -53,11 +53,11 @@ class lemma_bool_inductive_generalizer : public lemma_generalizer { | |||
| public: | ||||
|     lemma_bool_inductive_generalizer(context& ctx, unsigned failure_limit) : | ||||
|         lemma_generalizer(ctx), m_failure_limit(failure_limit) {} | ||||
|     virtual ~lemma_bool_inductive_generalizer() {} | ||||
|     virtual void operator()(lemma_ref &lemma); | ||||
|     ~lemma_bool_inductive_generalizer() override {} | ||||
|     void operator()(lemma_ref &lemma) override; | ||||
| 
 | ||||
|     virtual void collect_statistics(statistics& st) const; | ||||
|     virtual void reset_statistics() {m_st.reset();} | ||||
|     void collect_statistics(statistics& st) const override; | ||||
|     void reset_statistics() override {m_st.reset();} | ||||
| }; | ||||
| 
 | ||||
| class unsat_core_generalizer : public lemma_generalizer { | ||||
|  | @ -72,26 +72,26 @@ class unsat_core_generalizer : public lemma_generalizer { | |||
|     stats m_st; | ||||
| public: | ||||
|     unsat_core_generalizer(context &ctx) : lemma_generalizer(ctx) {} | ||||
|     virtual ~unsat_core_generalizer() {} | ||||
|     virtual void operator()(lemma_ref &lemma); | ||||
|     ~unsat_core_generalizer() override {} | ||||
|     void operator()(lemma_ref &lemma) override; | ||||
| 
 | ||||
|     virtual void collect_statistics(statistics &st) const; | ||||
|     virtual void reset_statistics() {m_st.reset();} | ||||
|     void collect_statistics(statistics &st) const override; | ||||
|     void reset_statistics() override {m_st.reset();} | ||||
| }; | ||||
| 
 | ||||
| class lemma_array_eq_generalizer : public lemma_generalizer { | ||||
| public: | ||||
|     lemma_array_eq_generalizer(context &ctx) : lemma_generalizer(ctx) {} | ||||
|     virtual ~lemma_array_eq_generalizer() {} | ||||
|     virtual void operator()(lemma_ref &lemma); | ||||
|     ~lemma_array_eq_generalizer() override {} | ||||
|     void operator()(lemma_ref &lemma) override; | ||||
| 
 | ||||
| }; | ||||
| 
 | ||||
| class lemma_eq_generalizer : public lemma_generalizer { | ||||
| public: | ||||
|     lemma_eq_generalizer(context &ctx) : lemma_generalizer(ctx) {} | ||||
|     virtual ~lemma_eq_generalizer() {} | ||||
|     virtual void operator()(lemma_ref &lemma); | ||||
|     ~lemma_eq_generalizer() override {} | ||||
|     void operator()(lemma_ref &lemma) override; | ||||
| }; | ||||
| 
 | ||||
| 
 | ||||
|  |  | |||
|  | @ -86,10 +86,10 @@ public: | |||
|         m_farkas_a_const(farkas_a_const) | ||||
|     {} | ||||
| 
 | ||||
|     virtual ~itp_solver() {} | ||||
|     ~itp_solver() override {} | ||||
| 
 | ||||
|     /* itp solver specific */ | ||||
|     virtual void get_unsat_core(expr_ref_vector &core); | ||||
|     void get_unsat_core(expr_ref_vector &core) override; | ||||
|     virtual void get_itp_core(expr_ref_vector &core); | ||||
|     void set_split_literals(bool v) {m_split_literals = v;} | ||||
|     bool mk_proxies(expr_ref_vector &v, unsigned from = 0); | ||||
|  | @ -104,53 +104,53 @@ public: | |||
| 
 | ||||
|     /* solver interface */ | ||||
| 
 | ||||
|     virtual solver* translate(ast_manager &m, params_ref const &p) | ||||
|     solver* translate(ast_manager &m, params_ref const &p) override | ||||
|     {return m_solver.translate(m, p);} | ||||
|     virtual void updt_params(params_ref const &p) | ||||
|     void updt_params(params_ref const &p) override | ||||
|     {m_solver.updt_params(p);} | ||||
|     virtual void collect_param_descrs(param_descrs &r) | ||||
|     void collect_param_descrs(param_descrs &r) override | ||||
|     {m_solver.collect_param_descrs(r);} | ||||
|     virtual void set_produce_models(bool f) | ||||
|     void set_produce_models(bool f) override | ||||
|     {m_solver.set_produce_models(f);} | ||||
|     virtual void assert_expr(expr *t) | ||||
|     void assert_expr(expr *t) override | ||||
|     {m_solver.assert_expr(t);} | ||||
| 
 | ||||
|     virtual void assert_expr(expr *t, expr *a) | ||||
|     void assert_expr(expr *t, expr *a) override | ||||
|     {NOT_IMPLEMENTED_YET();} | ||||
| 
 | ||||
|     virtual void push(); | ||||
|     virtual void pop(unsigned n); | ||||
|     virtual unsigned get_scope_level() const | ||||
|     void push() override; | ||||
|     void pop(unsigned n) override; | ||||
|     unsigned get_scope_level() const override | ||||
|     {return m_solver.get_scope_level();} | ||||
| 
 | ||||
|     virtual lbool check_sat(unsigned num_assumptions, expr * const *assumptions); | ||||
|     virtual void set_progress_callback(progress_callback *callback) | ||||
|     lbool check_sat(unsigned num_assumptions, expr * const *assumptions) override; | ||||
|     void set_progress_callback(progress_callback *callback) override | ||||
|     {m_solver.set_progress_callback(callback);} | ||||
|     virtual unsigned get_num_assertions() const | ||||
|     unsigned get_num_assertions() const override | ||||
|     {return m_solver.get_num_assertions();} | ||||
|     virtual expr * get_assertion(unsigned idx) const | ||||
|     expr * get_assertion(unsigned idx) const override | ||||
|     {return m_solver.get_assertion(idx);} | ||||
|     virtual unsigned get_num_assumptions() const | ||||
|     unsigned get_num_assumptions() const override | ||||
|     {return m_solver.get_num_assumptions();} | ||||
|     virtual expr * get_assumption(unsigned idx) const | ||||
|     expr * get_assumption(unsigned idx) const override | ||||
|     {return m_solver.get_assumption(idx);} | ||||
|     virtual std::ostream &display(std::ostream &out, unsigned n, expr* const* es) const | ||||
|     std::ostream &display(std::ostream &out, unsigned n, expr* const* es) const override | ||||
|     { return m_solver.display(out, n, es); } | ||||
| 
 | ||||
|     /* check_sat_result interface */ | ||||
| 
 | ||||
|     virtual void collect_statistics(statistics &st) const ; | ||||
|     void collect_statistics(statistics &st) const override ; | ||||
|     virtual void reset_statistics(); | ||||
|     virtual void get_unsat_core(ptr_vector<expr> &r); | ||||
|     virtual void get_model(model_ref &m) {m_solver.get_model(m);} | ||||
|     virtual proof *get_proof() {return m_solver.get_proof();} | ||||
|     virtual std::string reason_unknown() const | ||||
|     void get_unsat_core(ptr_vector<expr> &r) override; | ||||
|     void get_model(model_ref &m) override {m_solver.get_model(m);} | ||||
|     proof *get_proof() override {return m_solver.get_proof();} | ||||
|     std::string reason_unknown() const override | ||||
|     {return m_solver.reason_unknown();} | ||||
|     virtual void set_reason_unknown(char const* msg) | ||||
|     void set_reason_unknown(char const* msg) override | ||||
|     {m_solver.set_reason_unknown(msg);} | ||||
|     virtual void get_labels(svector<symbol> &r) | ||||
|     void get_labels(svector<symbol> &r) override | ||||
|     {m_solver.get_labels(r);} | ||||
|     virtual ast_manager &get_manager() const {return m;} | ||||
|     ast_manager &get_manager() const override {return m;} | ||||
| 
 | ||||
|     virtual void refresh(); | ||||
| 
 | ||||
|  |  | |||
|  | @ -190,14 +190,14 @@ namespace qe { | |||
| 
 | ||||
|     class is_relevant_default : public i_expr_pred { | ||||
|     public: | ||||
|         bool operator()(expr* e) { | ||||
|         bool operator()(expr* e) override { | ||||
|             return true; | ||||
|         } | ||||
|     }; | ||||
| 
 | ||||
|     class mk_atom_default : public i_nnf_atom { | ||||
|     public: | ||||
|         virtual void operator()(expr* e, bool pol, expr_ref& result) { | ||||
|         void operator()(expr* e, bool pol, expr_ref& result) override { | ||||
|             if (pol) result = e; | ||||
|             else result = result.get_manager().mk_not(e); | ||||
|         } | ||||
|  |  | |||
|  | @ -43,7 +43,7 @@ class unsat_core_plugin_lemma : public unsat_core_plugin { | |||
| public: | ||||
|     unsat_core_plugin_lemma(unsat_core_learner& learner) : unsat_core_plugin(learner){}; | ||||
| 
 | ||||
|     virtual void compute_partial_core(proof* step) override; | ||||
|     void compute_partial_core(proof* step) override; | ||||
| 
 | ||||
| private: | ||||
|     void add_lowest_split_to_core(proof* step) const; | ||||
|  | @ -55,7 +55,7 @@ class unsat_core_plugin_farkas_lemma : public unsat_core_plugin { | |||
| public: | ||||
|     unsat_core_plugin_farkas_lemma(unsat_core_learner& learner, bool split_literals, bool use_constant_from_a=true) : unsat_core_plugin(learner), m_split_literals(split_literals), m_use_constant_from_a(use_constant_from_a) {}; | ||||
| 
 | ||||
|     virtual void compute_partial_core(proof* step) override; | ||||
|     void compute_partial_core(proof* step) override; | ||||
| 
 | ||||
| private: | ||||
|     bool m_split_literals; | ||||
|  | @ -71,8 +71,8 @@ private: | |||
|     public: | ||||
|         unsat_core_plugin_farkas_lemma_optimized(unsat_core_learner& learner, ast_manager& m) : unsat_core_plugin(learner), m(m) {}; | ||||
| 
 | ||||
|         virtual void compute_partial_core(proof* step) override; | ||||
|         virtual void finalize() override; | ||||
|         void compute_partial_core(proof* step) override; | ||||
|         void finalize() override; | ||||
| 
 | ||||
|     protected: | ||||
|         vector<vector<std::pair<app*, rational> > > m_linear_combinations; | ||||
|  | @ -88,7 +88,7 @@ private: | |||
|     public: | ||||
|         unsat_core_plugin_farkas_lemma_bounded(unsat_core_learner& learner, ast_manager& m) : unsat_core_plugin_farkas_lemma_optimized(learner, m) {}; | ||||
| 
 | ||||
|         virtual void finalize() override; | ||||
|         void finalize() override; | ||||
|     }; | ||||
| 
 | ||||
|     class unsat_core_plugin_min_cut : public unsat_core_plugin { | ||||
|  | @ -96,8 +96,8 @@ private: | |||
|     public: | ||||
|         unsat_core_plugin_min_cut(unsat_core_learner& learner, ast_manager& m); | ||||
| 
 | ||||
|         virtual void compute_partial_core(proof* step) override; | ||||
|         virtual void finalize() override; | ||||
|         void compute_partial_core(proof* step) override; | ||||
|         void finalize() override; | ||||
|     private: | ||||
|         ast_manager& m; | ||||
| 
 | ||||
|  |  | |||
|  | @ -65,46 +65,46 @@ private: | |||
|     void refresh(); | ||||
| 
 | ||||
| public: | ||||
|     virtual ~virtual_solver(); | ||||
|     virtual unsigned get_num_assumptions() const | ||||
|     ~virtual_solver() override; | ||||
|     unsigned get_num_assumptions() const override | ||||
|     { | ||||
|         unsigned sz = solver_na2as::get_num_assumptions(); | ||||
|         return m_virtual ? sz - 1 : sz; | ||||
|     } | ||||
|     virtual expr* get_assumption(unsigned idx) const | ||||
|     expr* get_assumption(unsigned idx) const override | ||||
|     { | ||||
|         if(m_virtual) { idx++; } | ||||
|         return solver_na2as::get_assumption(idx); | ||||
|     } | ||||
| 
 | ||||
|     virtual void get_unsat_core(ptr_vector<expr> &r); | ||||
|     virtual void assert_expr(expr *e); | ||||
|     virtual void collect_statistics(statistics &st) const {} | ||||
|     virtual void get_model(model_ref &m) {m_context.get_model(m);} | ||||
|     virtual proof* get_proof(); | ||||
|     virtual std::string reason_unknown() const | ||||
|     void get_unsat_core(ptr_vector<expr> &r) override; | ||||
|     void assert_expr(expr *e) override; | ||||
|     void collect_statistics(statistics &st) const override {} | ||||
|     void get_model(model_ref &m) override {m_context.get_model(m);} | ||||
|     proof* get_proof() override; | ||||
|     std::string reason_unknown() const override | ||||
|     {return m_context.last_failure_as_string();} | ||||
|     virtual void set_reason_unknown(char const *msg) | ||||
|     void set_reason_unknown(char const *msg) override | ||||
|     {m_context.set_reason_unknown(msg);} | ||||
|     virtual ast_manager& get_manager() const {return m;} | ||||
|     virtual void get_labels(svector<symbol> &r); | ||||
|     virtual void set_produce_models(bool f); | ||||
|     ast_manager& get_manager() const override {return m;} | ||||
|     void get_labels(svector<symbol> &r) override; | ||||
|     void set_produce_models(bool f) override; | ||||
|     virtual bool get_produce_models(); | ||||
|     virtual smt_params &fparams(); | ||||
|     virtual void reset(); | ||||
|     virtual void set_progress_callback(progress_callback *callback) | ||||
|     void set_progress_callback(progress_callback *callback) override | ||||
|     {UNREACHABLE();} | ||||
| 
 | ||||
|     virtual solver *translate(ast_manager &m, params_ref const &p); | ||||
|     solver *translate(ast_manager &m, params_ref const &p) override; | ||||
| 
 | ||||
|     virtual void updt_params(params_ref const &p); | ||||
|     virtual void collect_param_descrs(param_descrs &r); | ||||
|     void updt_params(params_ref const &p) override; | ||||
|     void collect_param_descrs(param_descrs &r) override; | ||||
| 
 | ||||
| 
 | ||||
| protected: | ||||
|     virtual lbool check_sat_core(unsigned num_assumptions, expr *const * assumptions); | ||||
|     virtual void push_core(); | ||||
|     virtual void pop_core(unsigned n); | ||||
|     lbool check_sat_core(unsigned num_assumptions, expr *const * assumptions) override; | ||||
|     void push_core() override; | ||||
|     void pop_core(unsigned n) override; | ||||
| }; | ||||
| 
 | ||||
| /// multi-solver abstraction on top of a single smt::kernel
 | ||||
|  |  | |||
|  | @ -32,13 +32,13 @@ namespace datalog { | |||
|         imp* m_imp; | ||||
|     public: | ||||
|         tab(context& ctx); | ||||
|         ~tab(); | ||||
|         virtual lbool query(expr* query); | ||||
|         virtual void cleanup(); | ||||
|         virtual void reset_statistics(); | ||||
|         virtual void collect_statistics(statistics& st) const; | ||||
|         virtual void display_certificate(std::ostream& out) const;         | ||||
|         virtual expr_ref get_answer(); | ||||
|         ~tab() override; | ||||
|         lbool query(expr* query) override; | ||||
|         void cleanup() override; | ||||
|         void reset_statistics() override; | ||||
|         void collect_statistics(statistics& st) const override; | ||||
|         void display_certificate(std::ostream& out) const override; | ||||
|         expr_ref get_answer() override; | ||||
|     }; | ||||
| }; | ||||
| 
 | ||||
|  |  | |||
|  | @ -66,9 +66,9 @@ namespace datalog { | |||
|         */ | ||||
|         mk_array_blast(context & ctx, unsigned priority); | ||||
| 
 | ||||
|         virtual ~mk_array_blast(); | ||||
|         ~mk_array_blast() override; | ||||
|          | ||||
|         rule_set * operator()(rule_set const & source); | ||||
|         rule_set * operator()(rule_set const & source) override; | ||||
| 
 | ||||
|     }; | ||||
| 
 | ||||
|  |  | |||
|  | @ -40,8 +40,8 @@ namespace datalog { | |||
| 
 | ||||
|      public: | ||||
|         mk_array_eq_rewrite(context & ctx, unsigned priority); | ||||
|         rule_set * operator()(rule_set const & source); | ||||
|         virtual ~mk_array_eq_rewrite(){} | ||||
|         rule_set * operator()(rule_set const & source) override; | ||||
|         ~mk_array_eq_rewrite() override{} | ||||
|     }; | ||||
| 
 | ||||
| 
 | ||||
|  |  | |||
|  | @ -112,8 +112,8 @@ namespace datalog { | |||
|        expr_ref_vector getId(app*old_pred, const expr_ref_vector& new_args); | ||||
|      public: | ||||
|         mk_array_instantiation(context & ctx, unsigned priority); | ||||
|         rule_set * operator()(rule_set const & source); | ||||
|         virtual ~mk_array_instantiation(){} | ||||
|         rule_set * operator()(rule_set const & source) override; | ||||
|         ~mk_array_instantiation() override{} | ||||
|     }; | ||||
| 
 | ||||
| 
 | ||||
|  |  | |||
|  | @ -28,8 +28,8 @@ namespace datalog { | |||
|         context&     m_ctx; | ||||
|     public: | ||||
|         mk_backwards(context & ctx, unsigned priority = 33000); | ||||
|         ~mk_backwards();         | ||||
|         rule_set * operator()(rule_set const & source); | ||||
|         ~mk_backwards() override; | ||||
|         rule_set * operator()(rule_set const & source) override; | ||||
|     }; | ||||
| 
 | ||||
| }; | ||||
|  |  | |||
|  | @ -59,11 +59,11 @@ namespace datalog { | |||
|             m_new_funcs.push_back(new_f); | ||||
|         } | ||||
| 
 | ||||
|         virtual model_converter * translate(ast_translation & translator) {  | ||||
|         model_converter * translate(ast_translation & translator) override { | ||||
|             return alloc(bit_blast_model_converter, m); | ||||
|         } | ||||
| 
 | ||||
|         virtual void operator()(model_ref & model) { | ||||
|         void operator()(model_ref & model) override { | ||||
|             for (unsigned i = 0; i < m_new_funcs.size(); ++i) { | ||||
|                 func_decl* p = m_new_funcs[i].get(); | ||||
|                 func_decl* q = m_old_funcs[i].get(); | ||||
|  |  | |||
|  | @ -28,8 +28,8 @@ namespace datalog { | |||
|         impl* m_impl; | ||||
|     public: | ||||
|         mk_bit_blast(context & ctx, unsigned priority = 35000); | ||||
|         ~mk_bit_blast();         | ||||
|         rule_set * operator()(rule_set const & source); | ||||
|         ~mk_bit_blast() override; | ||||
|         rule_set * operator()(rule_set const & source) override; | ||||
|     }; | ||||
| 
 | ||||
| }; | ||||
|  |  | |||
|  | @ -52,7 +52,7 @@ namespace datalog { | |||
|          */ | ||||
|         mk_coalesce(context & ctx); | ||||
|          | ||||
|         rule_set * operator()(rule_set const & source); | ||||
|         rule_set * operator()(rule_set const & source) override; | ||||
|     }; | ||||
| 
 | ||||
| }; | ||||
|  |  | |||
|  | @ -42,7 +42,7 @@ namespace datalog { | |||
|             m(ctx.get_manager()), | ||||
|             m_context(ctx) {} | ||||
| 
 | ||||
|         rule_set * operator()(rule_set const & source); | ||||
|         rule_set * operator()(rule_set const & source) override; | ||||
|     }; | ||||
| } | ||||
| 
 | ||||
|  |  | |||
|  | @ -73,11 +73,11 @@ namespace datalog { | |||
| 
 | ||||
|     public: | ||||
|         mk_filter_rules(context & ctx); | ||||
|         ~mk_filter_rules(); | ||||
|         ~mk_filter_rules() override; | ||||
|         /**
 | ||||
|            \brief Return a new rule set where only filter rules contain atoms with repeated variables and/or values. | ||||
|         */ | ||||
|         rule_set * operator()(rule_set const & source); | ||||
|         rule_set * operator()(rule_set const & source) override; | ||||
|     }; | ||||
| 
 | ||||
| }; | ||||
|  |  | |||
|  | @ -90,7 +90,7 @@ namespace datalog { | |||
|         bool transform_rules(const rule_set & orig, rule_set & tgt); | ||||
|     public: | ||||
|         mk_interp_tail_simplifier(context & ctx, unsigned priority=40000); | ||||
|         virtual ~mk_interp_tail_simplifier(); | ||||
|         ~mk_interp_tail_simplifier() override; | ||||
| 
 | ||||
|         /**If rule should be retained, assign transformed version to res and return true;
 | ||||
|         if rule can be deleted, return false. | ||||
|  | @ -100,7 +100,7 @@ namespace datalog { | |||
|         */ | ||||
|         bool transform_rule(rule * r, rule_ref& res); | ||||
| 
 | ||||
|         rule_set * operator()(rule_set const & source); | ||||
|         rule_set * operator()(rule_set const & source) override; | ||||
|     }; | ||||
| 
 | ||||
| }; | ||||
|  |  | |||
|  | @ -111,7 +111,7 @@ namespace datalog { | |||
|          | ||||
|         add_invariant_model_converter(ast_manager& m): m(m), a(m), m_funcs(m), m_invs(m) {} | ||||
| 
 | ||||
|         virtual ~add_invariant_model_converter() { } | ||||
|         ~add_invariant_model_converter() override { } | ||||
| 
 | ||||
|         void add(func_decl* p, expr* inv) { | ||||
|             if (!m.is_true(inv)) { | ||||
|  | @ -120,7 +120,7 @@ namespace datalog { | |||
|             } | ||||
|         } | ||||
| 
 | ||||
|         virtual void operator()(model_ref & mr) { | ||||
|         void operator()(model_ref & mr) override { | ||||
|             for (unsigned i = 0; i < m_funcs.size(); ++i) { | ||||
|                 func_decl* p = m_funcs[i].get(); | ||||
|                 func_interp* f = mr->get_func_interp(p); | ||||
|  | @ -142,7 +142,7 @@ namespace datalog { | |||
|             }             | ||||
|         } | ||||
|      | ||||
|         virtual model_converter * translate(ast_translation & translator) { | ||||
|         model_converter * translate(ast_translation & translator) override { | ||||
|             add_invariant_model_converter* mc = alloc(add_invariant_model_converter, m); | ||||
|             for (unsigned i = 0; i < m_funcs.size(); ++i) { | ||||
|                 mc->add(translator(m_funcs[i].get()), m_invs[i].get()); | ||||
|  |  | |||
Some files were not shown because too many files have changed in this diff Show more
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue