3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-12 12:08:18 +00:00

Use override rather than virtual.

This commit is contained in:
Bruce Mitchener 2018-02-09 21:15:02 +07:00
parent 2b847478a2
commit b7d1753843
138 changed files with 1621 additions and 1624 deletions

View file

@ -145,7 +145,7 @@ protected:
bool m_convert_int_numerals_to_real; bool m_convert_int_numerals_to_real;
func_decl * mk_func_decl(decl_kind k, bool is_real); func_decl * mk_func_decl(decl_kind k, bool is_real);
virtual void set_manager(ast_manager * m, family_id id); void set_manager(ast_manager * m, family_id id) override;
decl_kind fix_kind(decl_kind k, unsigned arity); decl_kind fix_kind(decl_kind k, unsigned arity);
void check_arity(unsigned arity, unsigned expected_arity); void check_arity(unsigned arity, unsigned expected_arity);
func_decl * mk_num_decl(unsigned num_parameters, parameter const * parameters, unsigned arity); func_decl * mk_num_decl(unsigned num_parameters, parameter const * parameters, unsigned arity);
@ -153,38 +153,38 @@ protected:
public: public:
arith_decl_plugin(); arith_decl_plugin();
virtual ~arith_decl_plugin(); ~arith_decl_plugin() override;
virtual void finalize(); void finalize() override;
algebraic_numbers::manager & am() const; algebraic_numbers::manager & am() const;
algebraic_numbers_wrapper & aw() const; algebraic_numbers_wrapper & aw() const;
virtual void del(parameter const & p); void del(parameter const & p) override;
virtual parameter translate(parameter const & p, decl_plugin & target); parameter translate(parameter const & p, decl_plugin & target) override;
virtual decl_plugin * mk_fresh() { decl_plugin * mk_fresh() override {
return alloc(arith_decl_plugin); return alloc(arith_decl_plugin);
} }
virtual sort * mk_sort(decl_kind k, unsigned num_parameters, parameter const * parameters); sort * mk_sort(decl_kind k, unsigned num_parameters, parameter const * parameters) override;
virtual func_decl * mk_func_decl(decl_kind k, unsigned num_parameters, parameter const * parameters, func_decl * mk_func_decl(decl_kind k, unsigned num_parameters, parameter const * parameters,
unsigned arity, sort * const * domain, sort * range); unsigned arity, sort * const * domain, sort * range) override;
virtual func_decl * mk_func_decl(decl_kind k, unsigned num_parameters, parameter const * parameters, func_decl * mk_func_decl(decl_kind k, unsigned num_parameters, parameter const * parameters,
unsigned num_args, expr * const * args, sort * range); unsigned num_args, expr * const * args, sort * range) override;
virtual bool is_value(app * e) const; bool is_value(app * e) const override;
virtual bool is_unique_value(app * e) const; bool is_unique_value(app * e) const override;
virtual bool are_equal(app * a, app * b) const; bool are_equal(app * a, app * b) const override;
virtual bool are_distinct(app * a, app * b) const; bool are_distinct(app * a, app * b) const override;
virtual void get_op_names(svector<builtin_name> & op_names, symbol const & logic); void get_op_names(svector<builtin_name> & op_names, symbol const & logic) override;
virtual void get_sort_names(svector<builtin_name> & sort_names, symbol const & logic); void get_sort_names(svector<builtin_name> & sort_names, symbol const & logic) override;
app * mk_numeral(rational const & n, bool is_int); app * mk_numeral(rational const & n, bool is_int);
@ -197,9 +197,9 @@ public:
app * mk_e() const { return m_e; } app * mk_e() const { return m_e; }
virtual expr * get_some_value(sort * s); expr * get_some_value(sort * s) override;
virtual bool is_considered_uninterpreted(func_decl * f) { bool is_considered_uninterpreted(func_decl * f) override {
if (f->get_family_id() != get_family_id()) if (f->get_family_id() != get_family_id())
return false; return false;
switch (f->get_decl_kind()) switch (f->get_decl_kind())

View file

@ -98,9 +98,9 @@ class array_decl_plugin : public decl_plugin {
bool is_array_sort(sort* s) const; bool is_array_sort(sort* s) const;
public: public:
array_decl_plugin(); array_decl_plugin();
virtual ~array_decl_plugin() {} ~array_decl_plugin() override {}
virtual decl_plugin * mk_fresh() { decl_plugin * mk_fresh() override {
return alloc(array_decl_plugin); return alloc(array_decl_plugin);
} }
@ -111,23 +111,23 @@ class array_decl_plugin : public decl_plugin {
// parameters[n-1] - nth dimension // parameters[n-1] - nth dimension
// parameters[n] - range // parameters[n] - range
// //
virtual sort * mk_sort(decl_kind k, unsigned num_parameters, parameter const * parameters); sort * mk_sort(decl_kind k, unsigned num_parameters, parameter const * parameters) override;
// //
// Contract for func_decl: // Contract for func_decl:
// parameters[0] - array sort // parameters[0] - array sort
// Contract for others: // Contract for others:
// no parameters // no parameters
virtual func_decl * mk_func_decl(decl_kind k, unsigned num_parameters, parameter const * parameters, func_decl * mk_func_decl(decl_kind k, unsigned num_parameters, parameter const * parameters,
unsigned arity, sort * const * domain, sort * range); unsigned arity, sort * const * domain, sort * range) override;
virtual void get_op_names(svector<builtin_name> & op_names, symbol const & logic); void get_op_names(svector<builtin_name> & op_names, symbol const & logic) override;
virtual void get_sort_names(svector<builtin_name> & sort_names, symbol const & logic); void get_sort_names(svector<builtin_name> & sort_names, symbol const & logic) override;
virtual expr * get_some_value(sort * s); expr * get_some_value(sort * s) override;
virtual bool is_fully_interp(sort * s) const; bool is_fully_interp(sort * s) const override;
}; };
class array_recognizers { class array_recognizers {

View file

@ -1129,7 +1129,7 @@ protected:
unsigned num_parameters, parameter const* params, unsigned num_parents); unsigned num_parameters, parameter const* params, unsigned num_parents);
virtual void set_manager(ast_manager * m, family_id id); void set_manager(ast_manager * m, family_id id) override;
func_decl * mk_eq_decl_core(char const * name, decl_kind k, sort * s, ptr_vector<func_decl> & cache); func_decl * mk_eq_decl_core(char const * name, decl_kind k, sort * s, ptr_vector<func_decl> & cache);
func_decl * mk_ite_decl(sort * s); func_decl * mk_ite_decl(sort * s);
sort* join(sort* s1, sort* s2); sort* join(sort* s1, sort* s2);
@ -1138,33 +1138,33 @@ protected:
public: public:
basic_decl_plugin(); basic_decl_plugin();
virtual ~basic_decl_plugin() {} ~basic_decl_plugin() override {}
virtual void finalize(); void finalize() override;
virtual decl_plugin * mk_fresh() { decl_plugin * mk_fresh() override {
return alloc(basic_decl_plugin); return alloc(basic_decl_plugin);
} }
virtual sort * mk_sort(decl_kind k, unsigned num_parameters, parameter const* parameters); sort * mk_sort(decl_kind k, unsigned num_parameters, parameter const* parameters) override;
virtual func_decl * mk_func_decl(decl_kind k, unsigned num_parameters, parameter const * parameters, func_decl * mk_func_decl(decl_kind k, unsigned num_parameters, parameter const * parameters,
unsigned arity, sort * const * domain, sort * range); unsigned arity, sort * const * domain, sort * range) override;
virtual func_decl * mk_func_decl(decl_kind k, unsigned num_parameters, parameter const * parameters, func_decl * mk_func_decl(decl_kind k, unsigned num_parameters, parameter const * parameters,
unsigned num_args, expr * const * args, sort * range); unsigned num_args, expr * const * args, sort * range) override;
virtual void get_op_names(svector<builtin_name> & op_names, symbol const & logic); void get_op_names(svector<builtin_name> & op_names, symbol const & logic) override;
virtual void get_sort_names(svector<builtin_name> & sort_names, symbol const & logic); void get_sort_names(svector<builtin_name> & sort_names, symbol const & logic) override;
virtual bool is_value(app* a) const; bool is_value(app* a) const override;
virtual bool is_unique_value(app* a) const; bool is_unique_value(app* a) const override;
sort * mk_bool_sort() const { return m_bool_sort; } sort * mk_bool_sort() const { return m_bool_sort; }
sort * mk_proof_sort() const { return m_proof_sort; } sort * mk_proof_sort() const { return m_proof_sort; }
virtual expr * get_some_value(sort * s); expr * get_some_value(sort * s) override;
}; };
typedef app proof; /* a proof is just an application */ typedef app proof; /* a proof is just an application */
@ -1188,15 +1188,15 @@ class label_decl_plugin : public decl_plugin {
symbol m_lblneg; symbol m_lblneg;
symbol m_lbllit; symbol m_lbllit;
virtual void set_manager(ast_manager * m, family_id id); void set_manager(ast_manager * m, family_id id) override;
public: public:
label_decl_plugin(); label_decl_plugin();
virtual ~label_decl_plugin(); ~label_decl_plugin() override;
virtual decl_plugin * mk_fresh() { return alloc(label_decl_plugin); } decl_plugin * mk_fresh() override { return alloc(label_decl_plugin); }
virtual sort * mk_sort(decl_kind k, unsigned num_parameters, parameter const * parameters); sort * mk_sort(decl_kind k, unsigned num_parameters, parameter const * parameters) override;
/** /**
contract: when label contract: when label
@ -1210,8 +1210,8 @@ public:
... ...
parameter[n-1] (symbol): label's tag. parameter[n-1] (symbol): label's tag.
*/ */
virtual func_decl * mk_func_decl(decl_kind k, unsigned num_parameters, parameter const * parameters, func_decl * mk_func_decl(decl_kind k, unsigned num_parameters, parameter const * parameters,
unsigned arity, sort * const * domain, sort * range); unsigned arity, sort * const * domain, sort * range) override;
}; };
// ----------------------------------- // -----------------------------------
@ -1230,12 +1230,12 @@ enum pattern_op_kind {
*/ */
class pattern_decl_plugin : public decl_plugin { class pattern_decl_plugin : public decl_plugin {
public: public:
virtual decl_plugin * mk_fresh() { return alloc(pattern_decl_plugin); } decl_plugin * mk_fresh() override { return alloc(pattern_decl_plugin); }
virtual sort * mk_sort(decl_kind k, unsigned num_parameters, parameter const * parameters); sort * mk_sort(decl_kind k, unsigned num_parameters, parameter const * parameters) override;
virtual func_decl * mk_func_decl(decl_kind k, unsigned num_parameters, parameter const * parameters, func_decl * mk_func_decl(decl_kind k, unsigned num_parameters, parameter const * parameters,
unsigned arity, sort * const * domain, sort * range); unsigned arity, sort * const * domain, sort * range) override;
}; };
// ----------------------------------- // -----------------------------------
@ -1263,21 +1263,21 @@ class model_value_decl_plugin : public decl_plugin {
public: public:
model_value_decl_plugin() {} model_value_decl_plugin() {}
virtual decl_plugin * mk_fresh() { return alloc(model_value_decl_plugin); } decl_plugin * mk_fresh() override { return alloc(model_value_decl_plugin); }
virtual sort * mk_sort(decl_kind k, unsigned num_parameters, parameter const * parameters); sort * mk_sort(decl_kind k, unsigned num_parameters, parameter const * parameters) override;
/** /**
contract: contract:
parameter[0]: (integer) value idx parameter[0]: (integer) value idx
parameter[1]: (ast) sort of the value. parameter[1]: (ast) sort of the value.
*/ */
virtual func_decl * mk_func_decl(decl_kind k, unsigned num_parameters, parameter const * parameters, func_decl * mk_func_decl(decl_kind k, unsigned num_parameters, parameter const * parameters,
unsigned arity, sort * const * domain, sort * range); unsigned arity, sort * const * domain, sort * range) override;
virtual bool is_value(app* n) const; bool is_value(app* n) const override;
virtual bool is_unique_value(app* a) const; bool is_unique_value(app* a) const override;
}; };
// ----------------------------------- // -----------------------------------
@ -1292,11 +1292,11 @@ class user_sort_plugin : public decl_plugin {
public: public:
user_sort_plugin() {} user_sort_plugin() {}
virtual sort * mk_sort(decl_kind k, unsigned num_parameters, parameter const * parameters); sort * mk_sort(decl_kind k, unsigned num_parameters, parameter const * parameters) override;
virtual func_decl * mk_func_decl(decl_kind k, unsigned num_parameters, parameter const * parameters, func_decl * mk_func_decl(decl_kind k, unsigned num_parameters, parameter const * parameters,
unsigned arity, sort * const * domain, sort * range); unsigned arity, sort * const * domain, sort * range) override;
decl_kind register_name(symbol s); decl_kind register_name(symbol s);
virtual decl_plugin * mk_fresh(); decl_plugin * mk_fresh() override;
}; };
@ -2467,9 +2467,9 @@ class scoped_mark : public ast_mark {
unsigned_vector m_lim; unsigned_vector m_lim;
public: public:
scoped_mark(ast_manager& m): m_stack(m) {} scoped_mark(ast_manager& m): m_stack(m) {}
virtual ~scoped_mark() {} ~scoped_mark() override {}
virtual void mark(ast * n, bool flag); void mark(ast * n, bool flag) override;
virtual void reset(); void reset() override;
void mark(ast * n); void mark(ast * n);
void push_scope(); void push_scope();
void pop_scope(); void pop_scope();

View file

@ -25,24 +25,24 @@ class simple_ast_printer_context : public ast_printer_context {
smt2_pp_environment_dbg & env() const { return *(m_env.get()); } smt2_pp_environment_dbg & env() const { return *(m_env.get()); }
public: public:
simple_ast_printer_context(ast_manager & m):m_manager(m) { m_env = alloc(smt2_pp_environment_dbg, m); } simple_ast_printer_context(ast_manager & m):m_manager(m) { m_env = alloc(smt2_pp_environment_dbg, m); }
virtual ~simple_ast_printer_context() {} ~simple_ast_printer_context() override {}
ast_manager & m() const { return m_manager; } ast_manager & m() const { return m_manager; }
virtual ast_manager & get_ast_manager() { return m_manager; } ast_manager & get_ast_manager() override { return m_manager; }
virtual void display(std::ostream & out, sort * s, unsigned indent = 0) const { out << mk_ismt2_pp(s, m(), indent); } void display(std::ostream & out, sort * s, unsigned indent = 0) const override { out << mk_ismt2_pp(s, m(), indent); }
virtual void display(std::ostream & out, expr * n, unsigned indent = 0) const { out << mk_ismt2_pp(n, m(), indent); } void display(std::ostream & out, expr * n, unsigned indent = 0) const override { out << mk_ismt2_pp(n, m(), indent); }
virtual void display(std::ostream & out, func_decl * f, unsigned indent = 0) const { void display(std::ostream & out, func_decl * f, unsigned indent = 0) const override {
out << f->get_name(); out << f->get_name();
} }
virtual void pp(sort * s, format_ns::format_ref & r) const { mk_smt2_format(s, env(), params_ref(), r); } void pp(sort * s, format_ns::format_ref & r) const override { mk_smt2_format(s, env(), params_ref(), r); }
virtual void pp(func_decl * f, format_ns::format_ref & r) const { mk_smt2_format(f, env(), params_ref(), r); } void pp(func_decl * f, format_ns::format_ref & r) const override { mk_smt2_format(f, env(), params_ref(), r); }
virtual void pp(expr * n, format_ns::format_ref & r) const { void pp(expr * n, format_ns::format_ref & r) const override {
sbuffer<symbol> buf; sbuffer<symbol> buf;
mk_smt2_format(n, env(), params_ref(), 0, 0, r, buf); mk_smt2_format(n, env(), params_ref(), 0, 0, r, buf);
} }
virtual void pp(expr * n, unsigned num_vars, char const * var_prefix, format_ns::format_ref & r, sbuffer<symbol> & var_names) const { void pp(expr * n, unsigned num_vars, char const * var_prefix, format_ns::format_ref & r, sbuffer<symbol> & var_names) const override {
mk_smt2_format(n, env(), params_ref(), num_vars, var_prefix, r, var_names); mk_smt2_format(n, env(), params_ref(), num_vars, var_prefix, r, var_names);
} }
virtual void display(std::ostream & out, expr * n, unsigned indent, unsigned num_vars, char const * var_prefix, sbuffer<symbol> & var_names) const { void display(std::ostream & out, expr * n, unsigned indent, unsigned num_vars, char const * var_prefix, sbuffer<symbol> & var_names) const override {
NOT_IMPLEMENTED_YET(); NOT_IMPLEMENTED_YET();
} }

View file

@ -45,7 +45,7 @@ public:
class ast_printer_context : public ast_printer { class ast_printer_context : public ast_printer {
public: public:
virtual ~ast_printer_context() {} ~ast_printer_context() override {}
virtual ast_manager & get_ast_manager() = 0; virtual ast_manager & get_ast_manager() = 0;
virtual std::ostream & regular_stream() { return std::cout; } virtual std::ostream & regular_stream() { return std::cout; }
virtual std::ostream & diagnostic_stream() { return std::cerr; } virtual std::ostream & diagnostic_stream() { return std::cerr; }

View file

@ -80,15 +80,15 @@ class smt2_pp_environment_dbg : public smt2_pp_environment {
datalog::dl_decl_util m_dlutil; datalog::dl_decl_util m_dlutil;
public: public:
smt2_pp_environment_dbg(ast_manager & m):m_manager(m), m_autil(m), m_bvutil(m), m_arutil(m), m_futil(m), m_sutil(m), m_dtutil(m), m_dlutil(m) {} smt2_pp_environment_dbg(ast_manager & m):m_manager(m), m_autil(m), m_bvutil(m), m_arutil(m), m_futil(m), m_sutil(m), m_dtutil(m), m_dlutil(m) {}
virtual ast_manager & get_manager() const { return m_manager; } ast_manager & get_manager() const override { return m_manager; }
virtual arith_util & get_autil() { return m_autil; } arith_util & get_autil() override { return m_autil; }
virtual bv_util & get_bvutil() { return m_bvutil; } bv_util & get_bvutil() override { return m_bvutil; }
virtual seq_util & get_sutil() { return m_sutil; } seq_util & get_sutil() override { return m_sutil; }
virtual array_util & get_arutil() { return m_arutil; } array_util & get_arutil() override { return m_arutil; }
virtual fpa_util & get_futil() { return m_futil; } fpa_util & get_futil() override { return m_futil; }
virtual datalog::dl_decl_util& get_dlutil() { return m_dlutil; } datalog::dl_decl_util& get_dlutil() override { return m_dlutil; }
virtual datatype_util& get_dtutil() { return m_dtutil; } datatype_util& get_dtutil() override { return m_dtutil; }
virtual bool uses(symbol const & s) const { return false; } bool uses(symbol const & s) const override { return false; }
}; };
void mk_smt2_format(expr * n, smt2_pp_environment & env, params_ref const & p, void mk_smt2_format(expr * n, smt2_pp_environment & env, params_ref const & p,

View file

@ -204,7 +204,7 @@ protected:
vector<ptr_vector<func_decl> > m_bit2bool; vector<ptr_vector<func_decl> > m_bit2bool;
ptr_vector<func_decl> m_mkbv; ptr_vector<func_decl> m_mkbv;
virtual void set_manager(ast_manager * m, family_id id); void set_manager(ast_manager * m, family_id id) override;
void mk_bv_sort(unsigned bv_size); void mk_bv_sort(unsigned bv_size);
sort * get_bv_sort(unsigned bv_size); sort * get_bv_sort(unsigned bv_size);
func_decl * mk_func_decl(decl_kind k, unsigned bv_size); func_decl * mk_func_decl(decl_kind k, unsigned bv_size);
@ -241,34 +241,34 @@ protected:
public: public:
bv_decl_plugin(); bv_decl_plugin();
virtual ~bv_decl_plugin() {} ~bv_decl_plugin() override {}
virtual void finalize(); void finalize() override;
virtual decl_plugin * mk_fresh() { return alloc(bv_decl_plugin); } decl_plugin * mk_fresh() override { return alloc(bv_decl_plugin); }
virtual sort * mk_sort(decl_kind k, unsigned num_parameters, parameter const * parameters); sort * mk_sort(decl_kind k, unsigned num_parameters, parameter const * parameters) override;
virtual func_decl * mk_func_decl(decl_kind k, unsigned num_parameters, parameter const * parameters, func_decl * mk_func_decl(decl_kind k, unsigned num_parameters, parameter const * parameters,
unsigned arity, sort * const * domain, sort * range); unsigned arity, sort * const * domain, sort * range) override;
virtual func_decl * mk_func_decl(decl_kind k, unsigned num_parameters, parameter const * parameters, func_decl * mk_func_decl(decl_kind k, unsigned num_parameters, parameter const * parameters,
unsigned num_args, expr * const * args, sort * range); unsigned num_args, expr * const * args, sort * range) override;
virtual bool is_value(app * e) const; bool is_value(app * e) const override;
virtual bool is_unique_value(app * e) const { return is_value(e); } bool is_unique_value(app * e) const override { return is_value(e); }
virtual void get_op_names(svector<builtin_name> & op_names, symbol const & logic); void get_op_names(svector<builtin_name> & op_names, symbol const & logic) override;
virtual void get_sort_names(svector<builtin_name> & sort_names, symbol const & logic); void get_sort_names(svector<builtin_name> & sort_names, symbol const & logic) override;
virtual bool are_distinct(app* a, app* b) const; bool are_distinct(app* a, app* b) const override;
virtual expr * get_some_value(sort * s); expr * get_some_value(sort * s) override;
bool get_int2bv_size(unsigned num_parameters, parameter const * parameters, int & result); bool get_int2bv_size(unsigned num_parameters, parameter const * parameters, int & result);
virtual bool is_considered_uninterpreted(func_decl * f) { bool is_considered_uninterpreted(func_decl * f) override {
if (f->get_family_id() != get_family_id()) if (f->get_family_id() != get_family_id())
return false; return false;
switch (f->get_decl_kind()) { switch (f->get_decl_kind()) {

View file

@ -124,16 +124,16 @@ namespace datatype {
struct offset : public size { struct offset : public size {
sort_size m_offset; sort_size m_offset;
offset(sort_size const& s): m_offset(s) {} offset(sort_size const& s): m_offset(s) {}
virtual ~offset() {} ~offset() override {}
virtual size* subst(obj_map<sort,size*>& S) { return this; } size* subst(obj_map<sort,size*>& S) override { return this; }
virtual sort_size eval(obj_map<sort, sort_size> const& S) { return m_offset; } sort_size eval(obj_map<sort, sort_size> const& S) override { return m_offset; }
}; };
struct plus : public size { struct plus : public size {
size* m_arg1, *m_arg2; size* m_arg1, *m_arg2;
plus(size* a1, size* a2): m_arg1(a1), m_arg2(a2) { a1->inc_ref(); a2->inc_ref();} plus(size* a1, size* a2): m_arg1(a1), m_arg2(a2) { a1->inc_ref(); a2->inc_ref();}
virtual ~plus() { m_arg1->dec_ref(); m_arg2->dec_ref(); } ~plus() override { m_arg1->dec_ref(); m_arg2->dec_ref(); }
virtual size* subst(obj_map<sort,size*>& S) { return mk_plus(m_arg1->subst(S), m_arg2->subst(S)); } size* subst(obj_map<sort,size*>& S) override { return mk_plus(m_arg1->subst(S), m_arg2->subst(S)); }
virtual sort_size eval(obj_map<sort, sort_size> const& S) { sort_size eval(obj_map<sort, sort_size> const& S) override {
sort_size s1 = m_arg1->eval(S); sort_size s1 = m_arg1->eval(S);
sort_size s2 = m_arg2->eval(S); sort_size s2 = m_arg2->eval(S);
if (s1.is_infinite()) return s1; if (s1.is_infinite()) return s1;
@ -147,9 +147,9 @@ namespace datatype {
struct times : public size { struct times : public size {
size* m_arg1, *m_arg2; size* m_arg1, *m_arg2;
times(size* a1, size* a2): m_arg1(a1), m_arg2(a2) { a1->inc_ref(); a2->inc_ref(); } times(size* a1, size* a2): m_arg1(a1), m_arg2(a2) { a1->inc_ref(); a2->inc_ref(); }
virtual ~times() { m_arg1->dec_ref(); m_arg2->dec_ref(); } ~times() override { m_arg1->dec_ref(); m_arg2->dec_ref(); }
virtual size* subst(obj_map<sort,size*>& S) { return mk_times(m_arg1->subst(S), m_arg2->subst(S)); } size* subst(obj_map<sort,size*>& S) override { return mk_times(m_arg1->subst(S), m_arg2->subst(S)); }
virtual sort_size eval(obj_map<sort, sort_size> const& S) { sort_size eval(obj_map<sort, sort_size> const& S) override {
sort_size s1 = m_arg1->eval(S); sort_size s1 = m_arg1->eval(S);
sort_size s2 = m_arg2->eval(S); sort_size s2 = m_arg2->eval(S);
if (s1.is_infinite()) return s1; if (s1.is_infinite()) return s1;
@ -163,9 +163,9 @@ namespace datatype {
struct power : public size { struct power : public size {
size* m_arg1, *m_arg2; size* m_arg1, *m_arg2;
power(size* a1, size* a2): m_arg1(a1), m_arg2(a2) { a1->inc_ref(); a2->inc_ref(); } power(size* a1, size* a2): m_arg1(a1), m_arg2(a2) { a1->inc_ref(); a2->inc_ref(); }
virtual ~power() { m_arg1->dec_ref(); m_arg2->dec_ref(); } ~power() override { m_arg1->dec_ref(); m_arg2->dec_ref(); }
virtual size* subst(obj_map<sort,size*>& S) { return mk_power(m_arg1->subst(S), m_arg2->subst(S)); } size* subst(obj_map<sort,size*>& S) override { return mk_power(m_arg1->subst(S), m_arg2->subst(S)); }
virtual sort_size eval(obj_map<sort, sort_size> const& S) { sort_size eval(obj_map<sort, sort_size> const& S) override {
sort_size s1 = m_arg1->eval(S); sort_size s1 = m_arg1->eval(S);
sort_size s2 = m_arg2->eval(S); sort_size s2 = m_arg2->eval(S);
// s1^s2 // s1^s2
@ -183,9 +183,9 @@ namespace datatype {
struct sparam : public size { struct sparam : public size {
sort_ref m_param; sort_ref m_param;
sparam(sort_ref& p): m_param(p) {} sparam(sort_ref& p): m_param(p) {}
virtual ~sparam() {} ~sparam() override {}
virtual size* subst(obj_map<sort,size*>& S) { return S[m_param]; } size* subst(obj_map<sort,size*>& S) override { return S[m_param]; }
virtual sort_size eval(obj_map<sort, sort_size> const& S) { return S[m_param]; } sort_size eval(obj_map<sort, sort_size> const& S) override { return S[m_param]; }
}; };
}; };
@ -241,30 +241,30 @@ namespace datatype {
unsigned m_class_id; unsigned m_class_id;
util & u() const; util & u() const;
virtual void inherit(decl_plugin* other_p, ast_translation& tr); void inherit(decl_plugin* other_p, ast_translation& tr) override;
public: public:
plugin(): m_class_id(0) {} plugin(): m_class_id(0) {}
virtual ~plugin(); ~plugin() override;
virtual void finalize(); void finalize() override;
virtual decl_plugin * mk_fresh() { return alloc(plugin); } decl_plugin * mk_fresh() override { return alloc(plugin); }
virtual sort * mk_sort(decl_kind k, unsigned num_parameters, parameter const * parameters); sort * mk_sort(decl_kind k, unsigned num_parameters, parameter const * parameters) override;
virtual func_decl * mk_func_decl(decl_kind k, unsigned num_parameters, parameter const * parameters, func_decl * mk_func_decl(decl_kind k, unsigned num_parameters, parameter const * parameters,
unsigned arity, sort * const * domain, sort * range); unsigned arity, sort * const * domain, sort * range) override;
virtual expr * get_some_value(sort * s); expr * get_some_value(sort * s) override;
virtual bool is_fully_interp(sort * s) const; bool is_fully_interp(sort * s) const override;
virtual bool is_value(app* e) const; bool is_value(app* e) const override;
virtual bool is_unique_value(app * e) const { return is_value(e); } bool is_unique_value(app * e) const override { return is_value(e); }
virtual void get_op_names(svector<builtin_name> & op_names, symbol const & logic); void get_op_names(svector<builtin_name> & op_names, symbol const & logic) override;
void begin_def_block() { m_class_id++; m_def_block.reset(); } void begin_def_block() { m_class_id++; m_def_block.reset(); }

View file

@ -102,9 +102,9 @@ namespace datalog {
public: public:
dl_decl_plugin(); dl_decl_plugin();
virtual ~dl_decl_plugin() {} ~dl_decl_plugin() override {}
virtual decl_plugin * mk_fresh() { return alloc(dl_decl_plugin); } decl_plugin * mk_fresh() override { return alloc(dl_decl_plugin); }
// //
// Contract for sort DL_RELATION_SORT // Contract for sort DL_RELATION_SORT
@ -116,7 +116,7 @@ namespace datalog {
// parameters[0] - name // parameters[0] - name
// parameters[1] - uint64 // parameters[1] - uint64
// //
virtual sort * mk_sort(decl_kind k, unsigned num_parameters, parameter const * parameters); sort * mk_sort(decl_kind k, unsigned num_parameters, parameter const * parameters) override;
// //
// Contract for func_decl: // Contract for func_decl:
@ -126,15 +126,15 @@ namespace datalog {
// parameters[1] - a DL_FINITE_SORT sort of the constant // parameters[1] - a DL_FINITE_SORT sort of the constant
// Contract for others: // Contract for others:
// no parameters // no parameters
virtual func_decl * mk_func_decl(decl_kind k, unsigned num_parameters, parameter const * parameters, func_decl * mk_func_decl(decl_kind k, unsigned num_parameters, parameter const * parameters,
unsigned arity, sort * const * domain, sort * range); unsigned arity, sort * const * domain, sort * range) override;
virtual void get_op_names(svector<builtin_name> & op_names, symbol const & logic); void get_op_names(svector<builtin_name> & op_names, symbol const & logic) override;
virtual void get_sort_names(svector<builtin_name> & sort_names, symbol const & logic); void get_sort_names(svector<builtin_name> & sort_names, symbol const & logic) override;
virtual bool is_value(app * e) const { return is_app_of(e, m_family_id, OP_DL_CONSTANT); } bool is_value(app * e) const override { return is_app_of(e, m_family_id, OP_DL_CONSTANT); }
virtual bool is_unique_value(app * e) const { return is_value(e); } bool is_unique_value(app * e) const override { return is_value(e); }
}; };

View file

@ -103,10 +103,10 @@ class default_expr2polynomial : public expr2polynomial {
svector<bool> m_is_int; svector<bool> m_is_int;
public: public:
default_expr2polynomial(ast_manager & am, polynomial::manager & pm); default_expr2polynomial(ast_manager & am, polynomial::manager & pm);
virtual ~default_expr2polynomial(); ~default_expr2polynomial() override;
virtual bool is_int(polynomial::var x) const; bool is_int(polynomial::var x) const override;
protected: protected:
virtual polynomial::var mk_var(bool is_int); polynomial::var mk_var(bool is_int) override;
}; };
#endif #endif

View file

@ -73,7 +73,7 @@ class contains_app {
app* m_x; app* m_x;
public: public:
pred(app* x) : m_x(x) {} pred(app* x) : m_x(x) {}
virtual bool operator()(expr* e) { bool operator()(expr* e) override {
return m_x == e; return m_x == e;
} }
}; };

View file

@ -32,7 +32,7 @@ namespace format_ns {
symbol m_line_break; symbol m_line_break;
symbol m_line_break_ext; symbol m_line_break_ext;
virtual void set_manager(ast_manager * m, family_id id) { void set_manager(ast_manager * m, family_id id) override {
SASSERT(m->is_format_manager()); SASSERT(m->is_format_manager());
decl_plugin::set_manager(m, id); decl_plugin::set_manager(m, id);
@ -52,24 +52,24 @@ namespace format_ns {
m_line_break_ext("cr++") { m_line_break_ext("cr++") {
} }
virtual ~format_decl_plugin() {} ~format_decl_plugin() override {}
virtual void finalize() { void finalize() override {
if (m_format_sort) if (m_format_sort)
m_manager->dec_ref(m_format_sort); m_manager->dec_ref(m_format_sort);
} }
virtual decl_plugin * mk_fresh() { decl_plugin * mk_fresh() override {
return alloc(format_decl_plugin); return alloc(format_decl_plugin);
} }
virtual sort * mk_sort(decl_kind k, unsigned num_parameters, parameter const* parameters) { sort * mk_sort(decl_kind k, unsigned num_parameters, parameter const* parameters) override {
SASSERT(k == FORMAT_SORT); SASSERT(k == FORMAT_SORT);
return m_format_sort; return m_format_sort;
} }
virtual func_decl * mk_func_decl(decl_kind k, unsigned num_parameters, parameter const * parameters, func_decl * mk_func_decl(decl_kind k, unsigned num_parameters, parameter const * parameters,
unsigned arity, sort * const * domain, sort * range) { unsigned arity, sort * const * domain, sort * range) override {
switch (k) { switch (k) {
case OP_NIL: case OP_NIL:
return m_manager->mk_func_decl(m_nil, arity, domain, m_format_sort, return m_manager->mk_func_decl(m_nil, arity, domain, m_format_sort,

View file

@ -159,11 +159,11 @@ class fpa_decl_plugin : public decl_plugin {
func_decl * mk_bv_wrap(decl_kind k, unsigned num_parameters, parameter const * parameters, func_decl * mk_bv_wrap(decl_kind k, unsigned num_parameters, parameter const * parameters,
unsigned arity, sort * const * domain, sort * range); unsigned arity, sort * const * domain, sort * range);
virtual void set_manager(ast_manager * m, family_id id); void set_manager(ast_manager * m, family_id id) override;
unsigned mk_id(mpf const & v); unsigned mk_id(mpf const & v);
void recycled_id(unsigned id); void recycled_id(unsigned id);
virtual bool is_considered_uninterpreted(func_decl * f) { return false; } bool is_considered_uninterpreted(func_decl * f) override { return false; }
public: public:
fpa_decl_plugin(); fpa_decl_plugin();
@ -171,18 +171,18 @@ public:
bool is_float_sort(sort * s) const { return is_sort_of(s, m_family_id, FLOATING_POINT_SORT); } bool is_float_sort(sort * s) const { return is_sort_of(s, m_family_id, FLOATING_POINT_SORT); }
bool is_rm_sort(sort * s) const { return is_sort_of(s, m_family_id, ROUNDING_MODE_SORT); } bool is_rm_sort(sort * s) const { return is_sort_of(s, m_family_id, ROUNDING_MODE_SORT); }
virtual ~fpa_decl_plugin(); ~fpa_decl_plugin() override;
virtual void finalize(); void finalize() override;
virtual decl_plugin * mk_fresh(); decl_plugin * mk_fresh() override;
virtual sort * mk_sort(decl_kind k, unsigned num_parameters, parameter const * parameters); sort * mk_sort(decl_kind k, unsigned num_parameters, parameter const * parameters) override;
virtual func_decl * mk_func_decl(decl_kind k, unsigned num_parameters, parameter const * parameters, func_decl * mk_func_decl(decl_kind k, unsigned num_parameters, parameter const * parameters,
unsigned arity, sort * const * domain, sort * range); unsigned arity, sort * const * domain, sort * range) override;
virtual void get_op_names(svector<builtin_name> & op_names, symbol const & logic); void get_op_names(svector<builtin_name> & op_names, symbol const & logic) override;
virtual void get_sort_names(svector<builtin_name> & sort_names, symbol const & logic); void get_sort_names(svector<builtin_name> & sort_names, symbol const & logic) override;
virtual expr * get_some_value(sort * s); expr * get_some_value(sort * s) override;
virtual bool is_value(app* e) const; bool is_value(app* e) const override;
virtual bool is_unique_value(app* e) const; bool is_unique_value(app* e) const override;
mpf_manager & fm() { return m_fm; } mpf_manager & fm() { return m_fm; }
func_decl * mk_numeral_decl(mpf const & v); func_decl * mk_numeral_decl(mpf const & v);
@ -197,8 +197,8 @@ public:
return m_values[id]; return m_values[id];
} }
virtual void del(parameter const & p); void del(parameter const & p) override;
virtual parameter translate(parameter const & p, decl_plugin & target); parameter translate(parameter const & p, decl_plugin & target) override;
}; };
class fpa_util { class fpa_util {

View file

@ -74,7 +74,7 @@ struct defined_names::impl {
struct defined_names::pos_impl : public defined_names::impl { struct defined_names::pos_impl : public defined_names::impl {
pos_impl(ast_manager & m, char const * fresh_prefix):impl(m, fresh_prefix) {} pos_impl(ast_manager & m, char const * fresh_prefix):impl(m, fresh_prefix) {}
virtual void mk_definition(expr * e, app * n, sort_ref_buffer & var_sorts, buffer<symbol> const & var_names, expr_ref & new_def); void mk_definition(expr * e, app * n, sort_ref_buffer & var_sorts, buffer<symbol> const & var_names, expr_ref & new_def) override;
}; };

View file

@ -77,10 +77,10 @@ public:
m_rw(m, m.proofs_enabled(), m_cfg) { m_rw(m, m.proofs_enabled(), m_cfg) {
} }
virtual ~name_exprs_core() { ~name_exprs_core() override {
} }
virtual void operator()(expr * n, expr_ref_vector & new_defs, proof_ref_vector & new_def_proofs, expr_ref & r, proof_ref & p) { void operator()(expr * n, expr_ref_vector & new_defs, proof_ref_vector & new_def_proofs, expr_ref & r, proof_ref & p) override {
m_cfg.m_def_exprs = &new_defs; m_cfg.m_def_exprs = &new_defs;
m_cfg.m_def_proofs = &new_def_proofs; m_cfg.m_def_proofs = &new_def_proofs;
m_rw(n, r, p); m_rw(n, r, p);
@ -88,7 +88,7 @@ public:
} }
virtual void reset() { void reset() override {
m_rw.reset(); m_rw.reset();
} }
}; };
@ -102,7 +102,7 @@ class name_quantifier_labels : public name_exprs_core {
ast_manager & m_manager; ast_manager & m_manager;
public: public:
pred(ast_manager & m):m_manager(m) {} pred(ast_manager & m):m_manager(m) {}
virtual bool operator()(expr * t) { bool operator()(expr * t) override {
return is_quantifier(t) || m_manager.is_label(t); return is_quantifier(t) || m_manager.is_label(t);
} }
}; };
@ -114,7 +114,7 @@ public:
m_pred(m) { m_pred(m) {
} }
virtual ~name_quantifier_labels() { ~name_quantifier_labels() override {
} }
}; };
@ -129,7 +129,7 @@ class name_nested_formulas : public name_exprs_core {
pred(ast_manager & m):m_manager(m), m_root(0) {} pred(ast_manager & m):m_manager(m), m_root(0) {}
virtual bool operator()(expr * t) { bool operator()(expr * t) override {
TRACE("name_exprs", tout << "name_nested_formulas::pred:\n" << mk_ismt2_pp(t, m_manager) << "\n";); TRACE("name_exprs", tout << "name_nested_formulas::pred:\n" << mk_ismt2_pp(t, m_manager) << "\n";);
if (is_app(t)) if (is_app(t))
return to_app(t)->get_family_id() == m_manager.get_basic_family_id() && to_app(t)->get_num_args() > 0 && t != m_root; return to_app(t)->get_family_id() == m_manager.get_basic_family_id() && to_app(t)->get_num_args() > 0 && t != m_root;
@ -145,10 +145,10 @@ public:
m_pred(m) { m_pred(m) {
} }
virtual ~name_nested_formulas() { ~name_nested_formulas() override {
} }
virtual void operator()(expr * n, expr_ref_vector & new_defs, proof_ref_vector & new_def_proofs, expr_ref & r, proof_ref & p) { void operator()(expr * n, expr_ref_vector & new_defs, proof_ref_vector & new_def_proofs, expr_ref & r, proof_ref & p) override {
m_pred.m_root = n; m_pred.m_root = n;
TRACE("name_exprs", tout << "operator()\n";); TRACE("name_exprs", tout << "operator()\n";);
name_exprs_core::operator()(n, new_defs, new_def_proofs, r, p); name_exprs_core::operator()(n, new_defs, new_def_proofs, r, p);

View file

@ -53,14 +53,14 @@ class pb_decl_plugin : public decl_plugin {
func_decl * mk_eq(unsigned arity, rational const* coeffs, int k); func_decl * mk_eq(unsigned arity, rational const* coeffs, int k);
public: public:
pb_decl_plugin(); pb_decl_plugin();
virtual ~pb_decl_plugin() {} ~pb_decl_plugin() override {}
virtual sort * mk_sort(decl_kind k, unsigned num_parameters, parameter const * parameters) { sort * mk_sort(decl_kind k, unsigned num_parameters, parameter const * parameters) override {
UNREACHABLE(); UNREACHABLE();
return 0; return 0;
} }
virtual decl_plugin * mk_fresh() { decl_plugin * mk_fresh() override {
return alloc(pb_decl_plugin); return alloc(pb_decl_plugin);
} }
@ -69,11 +69,11 @@ public:
// parameters[0] - integer (at most k elements) // parameters[0] - integer (at most k elements)
// all sorts are Booleans // all sorts are Booleans
// parameters[1] .. parameters[arity] - coefficients // parameters[1] .. parameters[arity] - coefficients
virtual func_decl * mk_func_decl(decl_kind k, unsigned num_parameters, parameter const * parameters, func_decl * mk_func_decl(decl_kind k, unsigned num_parameters, parameter const * parameters,
unsigned arity, sort * const * domain, sort * range); unsigned arity, sort * const * domain, sort * range) override;
virtual void get_op_names(svector<builtin_name> & op_names, symbol const & logic); void get_op_names(svector<builtin_name> & op_names, symbol const & logic) override;
virtual bool is_considered_uninterpreted(func_decl * f) { return false; } bool is_considered_uninterpreted(func_decl * f) override { return false; }
}; };

View file

@ -48,24 +48,24 @@ class proof_checker {
func_decl* m_atom; func_decl* m_atom;
func_decl* m_nil; func_decl* m_nil;
sort* m_cell; sort* m_cell;
virtual void set_manager(ast_manager * m, family_id id); void set_manager(ast_manager * m, family_id id) override;
func_decl * mk_func_decl(decl_kind k); func_decl * mk_func_decl(decl_kind k);
public: public:
hyp_decl_plugin(); hyp_decl_plugin();
virtual ~hyp_decl_plugin() {} ~hyp_decl_plugin() override {}
virtual void finalize(); void finalize() override;
virtual decl_plugin * mk_fresh() { return alloc(hyp_decl_plugin); } decl_plugin * mk_fresh() override { return alloc(hyp_decl_plugin); }
virtual sort * mk_sort(decl_kind k, unsigned num_parameters, parameter const* parameters); sort * mk_sort(decl_kind k, unsigned num_parameters, parameter const* parameters) override;
virtual func_decl * mk_func_decl(decl_kind k, unsigned num_parameters, parameter const * parameters, func_decl * mk_func_decl(decl_kind k, unsigned num_parameters, parameter const * parameters,
unsigned arity, sort * const * domain, sort * range); unsigned arity, sort * const * domain, sort * range) override;
virtual func_decl * mk_func_decl(decl_kind k, unsigned num_parameters, parameter const * parameters, func_decl * mk_func_decl(decl_kind k, unsigned num_parameters, parameter const * parameters,
unsigned num_args, expr * const * args, sort * range); unsigned num_args, expr * const * args, sort * range) override;
virtual void get_op_names(svector<builtin_name> & op_names, symbol const & logic); void get_op_names(svector<builtin_name> & op_names, symbol const & logic) override;
virtual void get_sort_names(svector<builtin_name> & sort_names, symbol const & logic); void get_sort_names(svector<builtin_name> & sort_names, symbol const & logic) override;
}; };
public: public:
proof_checker(ast_manager& m); proof_checker(ast_manager& m);

View file

@ -70,7 +70,7 @@ public:
m_cfg(m) m_cfg(m)
{} {}
virtual ~elim_bounds_rw() {} ~elim_bounds_rw() override {}
}; };
#endif /* ELIM_BOUNDS2_H_ */ #endif /* ELIM_BOUNDS2_H_ */

View file

@ -90,14 +90,14 @@ public:
m_replacer(m, m.proofs_enabled(), m_cfg) { m_replacer(m, m.proofs_enabled(), m_cfg) {
} }
virtual ast_manager & m() const { return m_replacer.m(); } ast_manager & m() const override { return m_replacer.m(); }
virtual void set_substitution(expr_substitution * s) { void set_substitution(expr_substitution * s) override {
m_replacer.cleanup(); m_replacer.cleanup();
m_replacer.cfg().m_subst = s; m_replacer.cfg().m_subst = s;
} }
virtual void operator()(expr * t, expr_ref & result, proof_ref & result_pr, expr_dependency_ref & result_dep) { void operator()(expr * t, expr_ref & result, proof_ref & result_pr, expr_dependency_ref & result_dep) override {
result_dep = 0; result_dep = 0;
m_replacer.operator()(t, result, result_pr); m_replacer.operator()(t, result, result_pr);
if (m_cfg.m_used_dependencies != 0) { if (m_cfg.m_used_dependencies != 0) {
@ -108,11 +108,11 @@ public:
} }
virtual unsigned get_num_steps() const { unsigned get_num_steps() const override {
return m_replacer.get_num_steps(); return m_replacer.get_num_steps();
} }
virtual void reset() { void reset() override {
m_replacer.reset(); m_replacer.reset();
} }
}; };
@ -131,23 +131,23 @@ public:
m_r(m, p) { m_r(m, p) {
} }
virtual ~th_rewriter2expr_replacer() {} ~th_rewriter2expr_replacer() override {}
virtual ast_manager & m() const { return m_r.m(); } ast_manager & m() const override { return m_r.m(); }
virtual void set_substitution(expr_substitution * s) { m_r.set_substitution(s); } void set_substitution(expr_substitution * s) override { m_r.set_substitution(s); }
virtual void operator()(expr * t, expr_ref & result, proof_ref & result_pr, expr_dependency_ref & result_dep) { void operator()(expr * t, expr_ref & result, proof_ref & result_pr, expr_dependency_ref & result_dep) override {
m_r(t, result, result_pr); m_r(t, result, result_pr);
result_dep = m_r.get_used_dependencies(); result_dep = m_r.get_used_dependencies();
m_r.reset_used_dependencies(); m_r.reset_used_dependencies();
} }
virtual unsigned get_num_steps() const { unsigned get_num_steps() const override {
return m_r.get_num_steps(); return m_r.get_num_steps();
} }
virtual void reset() { void reset() override {
m_r.reset(); m_r.reset();
} }

View file

@ -103,8 +103,8 @@ public:
class maximize_bv_sharing : public maximize_ac_sharing { class maximize_bv_sharing : public maximize_ac_sharing {
bv_util m_util; bv_util m_util;
protected: protected:
virtual void init_core(); void init_core() override;
virtual bool is_numeral(expr * n) const; bool is_numeral(expr * n) const override;
public: public:
maximize_bv_sharing(ast_manager & m); maximize_bv_sharing(ast_manager & m);
}; };

View file

@ -96,8 +96,8 @@ public:
class pull_cheap_ite_tree_cfg : public pull_ite_tree_cfg { class pull_cheap_ite_tree_cfg : public pull_ite_tree_cfg {
public: public:
pull_cheap_ite_tree_cfg(ast_manager & m):pull_ite_tree_cfg(m) {} pull_cheap_ite_tree_cfg(ast_manager & m):pull_ite_tree_cfg(m) {}
virtual ~pull_cheap_ite_tree_cfg() {} ~pull_cheap_ite_tree_cfg() override {}
virtual bool is_target(app * n) const; bool is_target(app * n) const override;
}; };
class pull_cheap_ite_tree_rw : public rewriter_tpl<pull_cheap_ite_tree_cfg> { class pull_cheap_ite_tree_rw : public rewriter_tpl<pull_cheap_ite_tree_cfg> {

View file

@ -45,7 +45,7 @@ struct push_app_ite_cfg : public default_rewriter_cfg {
*/ */
class ng_push_app_ite_cfg : public push_app_ite_cfg { class ng_push_app_ite_cfg : public push_app_ite_cfg {
protected: protected:
virtual bool is_target(func_decl * decl, unsigned num_args, expr * const * args); bool is_target(func_decl * decl, unsigned num_args, expr * const * args) override;
public: public:
ng_push_app_ite_cfg(ast_manager& m, bool conservative = true): push_app_ite_cfg(m, conservative) {} ng_push_app_ite_cfg(ast_manager& m, bool conservative = true): push_app_ite_cfg(m, conservative) {}
virtual ~ng_push_app_ite_cfg() {} virtual ~ng_push_app_ite_cfg() {}

View file

@ -150,7 +150,7 @@ class var_shifter : public var_shifter_core {
unsigned m_bound; unsigned m_bound;
unsigned m_shift1; unsigned m_shift1;
unsigned m_shift2; unsigned m_shift2;
virtual void process_var(var * v); void process_var(var * v) override;
public: public:
var_shifter(ast_manager & m):var_shifter_core(m) {} var_shifter(ast_manager & m):var_shifter_core(m) {}
void operator()(expr * t, unsigned bound, unsigned shift1, unsigned shift2, expr_ref & r); void operator()(expr * t, unsigned bound, unsigned shift1, unsigned shift2, expr_ref & r);
@ -183,7 +183,7 @@ public:
class inv_var_shifter : public var_shifter_core { class inv_var_shifter : public var_shifter_core {
protected: protected:
unsigned m_shift; unsigned m_shift;
virtual void process_var(var * v); void process_var(var * v) override;
public: public:
inv_var_shifter(ast_manager & m):var_shifter_core(m) {} inv_var_shifter(ast_manager & m):var_shifter_core(m) {}
void operator()(expr * t, unsigned shift, expr_ref & r); void operator()(expr * t, unsigned shift, expr_ref & r);
@ -339,7 +339,7 @@ public:
Config & cfg() { return m_cfg; } Config & cfg() { return m_cfg; }
Config const & cfg() const { return m_cfg; } Config const & cfg() const { return m_cfg; }
~rewriter_tpl(); ~rewriter_tpl() override;
void reset(); void reset();
void cleanup(); void cleanup();

View file

@ -85,15 +85,15 @@ public:
sym_expr_boolean_algebra(ast_manager& m, expr_solver& s): sym_expr_boolean_algebra(ast_manager& m, expr_solver& s):
m(m), m_solver(s) {} m(m), m_solver(s) {}
virtual T mk_false() { T mk_false() override {
expr_ref fml(m.mk_false(), m); expr_ref fml(m.mk_false(), m);
return sym_expr::mk_pred(fml, m.mk_bool_sort()); // use of Bool sort for bound variable is arbitrary return sym_expr::mk_pred(fml, m.mk_bool_sort()); // use of Bool sort for bound variable is arbitrary
} }
virtual T mk_true() { T mk_true() override {
expr_ref fml(m.mk_true(), m); expr_ref fml(m.mk_true(), m);
return sym_expr::mk_pred(fml, m.mk_bool_sort()); return sym_expr::mk_pred(fml, m.mk_bool_sort());
} }
virtual T mk_and(T x, T y) { T mk_and(T x, T y) override {
if (x->is_char() && y->is_char()) { if (x->is_char() && y->is_char()) {
if (x->get_char() == y->get_char()) { if (x->get_char() == y->get_char()) {
return x; return x;
@ -118,7 +118,7 @@ public:
br.mk_and(fml1, fml2, fml); br.mk_and(fml1, fml2, fml);
return sym_expr::mk_pred(fml, x->get_sort()); return sym_expr::mk_pred(fml, x->get_sort());
} }
virtual T mk_or(T x, T y) { T mk_or(T x, T y) override {
if (x->is_char() && y->is_char() && if (x->is_char() && y->is_char() &&
x->get_char() == y->get_char()) { x->get_char() == y->get_char()) {
return x; return x;
@ -135,7 +135,7 @@ public:
return sym_expr::mk_pred(fml, x->get_sort()); return sym_expr::mk_pred(fml, x->get_sort());
} }
virtual T mk_and(unsigned sz, T const* ts) { T mk_and(unsigned sz, T const* ts) override {
switch (sz) { switch (sz) {
case 0: return mk_true(); case 0: return mk_true();
case 1: return ts[0]; case 1: return ts[0];
@ -148,7 +148,7 @@ public:
} }
} }
} }
virtual T mk_or(unsigned sz, T const* ts) { T mk_or(unsigned sz, T const* ts) override {
switch (sz) { switch (sz) {
case 0: return mk_false(); case 0: return mk_false();
case 1: return ts[0]; case 1: return ts[0];
@ -161,7 +161,7 @@ public:
} }
} }
} }
virtual lbool is_sat(T x) { lbool is_sat(T x) override {
if (x->is_char()) { if (x->is_char()) {
return l_true; return l_true;
} }
@ -178,7 +178,7 @@ public:
} }
return m_solver.check_sat(fml); return m_solver.check_sat(fml);
} }
virtual T mk_not(T x) { T mk_not(T x) override {
var_ref v(m.mk_var(0, x->get_sort()), m); var_ref v(m.mk_var(0, x->get_sort()), m);
expr_ref fml(m.mk_not(x->accept(v)), m); expr_ref fml(m.mk_not(x->accept(v)), m);
return sym_expr::mk_pred(fml, x->get_sort()); return sym_expr::mk_pred(fml, x->get_sort());

View file

@ -162,34 +162,34 @@ class seq_decl_plugin : public decl_plugin {
void init(); void init();
virtual void set_manager(ast_manager * m, family_id id); void set_manager(ast_manager * m, family_id id) override;
public: public:
seq_decl_plugin(); seq_decl_plugin();
virtual ~seq_decl_plugin() {} ~seq_decl_plugin() override {}
virtual void finalize(); void finalize() override;
virtual decl_plugin * mk_fresh() { return alloc(seq_decl_plugin); } decl_plugin * mk_fresh() override { return alloc(seq_decl_plugin); }
virtual sort * mk_sort(decl_kind k, unsigned num_parameters, parameter const * parameters); sort * mk_sort(decl_kind k, unsigned num_parameters, parameter const * parameters) override;
virtual func_decl * mk_func_decl(decl_kind k, unsigned num_parameters, parameter const * parameters, func_decl * mk_func_decl(decl_kind k, unsigned num_parameters, parameter const * parameters,
unsigned arity, sort * const * domain, sort * range); unsigned arity, sort * const * domain, sort * range) override;
virtual void get_op_names(svector<builtin_name> & op_names, symbol const & logic); void get_op_names(svector<builtin_name> & op_names, symbol const & logic) override;
virtual void get_sort_names(svector<builtin_name> & sort_names, symbol const & logic); void get_sort_names(svector<builtin_name> & sort_names, symbol const & logic) override;
virtual bool is_value(app * e) const; bool is_value(app * e) const override;
virtual bool is_unique_value(app * e) const { return false; } bool is_unique_value(app * e) const override { return false; }
virtual bool are_equal(app* a, app* b) const; bool are_equal(app* a, app* b) const override;
virtual bool are_distinct(app* a, app* b) const; bool are_distinct(app* a, app* b) const override;
virtual expr * get_some_value(sort * s); expr * get_some_value(sort * s) override;
bool is_char(ast* a) const { return a == m_char; } bool is_char(ast* a) const { return a == m_char; }

View file

@ -49,12 +49,12 @@ class help_cmd : public cmd {
public: public:
help_cmd():cmd("help") {} help_cmd():cmd("help") {}
virtual char const * get_usage() const { return "<symbol>*"; } char const * get_usage() const override { return "<symbol>*"; }
virtual char const * get_descr(cmd_context & ctx) const { return "print this help."; } char const * get_descr(cmd_context & ctx) const override { return "print this help."; }
virtual unsigned get_arity() const { return VAR_ARITY; } unsigned get_arity() const override { return VAR_ARITY; }
virtual void prepare(cmd_context & ctx) { m_cmds.reset(); } void prepare(cmd_context & ctx) override { m_cmds.reset(); }
virtual cmd_arg_kind next_arg_kind(cmd_context & ctx) const { return CPK_SYMBOL; } cmd_arg_kind next_arg_kind(cmd_context & ctx) const override { return CPK_SYMBOL; }
virtual void set_next_arg(cmd_context & ctx, symbol const & s) { void set_next_arg(cmd_context & ctx, symbol const & s) override {
cmd * c = ctx.find_cmd(s); cmd * c = ctx.find_cmd(s);
if (c == 0) { if (c == 0) {
std::string err_msg("unknown command '"); std::string err_msg("unknown command '");
@ -69,7 +69,7 @@ public:
bool operator()(named_cmd const & c1, named_cmd const & c2) const { return c1.first.str() < c2.first.str(); } bool operator()(named_cmd const & c1, named_cmd const & c2) const { return c1.first.str() < c2.first.str(); }
}; };
virtual void execute(cmd_context & ctx) { void execute(cmd_context & ctx) override {
ctx.regular_stream() << "\""; ctx.regular_stream() << "\"";
if (m_cmds.empty()) { if (m_cmds.empty()) {
vector<named_cmd> cmds; vector<named_cmd> cmds;
@ -101,14 +101,14 @@ class get_model_cmd : public cmd {
unsigned m_index; unsigned m_index;
public: public:
get_model_cmd(): cmd("get-model"), m_index(0) {} get_model_cmd(): cmd("get-model"), m_index(0) {}
virtual char const * get_usage() const { return "[<index of box objective>]"; } char const * get_usage() const override { return "[<index of box objective>]"; }
virtual char const * get_descr(cmd_context & ctx) const { char const * get_descr(cmd_context & ctx) const override {
return "retrieve model for the last check-sat command.\nSupply optional index if retrieving a model corresponding to a box optimization objective"; return "retrieve model for the last check-sat command.\nSupply optional index if retrieving a model corresponding to a box optimization objective";
} }
virtual unsigned get_arity() const { return VAR_ARITY; } unsigned get_arity() const override { return VAR_ARITY; }
virtual cmd_arg_kind next_arg_kind(cmd_context & ctx) const { return CPK_UINT; } cmd_arg_kind next_arg_kind(cmd_context & ctx) const override { return CPK_UINT; }
virtual void set_next_arg(cmd_context & ctx, unsigned index) { m_index = index; } void set_next_arg(cmd_context & ctx, unsigned index) override { m_index = index; }
virtual void execute(cmd_context & ctx) { void execute(cmd_context & ctx) override {
if (!ctx.is_model_available() || ctx.get_check_sat_result() == 0) if (!ctx.is_model_available() || ctx.get_check_sat_result() == 0)
throw cmd_exception("model is not available"); throw cmd_exception("model is not available");
model_ref m; model_ref m;
@ -120,7 +120,7 @@ public:
} }
ctx.display_model(m); ctx.display_model(m);
} }
virtual void reset(cmd_context& ctx) { void reset(cmd_context& ctx) override {
m_index = 0; m_index = 0;
} }
}; };
@ -166,10 +166,10 @@ class cmd_is_declared : public ast_smt_pp::is_declared {
public: public:
cmd_is_declared(cmd_context& ctx): m_ctx(ctx) {} cmd_is_declared(cmd_context& ctx): m_ctx(ctx) {}
virtual bool operator()(func_decl* d) const { bool operator()(func_decl* d) const override {
return m_ctx.is_func_decl(d->get_name()); return m_ctx.is_func_decl(d->get_name());
} }
virtual bool operator()(sort* s) const { bool operator()(sort* s) const override {
return m_ctx.is_sort_decl(s->get_name()); return m_ctx.is_sort_decl(s->get_name());
} }
}; };
@ -360,7 +360,7 @@ public:
m_int_real_coercions(":int-real-coercions"), m_int_real_coercions(":int-real-coercions"),
m_reproducible_resource_limit(":reproducible-resource-limit") { m_reproducible_resource_limit(":reproducible-resource-limit") {
} }
virtual ~set_get_option_cmd() {} ~set_get_option_cmd() override {}
}; };
@ -477,19 +477,19 @@ public:
m_unsupported(false) { m_unsupported(false) {
} }
virtual char const * get_usage() const { return "<keyword> <value>"; } char const * get_usage() const override { return "<keyword> <value>"; }
virtual char const * get_descr(cmd_context & ctx) const { return "set configuration option."; } char const * get_descr(cmd_context & ctx) const override { return "set configuration option."; }
virtual unsigned get_arity() const { return 2; } unsigned get_arity() const override { return 2; }
virtual void prepare(cmd_context & ctx) { m_unsupported = false; m_option = symbol::null; } void prepare(cmd_context & ctx) override { m_unsupported = false; m_option = symbol::null; }
virtual cmd_arg_kind next_arg_kind(cmd_context & ctx) const { cmd_arg_kind next_arg_kind(cmd_context & ctx) const override {
return m_option == symbol::null ? CPK_KEYWORD : CPK_OPTION_VALUE; return m_option == symbol::null ? CPK_KEYWORD : CPK_OPTION_VALUE;
} }
virtual void set_next_arg(cmd_context & ctx, symbol const & opt) { void set_next_arg(cmd_context & ctx, symbol const & opt) override {
if (m_option == symbol::null) { if (m_option == symbol::null) {
m_option = opt; m_option = opt;
} }
@ -498,7 +498,7 @@ public:
} }
} }
virtual void set_next_arg(cmd_context & ctx, rational const & val) { void set_next_arg(cmd_context & ctx, rational const & val) override {
if (m_option == m_random_seed) { if (m_option == m_random_seed) {
ctx.set_random_seed(to_unsigned(val)); ctx.set_random_seed(to_unsigned(val));
} }
@ -517,7 +517,7 @@ public:
} }
} }
virtual void set_next_arg(cmd_context & ctx, char const * value) { void set_next_arg(cmd_context & ctx, char const * value) override {
if (m_option == m_regular_output_channel) { if (m_option == m_regular_output_channel) {
ctx.set_regular_stream(value); ctx.set_regular_stream(value);
} }
@ -532,7 +532,7 @@ public:
} }
} }
virtual void execute(cmd_context & ctx) { void execute(cmd_context & ctx) override {
if (m_unsupported) if (m_unsupported)
ctx.print_unsupported(m_option, m_line, m_pos); ctx.print_unsupported(m_option, m_line, m_pos);
else else
@ -557,11 +557,11 @@ public:
get_option_cmd(): get_option_cmd():
set_get_option_cmd("get-option") { set_get_option_cmd("get-option") {
} }
virtual char const * get_usage() const { return "<keyword>"; } char const * get_usage() const override { return "<keyword>"; }
virtual char const * get_descr(cmd_context & ctx) const { return "get configuration option."; } char const * get_descr(cmd_context & ctx) const override { return "get configuration option."; }
virtual unsigned get_arity() const { return 1; } unsigned get_arity() const override { return 1; }
virtual cmd_arg_kind next_arg_kind(cmd_context & ctx) const { return CPK_KEYWORD; } cmd_arg_kind next_arg_kind(cmd_context & ctx) const override { return CPK_KEYWORD; }
virtual void set_next_arg(cmd_context & ctx, symbol const & opt) { void set_next_arg(cmd_context & ctx, symbol const & opt) override {
if (opt == m_print_success) { if (opt == m_print_success) {
print_bool(ctx, ctx.print_success_enabled()); print_bool(ctx, ctx.print_success_enabled());
} }
@ -651,11 +651,11 @@ public:
m_all_statistics(":all-statistics"), m_all_statistics(":all-statistics"),
m_assertion_stack_levels(":assertion-stack-levels") { m_assertion_stack_levels(":assertion-stack-levels") {
} }
virtual char const * get_usage() const { return "<keyword>"; } char const * get_usage() const override { return "<keyword>"; }
virtual char const * get_descr(cmd_context & ctx) const { return "get information."; } char const * get_descr(cmd_context & ctx) const override { return "get information."; }
virtual unsigned get_arity() const { return 1; } unsigned get_arity() const override { return 1; }
virtual cmd_arg_kind next_arg_kind(cmd_context & ctx) const { return CPK_KEYWORD; } cmd_arg_kind next_arg_kind(cmd_context & ctx) const override { return CPK_KEYWORD; }
virtual void set_next_arg(cmd_context & ctx, symbol const & opt) { void set_next_arg(cmd_context & ctx, symbol const & opt) override {
if (opt == m_error_behavior) { if (opt == m_error_behavior) {
if (ctx.exit_on_error()) if (ctx.exit_on_error())
ctx.regular_stream() << "(:error-behavior immediate-exit)" << std::endl; ctx.regular_stream() << "(:error-behavior immediate-exit)" << std::endl;
@ -707,16 +707,16 @@ public:
m_sat("sat"), m_sat("sat"),
m_unknown("unknown") { m_unknown("unknown") {
} }
virtual char const * get_usage() const { return "<keyword> <value>"; } char const * get_usage() const override { return "<keyword> <value>"; }
virtual char const * get_descr(cmd_context & ctx) const { return "set information."; } char const * get_descr(cmd_context & ctx) const override { return "set information."; }
virtual unsigned get_arity() const { return 2; } unsigned get_arity() const override { return 2; }
virtual void prepare(cmd_context & ctx) { m_info = symbol::null; } void prepare(cmd_context & ctx) override { m_info = symbol::null; }
virtual cmd_arg_kind next_arg_kind(cmd_context & ctx) const { cmd_arg_kind next_arg_kind(cmd_context & ctx) const override {
return m_info == symbol::null ? CPK_KEYWORD : CPK_OPTION_VALUE; return m_info == symbol::null ? CPK_KEYWORD : CPK_OPTION_VALUE;
} }
virtual void set_next_arg(cmd_context & ctx, rational const & val) {} void set_next_arg(cmd_context & ctx, rational const & val) override {}
virtual void set_next_arg(cmd_context & ctx, char const * val) {} void set_next_arg(cmd_context & ctx, char const * val) override {}
virtual void set_next_arg(cmd_context & ctx, symbol const & s) { void set_next_arg(cmd_context & ctx, symbol const & s) override {
if (m_info == symbol::null) { if (m_info == symbol::null) {
m_info = s; m_info = s;
} }
@ -737,7 +737,7 @@ public:
} }
} }
} }
virtual void execute(cmd_context & ctx) { void execute(cmd_context & ctx) override {
ctx.print_success(); ctx.print_success();
} }
}; };
@ -760,30 +760,30 @@ public:
} }
return m_array_fid; return m_array_fid;
} }
virtual char const * get_usage() const { return "<symbol> (<sort>+) <func-decl-ref>"; } char const * get_usage() const override { return "<symbol> (<sort>+) <func-decl-ref>"; }
virtual char const * get_descr(cmd_context & ctx) const { return "declare a new array map operator with name <symbol> using the given function declaration.\n<func-decl-ref> ::= <symbol>\n | (<symbol> (<sort>*) <sort>)\n | ((_ <symbol> <numeral>+) (<sort>*) <sort>)\nThe last two cases are used to disumbiguate between declarations with the same name and/or select (indexed) builtin declarations.\nFor more details about the array map operator, see 'Generalized and Efficient Array Decision Procedures' (FMCAD 2009).\nExample: (declare-map set-union (Int) (or (Bool Bool) Bool))\nDeclares a new function (declare-fun set-union ((Array Int Bool) (Array Int Bool)) (Array Int Bool)).\nThe instance of the map axiom for this new declaration is:\n(forall ((a1 (Array Int Bool)) (a2 (Array Int Bool)) (i Int)) (= (select (set-union a1 a2) i) (or (select a1 i) (select a2 i))))"; } char const * get_descr(cmd_context & ctx) const override { return "declare a new array map operator with name <symbol> using the given function declaration.\n<func-decl-ref> ::= <symbol>\n | (<symbol> (<sort>*) <sort>)\n | ((_ <symbol> <numeral>+) (<sort>*) <sort>)\nThe last two cases are used to disumbiguate between declarations with the same name and/or select (indexed) builtin declarations.\nFor more details about the array map operator, see 'Generalized and Efficient Array Decision Procedures' (FMCAD 2009).\nExample: (declare-map set-union (Int) (or (Bool Bool) Bool))\nDeclares a new function (declare-fun set-union ((Array Int Bool) (Array Int Bool)) (Array Int Bool)).\nThe instance of the map axiom for this new declaration is:\n(forall ((a1 (Array Int Bool)) (a2 (Array Int Bool)) (i Int)) (= (select (set-union a1 a2) i) (or (select a1 i) (select a2 i))))"; }
virtual unsigned get_arity() const { return 3; } unsigned get_arity() const override { return 3; }
virtual void prepare(cmd_context & ctx) { m_name = symbol::null; m_domain.reset(); } void prepare(cmd_context & ctx) override { m_name = symbol::null; m_domain.reset(); }
virtual cmd_arg_kind next_arg_kind(cmd_context & ctx) const { cmd_arg_kind next_arg_kind(cmd_context & ctx) const override {
if (m_name == symbol::null) return CPK_SYMBOL; if (m_name == symbol::null) return CPK_SYMBOL;
if (m_domain.empty()) return CPK_SORT_LIST; if (m_domain.empty()) return CPK_SORT_LIST;
return CPK_FUNC_DECL; return CPK_FUNC_DECL;
} }
virtual void set_next_arg(cmd_context & ctx, symbol const & s) { m_name = s; } void set_next_arg(cmd_context & ctx, symbol const & s) override { m_name = s; }
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 {
if (num == 0) if (num == 0)
throw cmd_exception("invalid map declaration, empty sort list"); throw cmd_exception("invalid map declaration, empty sort list");
m_domain.append(num, slist); m_domain.append(num, slist);
} }
virtual void set_next_arg(cmd_context & ctx, func_decl * f) { void set_next_arg(cmd_context & ctx, func_decl * f) override {
m_f = f; m_f = f;
if (m_f->get_arity() == 0) if (m_f->get_arity() == 0)
throw cmd_exception("invalid map declaration, function declaration must have arity > 0"); throw cmd_exception("invalid map declaration, function declaration must have arity > 0");
} }
virtual void reset(cmd_context & ctx) { void reset(cmd_context & ctx) override {
m_array_fid = null_family_id; m_array_fid = null_family_id;
} }
virtual void execute(cmd_context & ctx) { void execute(cmd_context & ctx) override {
psort_decl * array_sort = ctx.find_psort_decl(m_array_sort); psort_decl * array_sort = ctx.find_psort_decl(m_array_sort);
if (array_sort == 0) if (array_sort == 0)
throw cmd_exception("Array sort is not available"); throw cmd_exception("Array sort is not available");
@ -813,11 +813,11 @@ class get_consequences_cmd : public cmd {
unsigned m_count; unsigned m_count;
public: public:
get_consequences_cmd(): cmd("get-consequences"), m_count(0) {} get_consequences_cmd(): cmd("get-consequences"), m_count(0) {}
virtual char const * get_usage() const { return "(<boolean-variable>*) (<variable>*)"; } char const * get_usage() const override { return "(<boolean-variable>*) (<variable>*)"; }
virtual char const * get_descr(cmd_context & ctx) const { return "retrieve consequences that fix values for supplied variables"; } char const * get_descr(cmd_context & ctx) const override { return "retrieve consequences that fix values for supplied variables"; }
virtual unsigned get_arity() const { return 2; } unsigned get_arity() const override { return 2; }
virtual cmd_arg_kind next_arg_kind(cmd_context & ctx) const { return CPK_EXPR_LIST; } cmd_arg_kind next_arg_kind(cmd_context & ctx) const override { return CPK_EXPR_LIST; }
virtual void set_next_arg(cmd_context & ctx, unsigned num, expr * const * tlist) { void set_next_arg(cmd_context & ctx, unsigned num, expr * const * tlist) override {
if (m_count == 0) { if (m_count == 0) {
m_assumptions.append(num, tlist); m_assumptions.append(num, tlist);
++m_count; ++m_count;
@ -826,8 +826,8 @@ public:
m_variables.append(num, tlist); m_variables.append(num, tlist);
} }
} }
virtual void failure_cleanup(cmd_context & ctx) {} void failure_cleanup(cmd_context & ctx) override {}
virtual void execute(cmd_context & ctx) { void execute(cmd_context & ctx) override {
ast_manager& m = ctx.m(); ast_manager& m = ctx.m();
expr_ref_vector assumptions(m), variables(m), consequences(m); expr_ref_vector assumptions(m), variables(m), consequences(m);
assumptions.append(m_assumptions.size(), m_assumptions.c_ptr()); assumptions.append(m_assumptions.size(), m_assumptions.c_ptr());
@ -835,12 +835,12 @@ public:
ctx.get_consequences(assumptions, variables, consequences); ctx.get_consequences(assumptions, variables, consequences);
ctx.regular_stream() << consequences << "\n"; ctx.regular_stream() << consequences << "\n";
} }
virtual void prepare(cmd_context & ctx) { reset(ctx); } void prepare(cmd_context & ctx) override { reset(ctx); }
virtual void reset(cmd_context& ctx) { void reset(cmd_context& ctx) override {
m_assumptions.reset(); m_variables.reset(); m_count = 0; m_assumptions.reset(); m_variables.reset(); m_count = 0;
} }
virtual void finalize(cmd_context & ctx) {} void finalize(cmd_context & ctx) override {}
}; };
// provides "help" for builtin cmds // provides "help" for builtin cmds
@ -850,8 +850,8 @@ class builtin_cmd : public cmd {
public: public:
builtin_cmd(char const * name, char const * usage, char const * descr): builtin_cmd(char const * name, char const * usage, char const * descr):
cmd(name), m_usage(usage), m_descr(descr) {} cmd(name), m_usage(usage), m_descr(descr) {}
virtual char const * get_usage() const { return m_usage; } char const * get_usage() const override { return m_usage; }
virtual char const * get_descr(cmd_context & ctx) const { return m_descr; } char const * get_descr(cmd_context & ctx) const override { return m_descr; }
}; };

View file

@ -414,25 +414,25 @@ protected:
public: public:
pp_env(cmd_context & o):m_owner(o), m_autil(o.m()), m_bvutil(o.m()), m_arutil(o.m()), m_futil(o.m()), m_sutil(o.m()), m_dtutil(o.m()), m_dlutil(o.m()) {} pp_env(cmd_context & o):m_owner(o), m_autil(o.m()), m_bvutil(o.m()), m_arutil(o.m()), m_futil(o.m()), m_sutil(o.m()), m_dtutil(o.m()), m_dlutil(o.m()) {}
virtual ~pp_env() {} ~pp_env() override {}
virtual ast_manager & get_manager() const { return m_owner.m(); } ast_manager & get_manager() const override { return m_owner.m(); }
virtual arith_util & get_autil() { return m_autil; } arith_util & get_autil() override { return m_autil; }
virtual bv_util & get_bvutil() { return m_bvutil; } bv_util & get_bvutil() override { return m_bvutil; }
virtual array_util & get_arutil() { return m_arutil; } array_util & get_arutil() override { return m_arutil; }
virtual fpa_util & get_futil() { return m_futil; } fpa_util & get_futil() override { return m_futil; }
virtual seq_util & get_sutil() { return m_sutil; } seq_util & get_sutil() override { return m_sutil; }
virtual datatype_util & get_dtutil() { return m_dtutil; } datatype_util & get_dtutil() override { return m_dtutil; }
virtual datalog::dl_decl_util& get_dlutil() { return m_dlutil; } datalog::dl_decl_util& get_dlutil() override { return m_dlutil; }
virtual bool uses(symbol const & s) const { bool uses(symbol const & s) const override {
return return
m_owner.m_builtin_decls.contains(s) || m_owner.m_builtin_decls.contains(s) ||
m_owner.m_func_decls.contains(s); m_owner.m_func_decls.contains(s);
} }
virtual format_ns::format * pp_sort(sort * s) { format_ns::format * pp_sort(sort * s) override {
return m_owner.pp(s); return m_owner.pp(s);
} }
virtual format_ns::format * pp_fdecl(func_decl * f, unsigned & len) { format_ns::format * pp_fdecl(func_decl * f, unsigned & len) override {
symbol s = f->get_name(); symbol s = f->get_name();
func_decls fs; func_decls fs;
if (m_owner.m_func_decls.find(s, fs) && fs.contains(f)) { if (m_owner.m_func_decls.find(s, fs) && fs.contains(f)) {
@ -443,7 +443,7 @@ public:
} }
return smt2_pp_environment::pp_fdecl(f, len); return smt2_pp_environment::pp_fdecl(f, len);
} }
virtual format_ns::format * pp_fdecl_ref(func_decl * f) { format_ns::format * pp_fdecl_ref(func_decl * f) override {
symbol s = f->get_name(); symbol s = f->get_name();
func_decls fs; func_decls fs;
if (m_owner.m_func_decls.find(s, fs) && fs.contains(f)) { if (m_owner.m_func_decls.find(s, fs) && fs.contains(f)) {

View file

@ -112,10 +112,10 @@ class ast_object_ref : public object_ref {
ast * m_ast; ast * m_ast;
public: public:
ast_object_ref(cmd_context & ctx, ast * a); ast_object_ref(cmd_context & ctx, ast * a);
virtual void finalize(cmd_context & ctx); void finalize(cmd_context & ctx) override;
ast * get_ast() const { return m_ast; } ast * get_ast() const { return m_ast; }
static char const * cls_kind() { return "AST"; } static char const * cls_kind() { return "AST"; }
virtual char const * kind() const { return cls_kind(); } char const * kind() const override { return cls_kind(); }
}; };
class stream_ref { class stream_ref {
@ -250,8 +250,8 @@ protected:
datatype_util m_dt_util; datatype_util m_dt_util;
public: public:
dt_eh(cmd_context & owner); dt_eh(cmd_context & owner);
virtual ~dt_eh(); ~dt_eh() override;
virtual void operator()(sort * dt, pdecl* pd); void operator()(sort * dt, pdecl* pd) override;
}; };
friend class dt_eh; friend class dt_eh;
@ -307,7 +307,7 @@ protected:
public: public:
cmd_context(bool main_ctx = true, ast_manager * m = 0, symbol const & l = symbol::null); cmd_context(bool main_ctx = true, ast_manager * m = 0, symbol const & l = symbol::null);
~cmd_context(); ~cmd_context() override;
void set_cancel(bool f); void set_cancel(bool f);
context_params & params() { return m_params; } context_params & params() { return m_params; }
solver_factory &get_solver_factory() { return *m_solver_factory; } solver_factory &get_solver_factory() { return *m_solver_factory; }
@ -354,7 +354,7 @@ public:
bool has_manager() const { return m_manager != 0; } bool has_manager() const { return m_manager != 0; }
ast_manager & m() const { const_cast<cmd_context*>(this)->init_manager(); return *m_manager; } ast_manager & m() const { const_cast<cmd_context*>(this)->init_manager(); return *m_manager; }
virtual ast_manager & get_ast_manager() { return m(); } ast_manager & get_ast_manager() override { return m(); }
pdecl_manager & pm() const { if (!m_pmanager) const_cast<cmd_context*>(this)->init_manager(); return *m_pmanager; } pdecl_manager & pm() const { if (!m_pmanager) const_cast<cmd_context*>(this)->init_manager(); return *m_pmanager; }
sexpr_manager & sm() const { if (!m_sexpr_manager) const_cast<cmd_context*>(this)->m_sexpr_manager = alloc(sexpr_manager); return *m_sexpr_manager; } sexpr_manager & sm() const { if (!m_sexpr_manager) const_cast<cmd_context*>(this)->m_sexpr_manager = alloc(sexpr_manager); return *m_sexpr_manager; }
@ -407,8 +407,8 @@ public:
void set_regular_stream(char const * name) { m_regular.set(name); } void set_regular_stream(char const * name) { m_regular.set(name); }
void set_regular_stream(std::ostream& out) { m_regular.set(out); } void set_regular_stream(std::ostream& out) { m_regular.set(out); }
void set_diagnostic_stream(char const * name); void set_diagnostic_stream(char const * name);
virtual std::ostream & regular_stream() { return *m_regular; } std::ostream & regular_stream() override { return *m_regular; }
virtual std::ostream & diagnostic_stream() { return *m_diagnostic; } std::ostream & diagnostic_stream() override { return *m_diagnostic; }
char const * get_regular_stream_name() const { return m_regular.name(); } char const * get_regular_stream_name() const { return m_regular.name(); }
char const * get_diagnostic_stream_name() const { return m_diagnostic.name(); } char const * get_diagnostic_stream_name() const { return m_diagnostic.name(); }
typedef dictionary<cmd*>::iterator cmd_iterator; typedef dictionary<cmd*>::iterator cmd_iterator;
@ -462,14 +462,14 @@ public:
} }
format_ns::format * pp(sort * s) const; format_ns::format * pp(sort * s) const;
virtual void pp(sort * s, format_ns::format_ref & r) const { r = pp(s); } void pp(sort * s, format_ns::format_ref & r) const override { r = pp(s); }
virtual void pp(func_decl * f, format_ns::format_ref & r) const; void pp(func_decl * f, format_ns::format_ref & r) const override;
virtual void pp(expr * n, unsigned num_vars, char const * var_prefix, format_ns::format_ref & r, sbuffer<symbol> & var_names) const; void pp(expr * n, unsigned num_vars, char const * var_prefix, format_ns::format_ref & r, sbuffer<symbol> & var_names) const override;
virtual void pp(expr * n, format_ns::format_ref & r) const; void pp(expr * n, format_ns::format_ref & r) const override;
virtual void display(std::ostream & out, sort * s, unsigned indent = 0) const; void display(std::ostream & out, sort * s, unsigned indent = 0) const override;
virtual void display(std::ostream & out, expr * n, unsigned indent, unsigned num_vars, char const * var_prefix, sbuffer<symbol> & var_names) const; void display(std::ostream & out, expr * n, unsigned indent, unsigned num_vars, char const * var_prefix, sbuffer<symbol> & var_names) const override;
virtual void display(std::ostream & out, expr * n, unsigned indent = 0) const; void display(std::ostream & out, expr * n, unsigned indent = 0) const override;
virtual void display(std::ostream & out, func_decl * f, unsigned indent = 0) const; void display(std::ostream & out, func_decl * f, unsigned indent = 0) const override;
// dump assertions in out using the pretty printer. // dump assertions in out using the pretty printer.
void dump_assertions(std::ostream & out) const; void dump_assertions(std::ostream & out) const;
@ -478,8 +478,8 @@ public:
void display_smt2_benchmark(std::ostream & out, unsigned num, expr * const * assertions, symbol const & logic = symbol::null) const; void display_smt2_benchmark(std::ostream & out, unsigned num, expr * const * assertions, symbol const & logic = symbol::null) const;
virtual void slow_progress_sample(); void slow_progress_sample() override;
virtual void fast_progress_sample(); void fast_progress_sample() override;
}; };
std::ostream & operator<<(std::ostream & out, cmd_context::status st); std::ostream & operator<<(std::ostream & out, cmd_context::status st);

View file

@ -27,11 +27,11 @@ class echo_tactic : public skip_tactic {
public: public:
echo_tactic(cmd_context & ctx, char const * msg, bool newline):m_ctx(ctx), m_msg(msg), m_newline(newline) {} echo_tactic(cmd_context & ctx, char const * msg, bool newline):m_ctx(ctx), m_msg(msg), m_newline(newline) {}
virtual void operator()(goal_ref const & in, void operator()(goal_ref const & in,
goal_ref_buffer & result, goal_ref_buffer & result,
model_converter_ref & mc, model_converter_ref & mc,
proof_converter_ref & pc, proof_converter_ref & pc,
expr_dependency_ref & core) { expr_dependency_ref & core) override {
#pragma omp critical (echo_tactic) #pragma omp critical (echo_tactic)
{ {
m_ctx.regular_stream() << m_msg; m_ctx.regular_stream() << m_msg;
@ -57,15 +57,15 @@ public:
m_p->inc_ref(); m_p->inc_ref();
} }
~probe_value_tactic() { ~probe_value_tactic() override {
m_p->dec_ref(); m_p->dec_ref();
} }
virtual void operator()(goal_ref const & in, void operator()(goal_ref const & in,
goal_ref_buffer & result, goal_ref_buffer & result,
model_converter_ref & mc, model_converter_ref & mc,
proof_converter_ref & pc, proof_converter_ref & pc,
expr_dependency_ref & core) { expr_dependency_ref & core) override {
double val = (*m_p)(*(in.get())).get_value(); double val = (*m_p)(*(in.get())).get_value();
#pragma omp critical (probe_value_tactic) #pragma omp critical (probe_value_tactic)
{ {

View file

@ -29,33 +29,33 @@ class eval_cmd : public parametric_cmd {
public: public:
eval_cmd():parametric_cmd("eval") {} eval_cmd():parametric_cmd("eval") {}
virtual char const * get_usage() const { return "<term> (<keyword> <value>)*"; } char const * get_usage() const override { return "<term> (<keyword> <value>)*"; }
virtual char const * get_main_descr() const { char const * get_main_descr() const override {
return "evaluate the given term in the current model."; return "evaluate the given term in the current model.";
} }
virtual void init_pdescrs(cmd_context & ctx, param_descrs & p) { void init_pdescrs(cmd_context & ctx, param_descrs & p) override {
model_evaluator::get_param_descrs(p); model_evaluator::get_param_descrs(p);
insert_timeout(p); insert_timeout(p);
p.insert("model_index", CPK_UINT, "(default: 0) index of model from box optimization objective"); p.insert("model_index", CPK_UINT, "(default: 0) index of model from box optimization objective");
} }
virtual void prepare(cmd_context & ctx) { void prepare(cmd_context & ctx) override {
parametric_cmd::prepare(ctx); parametric_cmd::prepare(ctx);
m_target = 0; m_target = 0;
} }
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_EXPR; if (m_target == 0) return CPK_EXPR;
return parametric_cmd::next_arg_kind(ctx); return parametric_cmd::next_arg_kind(ctx);
} }
virtual void set_next_arg(cmd_context & ctx, expr * arg) { void set_next_arg(cmd_context & ctx, expr * arg) override {
m_target = arg; m_target = arg;
} }
virtual void execute(cmd_context & ctx) { void execute(cmd_context & ctx) override {
if (!ctx.is_model_available()) if (!ctx.is_model_available())
throw cmd_exception("model is not available"); throw cmd_exception("model is not available");
if (!m_target) if (!m_target)

View file

@ -104,15 +104,15 @@ class subst_cmd : public cmd {
ptr_vector<expr> m_subst; ptr_vector<expr> m_subst;
public: public:
subst_cmd():cmd("dbg-subst") {} subst_cmd():cmd("dbg-subst") {}
virtual char const * get_usage() const { return "<symbol> (<symbol>*) <symbol>"; } char const * get_usage() const override { return "<symbol> (<symbol>*) <symbol>"; }
virtual char const * get_descr(cmd_context & ctx) const { return "substitute the free variables in the AST referenced by <symbol> using the ASTs referenced by <symbol>*"; } char const * get_descr(cmd_context & ctx) const override { return "substitute the free variables in the AST referenced by <symbol> using the ASTs referenced by <symbol>*"; }
virtual unsigned get_arity() const { return 3; } unsigned get_arity() const override { return 3; }
virtual void prepare(cmd_context & ctx) { m_idx = 0; m_source = 0; } void prepare(cmd_context & ctx) override { m_idx = 0; m_source = 0; }
virtual cmd_arg_kind next_arg_kind(cmd_context & ctx) const { cmd_arg_kind next_arg_kind(cmd_context & ctx) const override {
if (m_idx == 1) return CPK_SYMBOL_LIST; if (m_idx == 1) return CPK_SYMBOL_LIST;
return CPK_SYMBOL; return CPK_SYMBOL;
} }
virtual void set_next_arg(cmd_context & ctx, symbol const & s) { void set_next_arg(cmd_context & ctx, symbol const & s) override {
if (m_idx == 0) { if (m_idx == 0) {
m_source = get_expr_ref(ctx, s); m_source = get_expr_ref(ctx, s);
} }
@ -121,7 +121,7 @@ public:
} }
m_idx++; m_idx++;
} }
virtual void set_next_arg(cmd_context & ctx, unsigned num, symbol const * s) { void set_next_arg(cmd_context & ctx, unsigned num, symbol const * s) override {
m_subst.reset(); m_subst.reset();
unsigned i = num; unsigned i = num;
while (i > 0) { while (i > 0) {
@ -130,7 +130,7 @@ public:
} }
m_idx++; m_idx++;
} }
virtual void execute(cmd_context & ctx) { void execute(cmd_context & ctx) override {
expr_ref r(ctx.m()); expr_ref r(ctx.m());
beta_reducer p(ctx.m()); beta_reducer p(ctx.m());
p(m_source, m_subst.size(), m_subst.c_ptr(), r); p(m_source, m_subst.size(), m_subst.c_ptr(), r);
@ -179,18 +179,18 @@ class lt_cmd : public cmd {
expr * m_t2; expr * m_t2;
public: public:
lt_cmd():cmd("dbg-lt") {} lt_cmd():cmd("dbg-lt") {}
virtual char const * get_usage() const { return "<term> <term>"; } char const * get_usage() const override { return "<term> <term>"; }
virtual char const * get_descr(cmd_context & ctx) const { return "return true if the first term is smaller than the second one in the internal Z3 total order on terms."; } char const * get_descr(cmd_context & ctx) const override { return "return true if the first term is smaller than the second one in the internal Z3 total order on terms."; }
virtual unsigned get_arity() const { return 2; } unsigned get_arity() const override { return 2; }
virtual void prepare(cmd_context & ctx) { m_t1 = 0; } void prepare(cmd_context & ctx) override { m_t1 = 0; }
virtual cmd_arg_kind next_arg_kind(cmd_context & ctx) const { return CPK_EXPR; } cmd_arg_kind next_arg_kind(cmd_context & ctx) const override { return CPK_EXPR; }
virtual void set_next_arg(cmd_context & ctx, expr * arg) { void set_next_arg(cmd_context & ctx, expr * arg) override {
if (m_t1 == 0) if (m_t1 == 0)
m_t1 = arg; m_t1 = arg;
else else
m_t2 = arg; m_t2 = arg;
} }
virtual void execute(cmd_context & ctx) { void execute(cmd_context & ctx) override {
bool r = lt(m_t1, m_t2); bool r = lt(m_t1, m_t2);
ctx.regular_stream() << (r ? "true" : "false") << std::endl; ctx.regular_stream() << (r ? "true" : "false") << std::endl;
} }
@ -283,23 +283,23 @@ protected:
ptr_vector<expr> m_args; ptr_vector<expr> m_args;
public: public:
instantiate_cmd_core(char const * name):cmd(name) {} instantiate_cmd_core(char const * name):cmd(name) {}
virtual char const * get_usage() const { return "<quantifier> (<symbol>*)"; } char const * get_usage() const override { return "<quantifier> (<symbol>*)"; }
virtual char const * get_descr(cmd_context & ctx) const { return "instantiate the quantifier using the given expressions."; } char const * get_descr(cmd_context & ctx) const override { return "instantiate the quantifier using the given expressions."; }
virtual unsigned get_arity() const { return 2; } unsigned get_arity() const override { return 2; }
virtual void prepare(cmd_context & ctx) { m_q = 0; m_args.reset(); } void prepare(cmd_context & ctx) override { m_q = 0; m_args.reset(); }
virtual cmd_arg_kind next_arg_kind(cmd_context & ctx) const { cmd_arg_kind next_arg_kind(cmd_context & ctx) const override {
if (m_q == 0) return CPK_EXPR; if (m_q == 0) return CPK_EXPR;
else return CPK_EXPR_LIST; else return CPK_EXPR_LIST;
} }
virtual void set_next_arg(cmd_context & ctx, expr * s) { void set_next_arg(cmd_context & ctx, expr * s) override {
if (!is_quantifier(s)) if (!is_quantifier(s))
throw cmd_exception("invalid command, quantifier expected."); throw cmd_exception("invalid command, quantifier expected.");
m_q = to_quantifier(s); m_q = to_quantifier(s);
} }
virtual void set_next_arg(cmd_context & ctx, unsigned num, expr * const * ts) { void set_next_arg(cmd_context & ctx, unsigned num, expr * const * ts) override {
if (num != m_q->get_num_decls()) if (num != m_q->get_num_decls())
throw cmd_exception("invalid command, mismatch between the number of quantified variables and the number of arguments."); throw cmd_exception("invalid command, mismatch between the number of quantified variables and the number of arguments.");
unsigned i = num; unsigned i = num;
@ -315,7 +315,7 @@ public:
m_args.append(num, ts); m_args.append(num, ts);
} }
virtual void execute(cmd_context & ctx) { void execute(cmd_context & ctx) override {
expr_ref r(ctx.m()); expr_ref r(ctx.m());
instantiate(ctx.m(), m_q, m_args.c_ptr(), r); instantiate(ctx.m(), m_q, m_args.c_ptr(), r);
ctx.display(ctx.regular_stream(), r); ctx.display(ctx.regular_stream(), r);
@ -332,9 +332,9 @@ class instantiate_nested_cmd : public instantiate_cmd_core {
public: public:
instantiate_nested_cmd():instantiate_cmd_core("dbg-instantiate-nested") {} instantiate_nested_cmd():instantiate_cmd_core("dbg-instantiate-nested") {}
virtual char const * get_descr(cmd_context & ctx) const { return "instantiate the quantifier nested in the outermost quantifier, this command is used to test the instantiation procedure with quantifiers that contain free variables."; } char const * get_descr(cmd_context & ctx) const override { return "instantiate the quantifier nested in the outermost quantifier, this command is used to test the instantiation procedure with quantifiers that contain free variables."; }
virtual void set_next_arg(cmd_context & ctx, expr * s) { void set_next_arg(cmd_context & ctx, expr * s) override {
instantiate_cmd_core::set_next_arg(ctx, s); instantiate_cmd_core::set_next_arg(ctx, s);
if (!is_quantifier(m_q->get_expr())) if (!is_quantifier(m_q->get_expr()))
throw cmd_exception("invalid command, nested quantifier expected"); throw cmd_exception("invalid command, nested quantifier expected");
@ -345,11 +345,11 @@ public:
class print_dimacs_cmd : public cmd { class print_dimacs_cmd : public cmd {
public: public:
print_dimacs_cmd():cmd("display-dimacs") {} print_dimacs_cmd():cmd("display-dimacs") {}
virtual char const * get_usage() const { return ""; } char const * get_usage() const override { return ""; }
virtual char const * get_descr(cmd_context & ctx) const { return "print benchmark in DIMACS format"; } char const * get_descr(cmd_context & ctx) const override { return "print benchmark in DIMACS format"; }
virtual unsigned get_arity() const { return 0; } unsigned get_arity() const override { return 0; }
virtual void prepare(cmd_context & ctx) {} void prepare(cmd_context & ctx) override {}
virtual void execute(cmd_context & ctx) { ctx.display_dimacs(); } void execute(cmd_context & ctx) override { ctx.display_dimacs(); }
}; };

View file

@ -164,33 +164,33 @@ class poly_isolate_roots_cmd : public cmd {
public: public:
poly_isolate_roots_cmd(char const * name = "poly/isolate-roots"):cmd(name), m_ctx(0) {} poly_isolate_roots_cmd(char const * name = "poly/isolate-roots"):cmd(name), m_ctx(0) {}
virtual char const * get_usage() const { return "<term> (<term> <value>)*"; } char const * get_usage() const override { return "<term> (<term> <value>)*"; }
virtual char const * get_descr(cmd_context & ctx) const { return "isolate the roots a multivariate polynomial modulo an assignment"; } char const * get_descr(cmd_context & ctx) const override { return "isolate the roots a multivariate polynomial modulo an assignment"; }
virtual unsigned get_arity() const { return VAR_ARITY; } unsigned get_arity() const override { return VAR_ARITY; }
virtual void prepare(cmd_context & ctx) { void prepare(cmd_context & ctx) override {
m_ctx = alloc(context, ctx.m()); m_ctx = alloc(context, ctx.m());
} }
virtual void finalize(cmd_context & ctx) { void finalize(cmd_context & ctx) override {
m_ctx = 0; m_ctx = 0;
} }
virtual void failure_cleanup(cmd_context & ctx) { void failure_cleanup(cmd_context & ctx) override {
m_ctx = 0; m_ctx = 0;
} }
virtual cmd_arg_kind next_arg_kind(cmd_context & ctx) const { cmd_arg_kind next_arg_kind(cmd_context & ctx) const override {
return CPK_EXPR; return CPK_EXPR;
} }
virtual void set_next_arg(cmd_context & ctx, expr * arg) { void set_next_arg(cmd_context & ctx, expr * arg) override {
m_ctx->set_next_arg(ctx, arg); m_ctx->set_next_arg(ctx, arg);
} }
virtual void execute(cmd_context & ctx) { void execute(cmd_context & ctx) override {
m_ctx->execute(ctx); m_ctx->execute(ctx);
m_ctx = 0; m_ctx = 0;
} }
@ -204,31 +204,31 @@ class poly_factor_cmd : public parametric_cmd {
public: public:
poly_factor_cmd(char const * name = "poly/factor"):parametric_cmd(name) {} poly_factor_cmd(char const * name = "poly/factor"):parametric_cmd(name) {}
virtual char const * get_usage() const { return "<term> (<keyword> <value>)*"; } char const * get_usage() const override { return "<term> (<keyword> <value>)*"; }
virtual char const * get_main_descr() const { char const * get_main_descr() const override {
return "factor a polynomial"; return "factor a polynomial";
} }
virtual void init_pdescrs(cmd_context & ctx, param_descrs & p) { void init_pdescrs(cmd_context & ctx, param_descrs & p) override {
polynomial::factor_params::get_param_descrs(p); polynomial::factor_params::get_param_descrs(p);
} }
virtual void prepare(cmd_context & ctx) { void prepare(cmd_context & ctx) override {
parametric_cmd::prepare(ctx); parametric_cmd::prepare(ctx);
m_target = 0; m_target = 0;
} }
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_EXPR; if (m_target == 0) return CPK_EXPR;
return parametric_cmd::next_arg_kind(ctx); return parametric_cmd::next_arg_kind(ctx);
} }
virtual void set_next_arg(cmd_context & ctx, expr * arg) { void set_next_arg(cmd_context & ctx, expr * arg) override {
m_target = arg; m_target = arg;
} }
virtual void execute(cmd_context & ctx) { void execute(cmd_context & ctx) override {
polynomial::factor_params ps; polynomial::factor_params ps;
ps.updt_params(m_params); ps.updt_params(m_params);
factor(ctx, m_target, ps); factor(ctx, m_target, ps);

View file

@ -219,29 +219,29 @@ protected:
public: public:
get_interpolant_cmd(char const * name = "get-interpolant"):parametric_cmd(name) {} get_interpolant_cmd(char const * name = "get-interpolant"):parametric_cmd(name) {}
virtual char const * get_usage() const { return "<fmla>+"; } char const * get_usage() const override { return "<fmla>+"; }
virtual char const * get_main_descr() const { char const * get_main_descr() const override {
return "get interpolant for formulas"; return "get interpolant for formulas";
} }
virtual void init_pdescrs(cmd_context & ctx, param_descrs & p) { void init_pdescrs(cmd_context & ctx, param_descrs & p) override {
} }
virtual void prepare(cmd_context & ctx) { void prepare(cmd_context & ctx) override {
parametric_cmd::prepare(ctx); parametric_cmd::prepare(ctx);
m_targets.resize(0); m_targets.resize(0);
} }
virtual cmd_arg_kind next_arg_kind(cmd_context & ctx) const { cmd_arg_kind next_arg_kind(cmd_context & ctx) const override {
return CPK_EXPR; return CPK_EXPR;
} }
virtual void set_next_arg(cmd_context & ctx, expr * arg) { void set_next_arg(cmd_context & ctx, expr * arg) override {
m_targets.push_back(arg); m_targets.push_back(arg);
} }
virtual void execute(cmd_context & ctx) { void execute(cmd_context & ctx) override {
get_interpolant(ctx,m_targets,m_params); get_interpolant(ctx,m_targets,m_params);
} }
}; };
@ -250,7 +250,7 @@ class compute_interpolant_cmd : public get_interpolant_cmd {
public: public:
compute_interpolant_cmd(char const * name = "compute-interpolant"):get_interpolant_cmd(name) {} compute_interpolant_cmd(char const * name = "compute-interpolant"):get_interpolant_cmd(name) {}
virtual void execute(cmd_context & ctx) { void execute(cmd_context & ctx) override {
compute_interpolant(ctx,m_targets,m_params); compute_interpolant(ctx,m_targets,m_params);
} }

View file

@ -31,48 +31,48 @@ public:
scoped_ptr<param_descrs> m_pdescrs; scoped_ptr<param_descrs> m_pdescrs;
public: public:
parametric_cmd(char const * name):cmd(name), m_descr(0) {} parametric_cmd(char const * name):cmd(name), m_descr(0) {}
virtual ~parametric_cmd() { if (m_descr) dealloc(m_descr); } ~parametric_cmd() override { if (m_descr) dealloc(m_descr); }
virtual void init_pdescrs(cmd_context & ctx, param_descrs & d) = 0; virtual void init_pdescrs(cmd_context & ctx, param_descrs & d) = 0;
param_descrs const & pdescrs(cmd_context & ctx) const; param_descrs const & pdescrs(cmd_context & ctx) const;
params_ref const & ps() const { return m_params; } params_ref const & ps() const { return m_params; }
virtual char const * get_main_descr() const = 0; virtual char const * get_main_descr() const = 0;
virtual char const * get_descr(cmd_context & ctx) const; char const * get_descr(cmd_context & ctx) const override;
virtual unsigned get_arity() const { return VAR_ARITY; } unsigned get_arity() const override { return VAR_ARITY; }
virtual void prepare(cmd_context & ctx) { m_last = symbol::null; m_params.reset(); } void prepare(cmd_context & ctx) override { m_last = symbol::null; m_params.reset(); }
virtual cmd_arg_kind next_arg_kind(cmd_context & ctx) const; cmd_arg_kind next_arg_kind(cmd_context & ctx) const override;
virtual void set_next_arg(cmd_context & ctx, symbol const & s); void set_next_arg(cmd_context & ctx, symbol const & s) override;
virtual void set_next_arg(cmd_context & ctx, unsigned val) { void set_next_arg(cmd_context & ctx, unsigned val) override {
m_params.set_uint(m_last, val); m_params.set_uint(m_last, val);
m_last = symbol::null; m_last = symbol::null;
} }
virtual void set_next_arg(cmd_context & ctx, bool val) { void set_next_arg(cmd_context & ctx, bool val) override {
m_params.set_bool(m_last, val); m_params.set_bool(m_last, val);
m_last = symbol::null; m_last = symbol::null;
} }
virtual void set_next_arg(cmd_context & ctx, rational const & val) { void set_next_arg(cmd_context & ctx, rational const & val) override {
m_params.set_rat(m_last, val); m_params.set_rat(m_last, val);
m_last = symbol::null; m_last = symbol::null;
} }
virtual void set_next_arg(cmd_context & ctx, char const * val) { void set_next_arg(cmd_context & ctx, char const * val) override {
m_params.set_str(m_last, val); m_params.set_str(m_last, val);
m_last = symbol::null; m_last = symbol::null;
} }
virtual void set_next_arg(cmd_context & ctx, sort * s) { void set_next_arg(cmd_context & ctx, sort * s) override {
NOT_IMPLEMENTED_YET(); NOT_IMPLEMENTED_YET();
// m_params.set_sort(m_last, s); // m_params.set_sort(m_last, s);
// m_last = symbol::null; // m_last = symbol::null;
} }
virtual void set_next_arg(cmd_context & ctx, expr * t) { void set_next_arg(cmd_context & ctx, expr * t) override {
NOT_IMPLEMENTED_YET(); NOT_IMPLEMENTED_YET();
// m_params.set_expr(m_last, t); // m_params.set_expr(m_last, t);
// m_last = symbol::null; // m_last = symbol::null;
} }
virtual void set_next_arg(cmd_context & ctx, func_decl * f) { void set_next_arg(cmd_context & ctx, func_decl * f) override {
NOT_IMPLEMENTED_YET(); NOT_IMPLEMENTED_YET();
// m_params.set_func_decl(m_last, f); // m_params.set_func_decl(m_last, f);
// m_last = symbol::null; // m_last = symbol::null;
} }
virtual void set_next_arg(cmd_context & ctx, sexpr * n) { UNREACHABLE(); } void set_next_arg(cmd_context & ctx, sexpr * n) override { UNREACHABLE(); }
}; };
#endif #endif

View file

@ -136,25 +136,25 @@ class psort_sort : public psort {
friend class pdecl_manager; friend class pdecl_manager;
sort * m_sort; sort * m_sort;
psort_sort(unsigned id, pdecl_manager & m, sort * s):psort(id, 0), m_sort(s) { m.m().inc_ref(m_sort); } psort_sort(unsigned id, pdecl_manager & m, sort * s):psort(id, 0), m_sort(s) { m.m().inc_ref(m_sort); }
virtual void finalize(pdecl_manager & m) { void finalize(pdecl_manager & m) override {
m.m().dec_ref(m_sort); m.m().dec_ref(m_sort);
psort::finalize(m); psort::finalize(m);
} }
virtual bool check_num_params(pdecl * other) const { return true; } bool check_num_params(pdecl * other) const override { return true; }
virtual size_t obj_size() const { return sizeof(psort_sort); } size_t obj_size() const override { return sizeof(psort_sort); }
sort * get_sort() const { return m_sort; } sort * get_sort() const { return m_sort; }
virtual sort * instantiate(pdecl_manager & m, sort * const * s) { return m_sort; } sort * instantiate(pdecl_manager & m, sort * const * s) override { return m_sort; }
public: public:
virtual ~psort_sort() {} ~psort_sort() override {}
virtual bool is_sort_wrapper() const { return true; } bool is_sort_wrapper() const override { return true; }
virtual char const * hcons_kind() const { return "psort_sort"; } char const * hcons_kind() const override { return "psort_sort"; }
virtual unsigned hcons_hash() const { return m_sort->get_id(); } unsigned hcons_hash() const override { return m_sort->get_id(); }
virtual bool hcons_eq(psort const * other) const { bool hcons_eq(psort const * other) const override {
if (other->hcons_kind() != hcons_kind()) if (other->hcons_kind() != hcons_kind())
return false; return false;
return m_sort == static_cast<psort_sort const *>(other)->m_sort; return m_sort == static_cast<psort_sort const *>(other)->m_sort;
} }
virtual void display(std::ostream & out) const { void display(std::ostream & out) const override {
out << m_sort->get_name(); out << m_sort->get_name();
} }
}; };
@ -163,19 +163,19 @@ class psort_var : public psort {
friend class pdecl_manager; friend class pdecl_manager;
unsigned m_idx; unsigned m_idx;
psort_var(unsigned id, unsigned num_params, unsigned idx):psort(id, num_params), m_idx(idx) { SASSERT(idx < num_params); } psort_var(unsigned id, unsigned num_params, unsigned idx):psort(id, num_params), m_idx(idx) { SASSERT(idx < num_params); }
virtual sort * instantiate(pdecl_manager & m, sort * const * s) { return s[m_idx]; } sort * instantiate(pdecl_manager & m, sort * const * s) override { return s[m_idx]; }
virtual size_t obj_size() const { return sizeof(psort_var); } size_t obj_size() const override { return sizeof(psort_var); }
public: public:
virtual ~psort_var() {} ~psort_var() override {}
virtual char const * hcons_kind() const { return "psort_var"; } char const * hcons_kind() const override { return "psort_var"; }
virtual unsigned hcons_hash() const { return hash_u_u(m_num_params, m_idx); } unsigned hcons_hash() const override { return hash_u_u(m_num_params, m_idx); }
virtual bool hcons_eq(psort const * other) const { bool hcons_eq(psort const * other) const override {
return return
other->hcons_kind() == hcons_kind() && other->hcons_kind() == hcons_kind() &&
get_num_params() == other->get_num_params() && get_num_params() == other->get_num_params() &&
m_idx == static_cast<psort_var const *>(other)->m_idx; m_idx == static_cast<psort_var const *>(other)->m_idx;
} }
virtual void display(std::ostream & out) const { void display(std::ostream & out) const override {
out << "s_" << m_idx; out << "s_" << m_idx;
} }
unsigned idx() const { return m_idx; } unsigned idx() const { return m_idx; }
@ -196,13 +196,13 @@ class psort_app : public psort {
DEBUG_CODE(if (num_args == num_params) { for (unsigned i = 0; i < num_params; i++) args[i]->check_num_params(this); }); DEBUG_CODE(if (num_args == num_params) { for (unsigned i = 0; i < num_params; i++) args[i]->check_num_params(this); });
} }
virtual void finalize(pdecl_manager & m) { void finalize(pdecl_manager & m) override {
m.lazy_dec_ref(m_decl); m.lazy_dec_ref(m_decl);
m.lazy_dec_ref(m_args.size(), m_args.c_ptr()); m.lazy_dec_ref(m_args.size(), m_args.c_ptr());
psort::finalize(m); psort::finalize(m);
} }
virtual size_t obj_size() const { return sizeof(psort_app); } size_t obj_size() const override { return sizeof(psort_app); }
struct khasher { struct khasher {
unsigned operator()(psort_app const * d) const { return d->m_decl->hash(); } unsigned operator()(psort_app const * d) const { return d->m_decl->hash(); }
@ -212,7 +212,7 @@ class psort_app : public psort {
unsigned operator()(psort_app const * d, unsigned idx) const { return d->m_args[idx]->hash(); } unsigned operator()(psort_app const * d, unsigned idx) const { return d->m_args[idx]->hash(); }
}; };
virtual sort * instantiate(pdecl_manager & m, sort * const * s) { sort * instantiate(pdecl_manager & m, sort * const * s) override {
sort * r = find(s); sort * r = find(s);
if (r) if (r)
return r; return r;
@ -228,12 +228,12 @@ class psort_app : public psort {
} }
public: public:
virtual ~psort_app() {} ~psort_app() override {}
virtual char const * hcons_kind() const { return "psort_app"; } char const * hcons_kind() const override { return "psort_app"; }
virtual unsigned hcons_hash() const { unsigned hcons_hash() const override {
return get_composite_hash<psort_app*, khasher, chasher>(const_cast<psort_app*>(this), m_args.size()); return get_composite_hash<psort_app*, khasher, chasher>(const_cast<psort_app*>(this), m_args.size());
} }
virtual bool hcons_eq(psort const * other) const { bool hcons_eq(psort const * other) const override {
if (other->hcons_kind() != hcons_kind()) if (other->hcons_kind() != hcons_kind())
return false; return false;
if (get_num_params() != other->get_num_params()) if (get_num_params() != other->get_num_params())
@ -249,7 +249,7 @@ public:
} }
return true; return true;
} }
virtual void display(std::ostream & out) const { void display(std::ostream & out) const override {
if (m_args.empty()) { if (m_args.empty()) {
out << m_decl->get_name(); out << m_decl->get_name();
} }
@ -752,16 +752,16 @@ struct pdecl_manager::app_sort_info : public pdecl_manager::sort_info {
m.m().inc_array_ref(n, s); m.m().inc_array_ref(n, s);
} }
virtual ~app_sort_info() {} ~app_sort_info() override {}
virtual unsigned obj_size() const { return sizeof(app_sort_info); } unsigned obj_size() const override { return sizeof(app_sort_info); }
virtual void finalize(pdecl_manager & m) { void finalize(pdecl_manager & m) override {
sort_info::finalize(m); sort_info::finalize(m);
m.m().dec_array_ref(m_args.size(), m_args.c_ptr()); m.m().dec_array_ref(m_args.size(), m_args.c_ptr());
} }
virtual void display(std::ostream & out, pdecl_manager const & m) const { void display(std::ostream & out, pdecl_manager const & m) const override {
if (m_args.empty()) { if (m_args.empty()) {
out << m_decl->get_name(); out << m_decl->get_name();
} }
@ -775,7 +775,7 @@ struct pdecl_manager::app_sort_info : public pdecl_manager::sort_info {
} }
} }
virtual format * pp(pdecl_manager const & m) const { format * pp(pdecl_manager const & m) const override {
if (m_args.empty()) { if (m_args.empty()) {
return mk_string(m.m(), m_decl->get_name().str().c_str()); return mk_string(m.m(), m_decl->get_name().str().c_str());
} }
@ -796,11 +796,11 @@ struct pdecl_manager::indexed_sort_info : public pdecl_manager::sort_info {
m_indices(n, s) { m_indices(n, s) {
} }
virtual ~indexed_sort_info() {} ~indexed_sort_info() override {}
virtual unsigned obj_size() const { return sizeof(indexed_sort_info); } unsigned obj_size() const override { return sizeof(indexed_sort_info); }
virtual void display(std::ostream & out, pdecl_manager const & m) const { void display(std::ostream & out, pdecl_manager const & m) const override {
if (m_indices.empty()) { if (m_indices.empty()) {
out << m_decl->get_name(); out << m_decl->get_name();
} }
@ -813,7 +813,7 @@ struct pdecl_manager::indexed_sort_info : public pdecl_manager::sort_info {
} }
} }
virtual format * pp(pdecl_manager const & m) const { format * pp(pdecl_manager const & m) const override {
if (m_indices.empty()) { if (m_indices.empty()) {
return mk_string(m.m(), m_decl->get_name().str().c_str()); return mk_string(m.m(), m_decl->get_name().str().c_str());
} }

View file

@ -65,9 +65,9 @@ protected:
psort_inst_cache * m_inst_cache; psort_inst_cache * m_inst_cache;
friend class pdecl_manager; friend class pdecl_manager;
psort(unsigned id, unsigned num_params):pdecl(id, num_params), m_inst_cache(0) {} psort(unsigned id, unsigned num_params):pdecl(id, num_params), m_inst_cache(0) {}
virtual bool is_psort() const { return true; } bool is_psort() const override { return true; }
virtual void finalize(pdecl_manager & m); void finalize(pdecl_manager & m) override;
virtual ~psort() {} ~psort() override {}
virtual void cache(pdecl_manager & m, sort * const * s, sort * r); virtual void cache(pdecl_manager & m, sort * const * s, sort * r);
virtual sort * find(sort * const * s) const; virtual sort * find(sort * const * s) const;
public: public:
@ -77,7 +77,7 @@ public:
virtual char const * hcons_kind() const = 0; virtual char const * hcons_kind() const = 0;
virtual unsigned hcons_hash() const = 0; virtual unsigned hcons_hash() const = 0;
virtual bool hcons_eq(psort const * other) const = 0; virtual bool hcons_eq(psort const * other) const = 0;
virtual void reset_cache(pdecl_manager& m); void reset_cache(pdecl_manager& m) override;
}; };
// for hash consing // for hash consing
@ -98,8 +98,8 @@ protected:
void cache(pdecl_manager & m, sort * const * s, sort * r); void cache(pdecl_manager & m, sort * const * s, sort * r);
sort * find(sort * const * s); sort * find(sort * const * s);
psort_decl(unsigned id, unsigned num_params, pdecl_manager & m, symbol const & n); psort_decl(unsigned id, unsigned num_params, pdecl_manager & m, symbol const & n);
virtual void finalize(pdecl_manager & m); void finalize(pdecl_manager & m) override;
virtual ~psort_decl() {} ~psort_decl() override {}
public: public:
virtual sort * instantiate(pdecl_manager & m, unsigned n, sort * const * s) = 0; virtual sort * instantiate(pdecl_manager & m, unsigned n, sort * const * s) = 0;
virtual sort * instantiate(pdecl_manager & m, unsigned n, unsigned const * s) { return 0; } virtual sort * instantiate(pdecl_manager & m, unsigned n, unsigned const * s) { return 0; }
@ -108,7 +108,7 @@ public:
// Only builtin declarations can have a variable number of parameters. // Only builtin declarations can have a variable number of parameters.
bool has_var_params() const { return m_num_params == PSORT_DECL_VAR_PARAMS; } bool has_var_params() const { return m_num_params == PSORT_DECL_VAR_PARAMS; }
symbol const & get_name() const { return m_name; } symbol const & get_name() const { return m_name; }
virtual void reset_cache(pdecl_manager& m); void reset_cache(pdecl_manager& m) override;
bool is_user_decl() const { return m_psort_kind == PSORT_USER; } bool is_user_decl() const { return m_psort_kind == PSORT_USER; }
bool is_builtin_decl() const { return m_psort_kind == PSORT_BUILTIN; } bool is_builtin_decl() const { return m_psort_kind == PSORT_BUILTIN; }
bool is_dt_decl() const { return m_psort_kind == PSORT_DT; } bool is_dt_decl() const { return m_psort_kind == PSORT_DT; }
@ -119,12 +119,12 @@ protected:
friend class pdecl_manager; friend class pdecl_manager;
psort * m_def; psort * m_def;
psort_user_decl(unsigned id, unsigned num_params, pdecl_manager & m, symbol const & n, psort * p); psort_user_decl(unsigned id, unsigned num_params, pdecl_manager & m, symbol const & n, psort * p);
virtual size_t obj_size() const { return sizeof(psort_user_decl); } size_t obj_size() const override { return sizeof(psort_user_decl); }
virtual void finalize(pdecl_manager & m); void finalize(pdecl_manager & m) override;
virtual ~psort_user_decl() {} ~psort_user_decl() override {}
public: public:
virtual sort * instantiate(pdecl_manager & m, unsigned n, sort * const * s); sort * instantiate(pdecl_manager & m, unsigned n, sort * const * s) override;
virtual void display(std::ostream & out) const; void display(std::ostream & out) const override;
}; };
class psort_builtin_decl : public psort_decl { class psort_builtin_decl : public psort_decl {
@ -133,23 +133,23 @@ protected:
family_id m_fid; family_id m_fid;
decl_kind m_kind; decl_kind m_kind;
psort_builtin_decl(unsigned id, pdecl_manager & m, symbol const & n, family_id fid, decl_kind k); psort_builtin_decl(unsigned id, pdecl_manager & m, symbol const & n, family_id fid, decl_kind k);
virtual size_t obj_size() const { return sizeof(psort_builtin_decl); } size_t obj_size() const override { return sizeof(psort_builtin_decl); }
virtual ~psort_builtin_decl() {} ~psort_builtin_decl() override {}
public: public:
virtual sort * instantiate(pdecl_manager & m, unsigned n, sort * const * s); sort * instantiate(pdecl_manager & m, unsigned n, sort * const * s) override;
virtual sort * instantiate(pdecl_manager & m, unsigned n, unsigned const * s); sort * instantiate(pdecl_manager & m, unsigned n, unsigned const * s) override;
virtual void display(std::ostream & out) const; void display(std::ostream & out) const override;
}; };
class psort_dt_decl : public psort_decl { class psort_dt_decl : public psort_decl {
protected: protected:
friend class pdecl_manager; friend class pdecl_manager;
psort_dt_decl(unsigned id, unsigned num_params, pdecl_manager & m, symbol const & n); psort_dt_decl(unsigned id, unsigned num_params, pdecl_manager & m, symbol const & n);
virtual size_t obj_size() const { return sizeof(psort_dt_decl); } size_t obj_size() const override { return sizeof(psort_dt_decl); }
virtual ~psort_dt_decl() {} ~psort_dt_decl() override {}
public: public:
virtual sort * instantiate(pdecl_manager & m, unsigned n, sort * const * s); sort * instantiate(pdecl_manager & m, unsigned n, sort * const * s) override;
virtual void display(std::ostream & out) const; void display(std::ostream & out) const override;
}; };
@ -190,16 +190,16 @@ class paccessor_decl : public pdecl {
symbol m_name; symbol m_name;
ptype m_type; ptype m_type;
paccessor_decl(unsigned id, unsigned num_params, pdecl_manager & m, symbol const & n, ptype const & r); paccessor_decl(unsigned id, unsigned num_params, pdecl_manager & m, symbol const & n, ptype const & r);
virtual void finalize(pdecl_manager & m); void finalize(pdecl_manager & m) override;
virtual size_t obj_size() const { return sizeof(paccessor_decl); } size_t obj_size() const override { return sizeof(paccessor_decl); }
bool has_missing_refs(symbol & missing) const; bool has_missing_refs(symbol & missing) const;
bool fix_missing_refs(dictionary<int> const & symbol2idx, symbol & missing); bool fix_missing_refs(dictionary<int> const & symbol2idx, symbol & missing);
accessor_decl * instantiate_decl(pdecl_manager & m, sort * const * s); accessor_decl * instantiate_decl(pdecl_manager & m, sort * const * s);
symbol const & get_name() const { return m_name; } symbol const & get_name() const { return m_name; }
ptype const & get_type() const { return m_type; } ptype const & get_type() const { return m_type; }
virtual ~paccessor_decl() {} ~paccessor_decl() override {}
public: public:
virtual void display(std::ostream & out) const { pdecl::display(out); } void display(std::ostream & out) const override { pdecl::display(out); }
void display(std::ostream & out, pdatatype_decl const * const * dts) const; void display(std::ostream & out, pdatatype_decl const * const * dts) const;
}; };
@ -211,16 +211,16 @@ class pconstructor_decl : public pdecl {
ptr_vector<paccessor_decl> m_accessors; ptr_vector<paccessor_decl> m_accessors;
pconstructor_decl(unsigned id, unsigned num_params, pdecl_manager & m, pconstructor_decl(unsigned id, unsigned num_params, pdecl_manager & m,
symbol const & n, symbol const & r, unsigned num_accessors, paccessor_decl * const * accessors); symbol const & n, symbol const & r, unsigned num_accessors, paccessor_decl * const * accessors);
virtual void finalize(pdecl_manager & m); void finalize(pdecl_manager & m) override;
virtual size_t obj_size() const { return sizeof(pconstructor_decl); } size_t obj_size() const override { return sizeof(pconstructor_decl); }
bool has_missing_refs(symbol & missing) const; bool has_missing_refs(symbol & missing) const;
bool fix_missing_refs(dictionary<int> const & symbol2idx, symbol & missing); bool fix_missing_refs(dictionary<int> const & symbol2idx, symbol & missing);
symbol const & get_name() const { return m_name; } symbol const & get_name() const { return m_name; }
symbol const & get_recognizer_name() const { return m_recogniser_name; } symbol const & get_recognizer_name() const { return m_recogniser_name; }
constructor_decl * instantiate_decl(pdecl_manager & m, sort * const * s); constructor_decl * instantiate_decl(pdecl_manager & m, sort * const * s);
virtual ~pconstructor_decl() {} ~pconstructor_decl() override {}
public: public:
virtual void display(std::ostream & out) const { pdecl::display(out); } void display(std::ostream & out) const override { pdecl::display(out); }
void display(std::ostream & out, pdatatype_decl const * const * dts) const; void display(std::ostream & out, pdatatype_decl const * const * dts) const;
}; };
@ -231,14 +231,14 @@ class pdatatype_decl : public psort_decl {
pdatatypes_decl * m_parent; pdatatypes_decl * m_parent;
pdatatype_decl(unsigned id, unsigned num_params, pdecl_manager & m, symbol const & n, pdatatype_decl(unsigned id, unsigned num_params, pdecl_manager & m, symbol const & n,
unsigned num_constructors, pconstructor_decl * const * constructors); unsigned num_constructors, pconstructor_decl * const * constructors);
virtual void finalize(pdecl_manager & m); void finalize(pdecl_manager & m) override;
virtual size_t obj_size() const { return sizeof(pdatatype_decl); } size_t obj_size() const override { return sizeof(pdatatype_decl); }
bool fix_missing_refs(dictionary<int> const & symbol2idx, symbol & missing); bool fix_missing_refs(dictionary<int> const & symbol2idx, symbol & missing);
datatype_decl * instantiate_decl(pdecl_manager & m, sort * const * s); datatype_decl * instantiate_decl(pdecl_manager & m, sort * const * s);
virtual ~pdatatype_decl() {} ~pdatatype_decl() override {}
public: public:
sort * instantiate(pdecl_manager & m, unsigned n, sort * const * s); sort * instantiate(pdecl_manager & m, unsigned n, sort * const * s) override;
virtual void display(std::ostream & out) const; void display(std::ostream & out) const override;
bool has_missing_refs(symbol & missing) const; bool has_missing_refs(symbol & missing) const;
bool has_duplicate_accessors(symbol & repeated) const; bool has_duplicate_accessors(symbol & repeated) const;
bool commit(pdecl_manager& m); bool commit(pdecl_manager& m);
@ -252,11 +252,11 @@ class pdatatypes_decl : public pdecl {
friend class pdatatype_decl; friend class pdatatype_decl;
ptr_vector<pdatatype_decl> m_datatypes; ptr_vector<pdatatype_decl> m_datatypes;
pdatatypes_decl(unsigned id, unsigned num_params, pdecl_manager & m, unsigned num_datatypes, pdatatype_decl * const * dts); pdatatypes_decl(unsigned id, unsigned num_params, pdecl_manager & m, unsigned num_datatypes, pdatatype_decl * const * dts);
virtual void finalize(pdecl_manager & m); void finalize(pdecl_manager & m) override;
virtual size_t obj_size() const { return sizeof(pdatatypes_decl); } size_t obj_size() const override { return sizeof(pdatatypes_decl); }
bool fix_missing_refs(symbol & missing); bool fix_missing_refs(symbol & missing);
bool instantiate(pdecl_manager & m, sort * const * s); bool instantiate(pdecl_manager & m, sort * const * s);
virtual ~pdatatypes_decl() {} ~pdatatypes_decl() override {}
public: public:
pdatatype_decl const * const * children() const { return m_datatypes.c_ptr(); } pdatatype_decl const * const * children() const { return m_datatypes.c_ptr(); }
pdatatype_decl * const * begin() const { return m_datatypes.begin(); } pdatatype_decl * const * begin() const { return m_datatypes.begin(); }

View file

@ -36,7 +36,7 @@ class simplify_cmd : public parametric_cmd {
public: public:
th_solver(cmd_context& ctx): m_ctx(ctx) {} th_solver(cmd_context& ctx): m_ctx(ctx) {}
virtual lbool check_sat(expr* e) { lbool check_sat(expr* e) override {
if (!m_solver) { if (!m_solver) {
m_solver = m_ctx.get_solver_factory()(m_ctx.m(), m_params, false, true, false, symbol::null); m_solver = m_ctx.get_solver_factory()(m_ctx.m(), m_params, false, true, false, symbol::null);
} }
@ -52,13 +52,13 @@ class simplify_cmd : public parametric_cmd {
public: public:
simplify_cmd(char const * name = "simplify"):parametric_cmd(name) {} simplify_cmd(char const * name = "simplify"):parametric_cmd(name) {}
virtual char const * get_usage() const { return "<term> (<keyword> <value>)*"; } char const * get_usage() const override { return "<term> (<keyword> <value>)*"; }
virtual char const * get_main_descr() const { char const * get_main_descr() const override {
return "simplify the given term using builtin theory simplification rules."; return "simplify the given term using builtin theory simplification rules.";
} }
virtual void init_pdescrs(cmd_context & ctx, param_descrs & p) { void init_pdescrs(cmd_context & ctx, param_descrs & p) override {
th_rewriter::get_param_descrs(p); th_rewriter::get_param_descrs(p);
insert_timeout(p); insert_timeout(p);
p.insert("print", CPK_BOOL, "(default: true) print the simplified term."); p.insert("print", CPK_BOOL, "(default: true) print the simplified term.");
@ -66,24 +66,24 @@ public:
p.insert("print_statistics", CPK_BOOL, "(default: false) print statistics."); p.insert("print_statistics", CPK_BOOL, "(default: false) print statistics.");
} }
virtual ~simplify_cmd() { ~simplify_cmd() override {
} }
virtual void prepare(cmd_context & ctx) { void prepare(cmd_context & ctx) override {
parametric_cmd::prepare(ctx); parametric_cmd::prepare(ctx);
m_target = 0; m_target = 0;
} }
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_EXPR; if (m_target == 0) return CPK_EXPR;
return parametric_cmd::next_arg_kind(ctx); return parametric_cmd::next_arg_kind(ctx);
} }
virtual void set_next_arg(cmd_context & ctx, expr * arg) { void set_next_arg(cmd_context & ctx, expr * arg) override {
m_target = arg; m_target = arg;
} }
virtual void execute(cmd_context & ctx) { void execute(cmd_context & ctx) override {
if (m_target == 0) if (m_target == 0)
throw cmd_exception("invalid simplify command, argument expected"); throw cmd_exception("invalid simplify command, argument expected");
expr_ref r(ctx.m()); expr_ref r(ctx.m());

View file

@ -58,17 +58,17 @@ public:
m_decl(0) { m_decl(0) {
} }
virtual char const * get_usage() const { return "<symbol> <tactic>"; } char const * get_usage() const override { return "<symbol> <tactic>"; }
virtual char const * get_descr(cmd_context & ctx) const { return "declare a new tactic, use (help-tactic) for the tactic language syntax."; } char const * get_descr(cmd_context & ctx) const override { return "declare a new tactic, use (help-tactic) for the tactic language syntax."; }
virtual unsigned get_arity() const { return 2; } unsigned get_arity() const override { return 2; }
virtual void prepare(cmd_context & ctx) { m_name = symbol::null; m_decl = 0; } void prepare(cmd_context & ctx) override { m_name = symbol::null; m_decl = 0; }
virtual cmd_arg_kind next_arg_kind(cmd_context & ctx) const { cmd_arg_kind next_arg_kind(cmd_context & ctx) const override {
if (m_name == symbol::null) return CPK_SYMBOL; if (m_name == symbol::null) return CPK_SYMBOL;
return CPK_SEXPR; return CPK_SEXPR;
} }
virtual void set_next_arg(cmd_context & ctx, symbol const & s) { m_name = s; } void set_next_arg(cmd_context & ctx, symbol const & s) override { m_name = s; }
virtual void set_next_arg(cmd_context & ctx, sexpr * n) { m_decl = n; } void set_next_arg(cmd_context & ctx, sexpr * n) override { m_decl = n; }
virtual void execute(cmd_context & ctx) { void execute(cmd_context & ctx) override {
tactic_ref t = sexpr2tactic(ctx, m_decl); // make sure the tactic is well formed. tactic_ref t = sexpr2tactic(ctx, m_decl); // make sure the tactic is well formed.
ctx.insert_user_tactic(m_name, m_decl); ctx.insert_user_tactic(m_name, m_decl);
} }
@ -133,23 +133,23 @@ public:
parametric_cmd(name) { parametric_cmd(name) {
} }
virtual char const * get_usage() const { return "<tactic> (<keyword> <value>)*"; } char const * get_usage() const override { return "<tactic> (<keyword> <value>)*"; }
virtual void prepare(cmd_context & ctx) { void prepare(cmd_context & ctx) override {
parametric_cmd::prepare(ctx); parametric_cmd::prepare(ctx);
m_tactic = 0; m_tactic = 0;
} }
virtual cmd_arg_kind next_arg_kind(cmd_context & ctx) const { cmd_arg_kind next_arg_kind(cmd_context & ctx) const override {
if (m_tactic == 0) return CPK_SEXPR; if (m_tactic == 0) return CPK_SEXPR;
return parametric_cmd::next_arg_kind(ctx); return parametric_cmd::next_arg_kind(ctx);
} }
virtual void set_next_arg(cmd_context & ctx, sexpr * arg) { void set_next_arg(cmd_context & ctx, sexpr * arg) override {
m_tactic = arg; m_tactic = arg;
} }
virtual void init_pdescrs(cmd_context & ctx, param_descrs & p) { void init_pdescrs(cmd_context & ctx, param_descrs & p) override {
insert_timeout(p); insert_timeout(p);
insert_max_memory(p); insert_max_memory(p);
p.insert("print_statistics", CPK_BOOL, "(default: false) print statistics."); p.insert("print_statistics", CPK_BOOL, "(default: false) print statistics.");
@ -172,7 +172,7 @@ public:
check_sat_tactic_result(ast_manager & m) : simple_check_sat_result(m) { check_sat_tactic_result(ast_manager & m) : simple_check_sat_result(m) {
} }
virtual void get_labels(svector<symbol> & r) { void get_labels(svector<symbol> & r) override {
r.append(labels); r.append(labels);
} }
@ -187,16 +187,16 @@ public:
exec_given_tactic_cmd("check-sat-using") { exec_given_tactic_cmd("check-sat-using") {
} }
virtual char const * get_main_descr() const { return "check if the current context is satisfiable using the given tactic, use (help-tactic) for the tactic language syntax."; } char const * get_main_descr() const override { return "check if the current context is satisfiable using the given tactic, use (help-tactic) for the tactic language syntax."; }
virtual void init_pdescrs(cmd_context & ctx, param_descrs & p) { void init_pdescrs(cmd_context & ctx, param_descrs & p) override {
exec_given_tactic_cmd::init_pdescrs(ctx, p); exec_given_tactic_cmd::init_pdescrs(ctx, p);
p.insert("print_unsat_core", CPK_BOOL, "(default: false) print unsatisfiable core."); p.insert("print_unsat_core", CPK_BOOL, "(default: false) print unsatisfiable core.");
p.insert("print_proof", CPK_BOOL, "(default: false) print proof."); p.insert("print_proof", CPK_BOOL, "(default: false) print proof.");
p.insert("print_model", CPK_BOOL, "(default: false) print model."); p.insert("print_model", CPK_BOOL, "(default: false) print model.");
} }
virtual void execute(cmd_context & ctx) { void execute(cmd_context & ctx) override {
if (!m_tactic) { if (!m_tactic) {
throw cmd_exception("check-sat-using needs a tactic argument"); throw cmd_exception("check-sat-using needs a tactic argument");
} }
@ -295,9 +295,9 @@ public:
exec_given_tactic_cmd("apply") { exec_given_tactic_cmd("apply") {
} }
virtual char const * get_main_descr() const { return "apply the given tactic to the current context, and print the resultant set of goals."; } char const * get_main_descr() const override { return "apply the given tactic to the current context, and print the resultant set of goals."; }
virtual void init_pdescrs(cmd_context & ctx, param_descrs & p) { void init_pdescrs(cmd_context & ctx, param_descrs & p) override {
p.insert("print", CPK_BOOL, "(default: true) print resultant goals."); p.insert("print", CPK_BOOL, "(default: true) print resultant goals.");
#ifndef _EXTERNAL_RELEASE #ifndef _EXTERNAL_RELEASE
p.insert("print_proof", CPK_BOOL, "(default: false) print proof associated with each assertion."); p.insert("print_proof", CPK_BOOL, "(default: false) print proof associated with each assertion.");
@ -308,7 +308,7 @@ public:
exec_given_tactic_cmd::init_pdescrs(ctx, p); exec_given_tactic_cmd::init_pdescrs(ctx, p);
} }
virtual void execute(cmd_context & ctx) { void execute(cmd_context & ctx) override {
if (!m_tactic) { if (!m_tactic) {
throw cmd_exception("apply needs a tactic argument"); throw cmd_exception("apply needs a tactic argument");
} }

View file

@ -248,14 +248,14 @@ namespace Duality {
TermTree *&interpolants, TermTree *&interpolants,
model &_model, model &_model,
TermTree *goals = 0, TermTree *goals = 0,
bool weak = false) bool weak = false) override
{ {
literals _labels; literals _labels;
islvr->SetWeakInterpolants(weak); islvr->SetWeakInterpolants(weak);
return islvr->interpolate_tree(assumptions,interpolants,_model,_labels,true); return islvr->interpolate_tree(assumptions,interpolants,_model,_labels,true);
} }
void assert_axiom(const expr &axiom){ void assert_axiom(const expr &axiom) override {
#if 1 #if 1
// HACK: large "distict" predicates can kill the legacy SMT solver. // HACK: large "distict" predicates can kill the legacy SMT solver.
// encode them with a UIF // encode them with a UIF
@ -280,11 +280,11 @@ namespace Duality {
islvr->AssertInterpolationAxiom(axiom); islvr->AssertInterpolationAxiom(axiom);
} }
const std::vector<expr> &get_axioms() { const std::vector<expr> &get_axioms() override {
return islvr->GetInterpolationAxioms(); return islvr->GetInterpolationAxioms();
} }
std::string profile(){ std::string profile() override {
return islvr->profile(); return islvr->profile();
} }
@ -307,31 +307,31 @@ namespace Duality {
void write_interpolation_problem(const std::string &file_name, void write_interpolation_problem(const std::string &file_name,
const std::vector<expr> &assumptions, const std::vector<expr> &assumptions,
const std::vector<expr> &theory const std::vector<expr> &theory
){ ) override {
#if 0 #if 0
islvr->write_interpolation_problem(file_name,assumptions,theory); islvr->write_interpolation_problem(file_name,assumptions,theory);
#endif #endif
} }
void cancel(){islvr->cancel();} void cancel() override {islvr->cancel();}
/** Declare a constant in the background theory. */ /** Declare a constant in the background theory. */
virtual void declare_constant(const func_decl &f){ void declare_constant(const func_decl &f) override {
bckg.insert(f); bckg.insert(f);
} }
/** Is this a background constant? */ /** Is this a background constant? */
virtual bool is_constant(const func_decl &f){ bool is_constant(const func_decl &f) override {
return bckg.find(f) != bckg.end(); return bckg.find(f) != bckg.end();
} }
/** Get the constants in the background vocabulary */ /** Get the constants in the background vocabulary */
virtual hash_set<func_decl> &get_constants(){ hash_set<func_decl> &get_constants() override {
return bckg; return bckg;
} }
~iZ3LogicSolver(){ ~iZ3LogicSolver() override {
// delete ictx; // delete ictx;
delete islvr; delete islvr;
} }
@ -1274,7 +1274,7 @@ namespace Duality {
virtual void AssertEdge(Edge *e, int persist = 0, bool with_children = false, bool underapprox = false); virtual void AssertEdge(Edge *e, int persist = 0, bool with_children = false, bool underapprox = false);
#endif #endif
virtual ~RPFP_caching(){} ~RPFP_caching() override {}
protected: protected:
hash_map<ast,expr> AssumptionLits; hash_map<ast,expr> AssumptionLits;
@ -1320,21 +1320,21 @@ namespace Duality {
void FilterCore(std::vector<expr> &core, std::vector<expr> &full_core); void FilterCore(std::vector<expr> &core, std::vector<expr> &full_core);
void ConstrainEdgeLocalizedCache(Edge *e, const Term &tl, std::vector<expr> &lits); void ConstrainEdgeLocalizedCache(Edge *e, const Term &tl, std::vector<expr> &lits);
virtual void slvr_add(const expr &e); void slvr_add(const expr &e) override;
virtual void slvr_pop(int i); void slvr_pop(int i) override;
virtual void slvr_push(); void slvr_push() override;
virtual check_result slvr_check(unsigned n = 0, expr * const assumptions = 0, unsigned *core_size = 0, expr *core = 0); check_result slvr_check(unsigned n = 0, expr * const assumptions = 0, unsigned *core_size = 0, expr *core = 0) override;
virtual lbool ls_interpolate_tree(TermTree *assumptions, lbool ls_interpolate_tree(TermTree *assumptions,
TermTree *&interpolants, TermTree *&interpolants,
model &_model, model &_model,
TermTree *goals = 0, TermTree *goals = 0,
bool weak = false); bool weak = false) override;
virtual bool proof_core_contains(const expr &e); bool proof_core_contains(const expr &e) override;
void GetTermTreeAssertionLiterals(TermTree *assumptions); void GetTermTreeAssertionLiterals(TermTree *assumptions);

View file

@ -151,7 +151,7 @@ namespace Duality {
} }
} }
~Duality(){ ~Duality() override {
#ifdef USE_RPFP_CLONE #ifdef USE_RPFP_CLONE
delete clone_rpfp; delete clone_rpfp;
#endif #endif
@ -321,7 +321,7 @@ namespace Duality {
#endif #endif
/** Solve the problem. */ /** Solve the problem. */
virtual bool Solve(){ bool Solve() override {
PreSolve(); PreSolve();
bool res = SolveMain(); // does the actual work bool res = SolveMain(); // does the actual work
PostSolve(); PostSolve();
@ -398,7 +398,7 @@ namespace Duality {
} }
void Cancel(){ void Cancel() override {
// TODO // TODO
} }
@ -418,7 +418,7 @@ namespace Duality {
} }
#endif #endif
virtual void LearnFrom(Solver *other_solver){ void LearnFrom(Solver *other_solver) override {
// get the counterexample as a guide // get the counterexample as a guide
cex.swap(other_solver->GetCounterexample()); cex.swap(other_solver->GetCounterexample());
@ -429,7 +429,7 @@ namespace Duality {
} }
/** Return a reference to the counterexample */ /** Return a reference to the counterexample */
virtual Counterexample &GetCounterexample(){ Counterexample &GetCounterexample() override {
return cex; return cex;
} }
@ -462,7 +462,7 @@ namespace Duality {
} }
/** Set options (not currently used) */ /** Set options (not currently used) */
virtual bool SetOption(const std::string &option, const std::string &value){ bool SetOption(const std::string &option, const std::string &value) override {
if(option == "full_expand"){ if(option == "full_expand"){
return SetBoolOption(FullExpand,value); return SetBoolOption(FullExpand,value);
} }
@ -828,7 +828,7 @@ namespace Duality {
} }
} }
bool IsResultRecursionBounded(){ bool IsResultRecursionBounded() override {
return recursionBounded; return recursionBounded;
} }
@ -2186,7 +2186,7 @@ namespace Duality {
struct DoRestart {}; struct DoRestart {};
virtual bool Build(){ bool Build() override {
restart_interval = 3; restart_interval = 3;
while (true) { while (true) {
try { try {
@ -2499,7 +2499,7 @@ namespace Duality {
hash_map<Node *, std::vector<Node *> > node_map; hash_map<Node *, std::vector<Node *> > node_map;
std::list<Node *> updated_nodes; std::list<Node *> updated_nodes;
virtual void ExpandNode(RPFP::Node *p){ void ExpandNode(RPFP::Node *p) override {
stack.push_back(stack_entry()); stack.push_back(stack_entry());
stack.back().level = tree->slvr().get_scope_level(); stack.back().level = tree->slvr().get_scope_level();
stack.back().expansions.push_back(p); stack.back().expansions.push_back(p);
@ -2990,13 +2990,13 @@ namespace Duality {
old_cex.swap(_old_cex); // take ownership from caller old_cex.swap(_old_cex); // take ownership from caller
} }
~ReplayHeuristic(){ ~ReplayHeuristic() override {
} }
// Maps nodes of derivation tree into old cex // Maps nodes of derivation tree into old cex
hash_map<Node *, Node*> cex_map; hash_map<Node *, Node*> cex_map;
void Done() { void Done() override {
cex_map.clear(); cex_map.clear();
old_cex.clear(); old_cex.clear();
} }
@ -3045,7 +3045,7 @@ namespace Duality {
return cex_map[node]; return cex_map[node];
} }
int UseNode(Node *node){ int UseNode(Node *node) override {
if (!old_cex.get_tree()) if (!old_cex.get_tree())
return 0; return 0;
Node *old_node = MatchNode(node); Node *old_node = MatchNode(node);
@ -3054,7 +3054,7 @@ namespace Duality {
return old_cex.get_tree()->Empty(old_node) ? -1 : 1; return old_cex.get_tree()->Empty(old_node) ? -1 : 1;
} }
virtual void ChooseExpand(const std::set<RPFP::Node *> &choices, std::set<RPFP::Node *> &best, bool high_priority, bool best_only){ void ChooseExpand(const std::set<RPFP::Node *> &choices, std::set<RPFP::Node *> &best, bool high_priority, bool best_only) override {
if(cex_map.empty()) if(cex_map.empty())
cex_map[*(choices.begin())] = old_cex.get_root(); // match the root nodes cex_map[*(choices.begin())] = old_cex.get_root(); // match the root nodes
if(!high_priority || !old_cex.get_tree()){ if(!high_priority || !old_cex.get_tree()){
@ -3099,7 +3099,7 @@ namespace Duality {
// Maps nodes of derivation tree into old subtree // Maps nodes of derivation tree into old subtree
hash_map<Node *, Node*> cex_map; hash_map<Node *, Node*> cex_map;
virtual void ChooseExpand(const std::set<RPFP::Node *> &choices, std::set<RPFP::Node *> &best, bool, bool){ void ChooseExpand(const std::set<RPFP::Node *> &choices, std::set<RPFP::Node *> &best, bool, bool) override {
if(old_node == 0){ if(old_node == 0){
Heuristic::ChooseExpand(choices,best); Heuristic::ChooseExpand(choices,best);
return; return;
@ -3200,11 +3200,11 @@ namespace Duality {
} }
} }
virtual std::vector<RPFP::Transformer> &Propose(Node *node){ std::vector<RPFP::Transformer> &Propose(Node *node) override {
return conjectures[node->map]; return conjectures[node->map];
} }
virtual ~HistoryProposer(){ ~HistoryProposer() override {
}; };
private: private:
@ -3273,68 +3273,68 @@ namespace Duality {
} }
s << "[" << event++ << "]" ; s << "[" << event++ << "]" ;
} }
virtual void Extend(RPFP::Node *node){ void Extend(RPFP::Node *node) override {
ev(); s << "node " << node->number << ": " << node->Name.name(); ev(); s << "node " << node->number << ": " << node->Name.name();
std::vector<RPFP::Node *> &rps = node->Outgoing->Children; std::vector<RPFP::Node *> &rps = node->Outgoing->Children;
for(unsigned i = 0; i < rps.size(); i++) for(unsigned i = 0; i < rps.size(); i++)
s << " " << rps[i]->number; s << " " << rps[i]->number;
s << std::endl; s << std::endl;
} }
virtual void Update(RPFP::Node *node, const RPFP::Transformer &update, bool eager){ void Update(RPFP::Node *node, const RPFP::Transformer &update, bool eager) override {
ev(); s << "update " << node->number << " " << node->Name.name() << ": "; ev(); s << "update " << node->number << " " << node->Name.name() << ": ";
rpfp->Summarize(update.Formula); rpfp->Summarize(update.Formula);
if(depth > 0) s << " (depth=" << depth << ")"; if(depth > 0) s << " (depth=" << depth << ")";
if(eager) s << " (eager)"; if(eager) s << " (eager)";
s << std::endl; s << std::endl;
} }
virtual void Bound(RPFP::Node *node){ void Bound(RPFP::Node *node) override {
ev(); s << "check " << node->number << std::endl; ev(); s << "check " << node->number << std::endl;
} }
virtual void Expand(RPFP::Edge *edge){ void Expand(RPFP::Edge *edge) override {
RPFP::Node *node = edge->Parent; RPFP::Node *node = edge->Parent;
ev(); s << "expand " << node->map->number << " " << node->Name.name(); ev(); s << "expand " << node->map->number << " " << node->Name.name();
if(depth > 0) s << " (depth=" << depth << ")"; if(depth > 0) s << " (depth=" << depth << ")";
s << std::endl; s << std::endl;
} }
virtual void Depth(int d){ void Depth(int d) override {
depth = d; depth = d;
} }
virtual void AddCover(RPFP::Node *covered, std::vector<RPFP::Node *> &covering){ void AddCover(RPFP::Node *covered, std::vector<RPFP::Node *> &covering) override {
ev(); s << "cover " << covered->Name.name() << ": " << covered->number << " by "; ev(); s << "cover " << covered->Name.name() << ": " << covered->number << " by ";
for(unsigned i = 0; i < covering.size(); i++) for(unsigned i = 0; i < covering.size(); i++)
s << covering[i]->number << " "; s << covering[i]->number << " ";
s << std::endl; s << std::endl;
} }
virtual void RemoveCover(RPFP::Node *covered, RPFP::Node *covering){ void RemoveCover(RPFP::Node *covered, RPFP::Node *covering) override {
ev(); s << "uncover " << covered->Name.name() << ": " << covered->number << " by " << covering->number << std::endl; ev(); s << "uncover " << covered->Name.name() << ": " << covered->number << " by " << covering->number << std::endl;
} }
virtual void Forcing(RPFP::Node *covered, RPFP::Node *covering){ void Forcing(RPFP::Node *covered, RPFP::Node *covering) override {
ev(); s << "forcing " << covered->Name.name() << ": " << covered->number << " by " << covering->number << std::endl; ev(); s << "forcing " << covered->Name.name() << ": " << covered->number << " by " << covering->number << std::endl;
} }
virtual void Conjecture(RPFP::Node *node, const RPFP::Transformer &t){ void Conjecture(RPFP::Node *node, const RPFP::Transformer &t) override {
ev(); s << "conjecture " << node->number << " " << node->Name.name() << ": "; ev(); s << "conjecture " << node->number << " " << node->Name.name() << ": ";
rpfp->Summarize(t.Formula); rpfp->Summarize(t.Formula);
s << std::endl; s << std::endl;
} }
virtual void Dominates(RPFP::Node *node, RPFP::Node *other){ void Dominates(RPFP::Node *node, RPFP::Node *other) override {
ev(); s << "dominates " << node->Name.name() << ": " << node->number << " > " << other->number << std::endl; ev(); s << "dominates " << node->Name.name() << ": " << node->number << " > " << other->number << std::endl;
} }
virtual void InductionFailure(RPFP::Edge *edge, const std::vector<RPFP::Node *> &children){ void InductionFailure(RPFP::Edge *edge, const std::vector<RPFP::Node *> &children) override {
ev(); s << "induction failure: " << edge->Parent->Name.name() << ", children ="; ev(); s << "induction failure: " << edge->Parent->Name.name() << ", children =";
for(unsigned i = 0; i < children.size(); i++) for(unsigned i = 0; i < children.size(); i++)
s << " " << children[i]->number; s << " " << children[i]->number;
s << std::endl; s << std::endl;
} }
virtual void UpdateUnderapprox(RPFP::Node *node, const RPFP::Transformer &update){ void UpdateUnderapprox(RPFP::Node *node, const RPFP::Transformer &update) override {
ev(); s << "underapprox " << node->number << " " << node->Name.name() << ": " << update.Formula << std::endl; ev(); s << "underapprox " << node->number << " " << node->Name.name() << ": " << update.Formula << std::endl;
} }
virtual void Reject(RPFP::Edge *edge, const std::vector<RPFP::Node *> &children){ void Reject(RPFP::Edge *edge, const std::vector<RPFP::Node *> &children) override {
ev(); s << "reject " << edge->Parent->number << " " << edge->Parent->Name.name() << ": "; ev(); s << "reject " << edge->Parent->number << " " << edge->Parent->Name.name() << ": ";
for(unsigned i = 0; i < children.size(); i++) for(unsigned i = 0; i < children.size(); i++)
s << " " << children[i]->number; s << " " << children[i]->number;
s << std::endl; s << std::endl;
} }
virtual void Message(const std::string &msg){ void Message(const std::string &msg) override {
ev(); s << "msg " << msg << std::endl; ev(); s << "msg " << msg << std::endl;
} }
@ -3356,12 +3356,12 @@ namespace Duality {
duality = alloc(Duality,drpfp); duality = alloc(Duality,drpfp);
} }
~DualityDepthBounded(){ ~DualityDepthBounded() override {
dealloc(duality); dealloc(duality);
delete drpfp; delete drpfp;
} }
bool Solve(){ bool Solve() override {
int depth_bound = 10; int depth_bound = 10;
bool res; bool res;
SetMaxDepthRPFP(depth_bound); SetMaxDepthRPFP(depth_bound);
@ -3382,26 +3382,26 @@ namespace Duality {
return res; return res;
} }
Counterexample &GetCounterexample(){ Counterexample &GetCounterexample() override {
return cex; return cex;
} }
bool SetOption(const std::string &option, const std::string &value){ bool SetOption(const std::string &option, const std::string &value) override {
return duality->SetOption(option,value); return duality->SetOption(option,value);
} }
virtual void LearnFrom(Solver *old_solver){ void LearnFrom(Solver *old_solver) override {
DualityDepthBounded *old = dynamic_cast<DualityDepthBounded *>(old_solver); DualityDepthBounded *old = dynamic_cast<DualityDepthBounded *>(old_solver);
if(old){ if(old){
duality->LearnFrom(old->duality); duality->LearnFrom(old->duality);
} }
} }
bool IsResultRecursionBounded(){ bool IsResultRecursionBounded() override {
return duality->IsResultRecursionBounded(); return duality->IsResultRecursionBounded();
} }
void Cancel(){ void Cancel() override {
duality->Cancel(); duality->Cancel();
} }
@ -3580,7 +3580,7 @@ namespace Duality {
public: public:
ConjectureFileReporter(RPFP *_rpfp, const std::string &fname) ConjectureFileReporter(RPFP *_rpfp, const std::string &fname)
: Reporter(_rpfp), s(fname.c_str()) {} : Reporter(_rpfp), s(fname.c_str()) {}
virtual void Update(RPFP::Node *node, const RPFP::Transformer &update, bool eager){ void Update(RPFP::Node *node, const RPFP::Transformer &update, bool eager) override {
s << "(define-fun " << node->Name.name() << " ("; s << "(define-fun " << node->Name.name() << " (";
for(unsigned i = 0; i < update.IndParams.size(); i++){ for(unsigned i = 0; i < update.IndParams.size(); i++){
if(i != 0) if(i != 0)

View file

@ -39,7 +39,7 @@ public:
template<class T> template<class T>
class boolean_algebra : public positive_boolean_algebra<T> { class boolean_algebra : public positive_boolean_algebra<T> {
public: public:
virtual ~boolean_algebra() {} ~boolean_algebra() override {}
virtual T mk_not(T x) = 0; virtual T mk_not(T x) = 0;
}; };

View file

@ -32,9 +32,9 @@ namespace polynomial {
public: public:
simple_var2value(ValManager & m):m_vs(m) {} simple_var2value(ValManager & m):m_vs(m) {}
void push_back(var x, typename ValManager::numeral const & v) { m_xs.push_back(x); m_vs.push_back(v); } void push_back(var x, typename ValManager::numeral const & v) { m_xs.push_back(x); m_vs.push_back(v); }
virtual ValManager & m() const { return m_vs.m(); } ValManager & m() const override { return m_vs.m(); }
virtual bool contains(var x) const { return std::find(m_xs.begin(), m_xs.end(), x) != m_xs.end(); } bool contains(var x) const override { return std::find(m_xs.begin(), m_xs.end(), x) != m_xs.end(); }
virtual typename ValManager::numeral const & operator()(var x) const { typename ValManager::numeral const & operator()(var x) const override {
for (unsigned i = 0; i < m_xs.size(); i++) for (unsigned i = 0; i < m_xs.size(); i++)
if (m_xs[i] == x) if (m_xs[i] == x)
return m_vs[i]; return m_vs[i];

View file

@ -93,7 +93,7 @@ bool model::eval(expr * e, expr_ref & result, bool model_completion) {
struct model::value_proc : public some_value_proc { struct model::value_proc : public some_value_proc {
model & m_model; model & m_model;
value_proc(model & m):m_model(m) {} value_proc(model & m):m_model(m) {}
virtual expr * operator()(sort * s) { expr * operator()(sort * s) override {
ptr_vector<expr> * u = 0; ptr_vector<expr> * u = 0;
if (m_model.m_usort2universe.find(s, u)) { if (m_model.m_usort2universe.find(s, u)) {
if (u->size() > 0) if (u->size() > 0)

View file

@ -33,7 +33,7 @@ protected:
public: public:
model(ast_manager & m); model(ast_manager & m);
virtual ~model(); ~model() override;
void copy_func_interps(model const & source); void copy_func_interps(model const & source);
void copy_const_interps(model const & source); void copy_const_interps(model const & source);
@ -44,10 +44,10 @@ public:
bool eval(func_decl * f, expr_ref & r) const { return model_core::eval(f, r); } bool eval(func_decl * f, expr_ref & r) const { return model_core::eval(f, r); }
bool eval(expr * e, expr_ref & result, bool model_completion = false); bool eval(expr * e, expr_ref & result, bool model_completion = false);
virtual expr * get_some_value(sort * s); expr * get_some_value(sort * s) override;
virtual ptr_vector<expr> const & get_universe(sort * s) const; ptr_vector<expr> const & get_universe(sort * s) const override;
virtual unsigned get_num_uninterpreted_sorts() const; unsigned get_num_uninterpreted_sorts() const override;
virtual sort * get_uninterpreted_sort(unsigned idx) const; sort * get_uninterpreted_sort(unsigned idx) const override;
bool has_uninterpreted_sort(sort * s) const; bool has_uninterpreted_sort(sort * s) const;
// //

View file

@ -66,9 +66,9 @@ namespace nlsat {
void reset() { m_assigned.reset(); } void reset() { m_assigned.reset(); }
bool is_assigned(var x) const { return m_assigned.get(x, false); } bool is_assigned(var x) const { return m_assigned.get(x, false); }
anum const & value(var x) const { return m_values[x]; } anum const & value(var x) const { return m_values[x]; }
virtual anum_manager & m() const { return am(); } anum_manager & m() const override { return am(); }
virtual bool contains(var x) const { return is_assigned(x); } bool contains(var x) const override { return is_assigned(x); }
virtual anum const & operator()(var x) const { SASSERT(is_assigned(x)); return value(x); } anum const & operator()(var x) const override { SASSERT(is_assigned(x)); return value(x); }
void swap(var x, var y) { void swap(var x, var y) {
SASSERT(x < m_values.size() && y < m_values.size()); SASSERT(x < m_values.size() && y < m_values.size());
std::swap(m_assigned[x], m_assigned[y]); std::swap(m_assigned[x], m_assigned[y]);
@ -95,9 +95,9 @@ namespace nlsat {
var m_y; var m_y;
public: public:
undef_var_assignment(assignment const & a, var y):m_assignment(a), m_y(y) {} undef_var_assignment(assignment const & a, var y):m_assignment(a), m_y(y) {}
virtual anum_manager & m() const { return m_assignment.am(); } anum_manager & m() const override { return m_assignment.am(); }
virtual bool contains(var x) const { return x != m_y && m_assignment.is_assigned(x); } bool contains(var x) const override { return x != m_y && m_assignment.is_assigned(x); }
virtual anum const & operator()(var x) const { return m_assignment.value(x); } anum const & operator()(var x) const override { return m_assignment.value(x); }
}; };
}; };

View file

@ -112,7 +112,7 @@ namespace nlsat {
m_perm(perm), m_perm(perm),
m_proc(0) { m_proc(0) {
} }
std::ostream& operator()(std::ostream & out, var x) const { std::ostream& operator()(std::ostream & out, var x) const override {
if (m_proc == 0) if (m_proc == 0)
m_default_display_var(out, x); m_default_display_var(out, x);
else else
@ -2699,7 +2699,7 @@ namespace nlsat {
var m_x; var m_x;
public: public:
mathematica_var_proc(var x):m_x(x) {} mathematica_var_proc(var x):m_x(x) {}
virtual std::ostream& operator()(std::ostream & out, var x) const { std::ostream& operator()(std::ostream & out, var x) const override {
if (m_x == x) if (m_x == x)
return out << "#1"; return out << "#1";
else else

View file

@ -41,11 +41,11 @@ struct goal2nlsat::imp {
m_solver(s) { m_solver(s) {
} }
virtual bool is_int(polynomial::var x) const { bool is_int(polynomial::var x) const override {
return m_solver.is_int(x); return m_solver.is_int(x);
} }
virtual polynomial::var mk_var(bool is_int) { polynomial::var mk_var(bool is_int) override {
return m_solver.mk_var(is_int); return m_solver.mk_var(is_int);
} }
}; };

View file

@ -32,7 +32,7 @@ class nlsat_tactic : public tactic {
ast_manager & m; ast_manager & m;
expr_ref_vector m_var2expr; expr_ref_vector m_var2expr;
expr_display_var_proc(ast_manager & _m):m(_m), m_var2expr(_m) {} expr_display_var_proc(ast_manager & _m):m(_m), m_var2expr(_m) {}
virtual std::ostream& operator()(std::ostream & out, nlsat::var x) const { std::ostream& operator()(std::ostream & out, nlsat::var x) const override {
if (x < m_var2expr.size()) if (x < m_var2expr.size())
return out << mk_ismt2_pp(m_var2expr.get(x), m); return out << mk_ismt2_pp(m_var2expr.get(x), m);
else else
@ -214,29 +214,29 @@ public:
m_imp = 0; m_imp = 0;
} }
virtual tactic * translate(ast_manager & m) { tactic * translate(ast_manager & m) override {
return alloc(nlsat_tactic, m_params); return alloc(nlsat_tactic, m_params);
} }
virtual ~nlsat_tactic() { ~nlsat_tactic() override {
SASSERT(m_imp == 0); SASSERT(m_imp == 0);
} }
virtual void updt_params(params_ref const & p) { void updt_params(params_ref const & p) override {
m_params = p; m_params = p;
} }
virtual void collect_param_descrs(param_descrs & r) { void collect_param_descrs(param_descrs & r) override {
goal2nlsat::collect_param_descrs(r); goal2nlsat::collect_param_descrs(r);
nlsat::solver::collect_param_descrs(r); nlsat::solver::collect_param_descrs(r);
algebraic_numbers::manager::collect_param_descrs(r); algebraic_numbers::manager::collect_param_descrs(r);
} }
virtual void operator()(goal_ref const & in, void operator()(goal_ref const & in,
goal_ref_buffer & result, goal_ref_buffer & result,
model_converter_ref & mc, model_converter_ref & mc,
proof_converter_ref & pc, proof_converter_ref & pc,
expr_dependency_ref & core) { expr_dependency_ref & core) override {
try { try {
imp local_imp(in->m(), m_params); imp local_imp(in->m(), m_params);
scoped_set_imp setter(*this, local_imp); scoped_set_imp setter(*this, local_imp);
@ -251,13 +251,13 @@ public:
} }
} }
virtual void cleanup() {} void cleanup() override {}
virtual void collect_statistics(statistics & st) const { void collect_statistics(statistics & st) const override {
st.copy(m_stats); st.copy(m_stats);
} }
virtual void reset_statistics() { void reset_statistics() override {
m_stats.reset(); m_stats.reset();
} }
}; };

View file

@ -76,15 +76,15 @@ struct simple_check_sat_result : public check_sat_result {
simple_check_sat_result(ast_manager & m); simple_check_sat_result(ast_manager & m);
virtual ~simple_check_sat_result(); ~simple_check_sat_result() override;
virtual ast_manager& get_manager() const { return m_proof.get_manager(); } ast_manager& get_manager() const override { return m_proof.get_manager(); }
virtual void collect_statistics(statistics & st) const; void collect_statistics(statistics & st) const override;
virtual void get_unsat_core(ptr_vector<expr> & r); void get_unsat_core(ptr_vector<expr> & r) override;
virtual void get_model(model_ref & m); void get_model(model_ref & m) override;
virtual proof * get_proof(); proof * get_proof() override;
virtual std::string reason_unknown() const; std::string reason_unknown() const override;
virtual void get_labels(svector<symbol> & r); void get_labels(svector<symbol> & r) override;
virtual void set_reason_unknown(char const* msg) { m_unknown = msg; } void set_reason_unknown(char const* msg) override { m_unknown = msg; }
}; };
#endif #endif

View file

@ -84,12 +84,12 @@ private:
solver * m_solver; solver * m_solver;
volatile bool m_canceled; volatile bool m_canceled;
aux_timeout_eh(solver * s):m_solver(s), m_canceled(false) {} aux_timeout_eh(solver * s):m_solver(s), m_canceled(false) {}
~aux_timeout_eh() { ~aux_timeout_eh() override {
if (m_canceled) { if (m_canceled) {
m_solver->get_manager().limit().dec_cancel(); m_solver->get_manager().limit().dec_cancel();
} }
} }
virtual void operator()(event_handler_caller_t caller_id) { void operator()(event_handler_caller_t caller_id) override {
m_canceled = true; m_canceled = true;
m_solver->get_manager().limit().inc_cancel(); m_solver->get_manager().limit().inc_cancel();
} }
@ -102,7 +102,7 @@ private:
m_inc_unknown_behavior = static_cast<inc_unknown_behavior>(p.solver2_unknown()); m_inc_unknown_behavior = static_cast<inc_unknown_behavior>(p.solver2_unknown());
} }
virtual ast_manager& get_manager() const { return m_solver1->get_manager(); } ast_manager& get_manager() const override { return m_solver1->get_manager(); }
bool has_quantifiers() const { bool has_quantifiers() const {
unsigned sz = get_num_assertions(); unsigned sz = get_num_assertions();
@ -135,7 +135,7 @@ public:
m_use_solver1_results = true; m_use_solver1_results = true;
} }
solver* translate(ast_manager& m, params_ref const& p) { solver* translate(ast_manager& m, params_ref const& p) override {
solver* s1 = m_solver1->translate(m, p); solver* s1 = m_solver1->translate(m, p);
solver* s2 = m_solver2->translate(m, p); solver* s2 = m_solver2->translate(m, p);
combined_solver* r = alloc(combined_solver, s1, s2, p); combined_solver* r = alloc(combined_solver, s1, s2, p);
@ -146,25 +146,25 @@ public:
return r; return r;
} }
virtual void updt_params(params_ref const & p) { void updt_params(params_ref const & p) override {
solver::updt_params(p); solver::updt_params(p);
m_solver1->updt_params(p); m_solver1->updt_params(p);
m_solver2->updt_params(p); m_solver2->updt_params(p);
updt_local_params(p); updt_local_params(p);
} }
virtual void collect_param_descrs(param_descrs & r) { void collect_param_descrs(param_descrs & r) override {
m_solver1->collect_param_descrs(r); m_solver1->collect_param_descrs(r);
m_solver2->collect_param_descrs(r); m_solver2->collect_param_descrs(r);
combined_solver_params::collect_param_descrs(r); combined_solver_params::collect_param_descrs(r);
} }
virtual void set_produce_models(bool f) { void set_produce_models(bool f) override {
m_solver1->set_produce_models(f); m_solver1->set_produce_models(f);
m_solver2->set_produce_models(f); m_solver2->set_produce_models(f);
} }
virtual void assert_expr(expr * t) { void assert_expr(expr * t) override {
if (m_check_sat_executed) if (m_check_sat_executed)
switch_inc_mode(); switch_inc_mode();
m_solver1->assert_expr(t); m_solver1->assert_expr(t);
@ -172,7 +172,7 @@ public:
m_solver2->assert_expr(t); m_solver2->assert_expr(t);
} }
virtual void assert_expr(expr * t, expr * a) { void assert_expr(expr * t, expr * a) override {
if (m_check_sat_executed) if (m_check_sat_executed)
switch_inc_mode(); switch_inc_mode();
m_solver1->assert_expr(t, a); m_solver1->assert_expr(t, a);
@ -180,23 +180,23 @@ public:
m_solver2->assert_expr(t, a); m_solver2->assert_expr(t, a);
} }
virtual void push() { void push() override {
switch_inc_mode(); switch_inc_mode();
m_solver1->push(); m_solver1->push();
m_solver2->push(); m_solver2->push();
} }
virtual void pop(unsigned n) { void pop(unsigned n) override {
switch_inc_mode(); switch_inc_mode();
m_solver1->pop(n); m_solver1->pop(n);
m_solver2->pop(n); m_solver2->pop(n);
} }
virtual unsigned get_scope_level() const { unsigned get_scope_level() const override {
return m_solver1->get_scope_level(); return m_solver1->get_scope_level();
} }
virtual lbool get_consequences(expr_ref_vector const& asms, expr_ref_vector const& vars, expr_ref_vector& consequences) { lbool get_consequences(expr_ref_vector const& asms, expr_ref_vector const& vars, expr_ref_vector& consequences) override {
switch_inc_mode(); switch_inc_mode();
m_use_solver1_results = false; m_use_solver1_results = false;
try { try {
@ -213,7 +213,7 @@ public:
return l_undef; return l_undef;
} }
virtual lbool check_sat(unsigned num_assumptions, expr * const * assumptions) { lbool check_sat(unsigned num_assumptions, expr * const * assumptions) override {
m_check_sat_executed = true; m_check_sat_executed = true;
m_use_solver1_results = false; m_use_solver1_results = false;
@ -258,73 +258,73 @@ public:
return m_solver1->check_sat(num_assumptions, assumptions); return m_solver1->check_sat(num_assumptions, assumptions);
} }
virtual void set_progress_callback(progress_callback * callback) { void set_progress_callback(progress_callback * callback) override {
m_solver1->set_progress_callback(callback); m_solver1->set_progress_callback(callback);
m_solver2->set_progress_callback(callback); m_solver2->set_progress_callback(callback);
} }
virtual unsigned get_num_assertions() const { unsigned get_num_assertions() const override {
return m_solver1->get_num_assertions(); return m_solver1->get_num_assertions();
} }
virtual expr * get_assertion(unsigned idx) const { expr * get_assertion(unsigned idx) const override {
return m_solver1->get_assertion(idx); return m_solver1->get_assertion(idx);
} }
virtual unsigned get_num_assumptions() const { unsigned get_num_assumptions() const override {
return m_solver1->get_num_assumptions() + m_solver2->get_num_assumptions(); return m_solver1->get_num_assumptions() + m_solver2->get_num_assumptions();
} }
virtual expr * get_assumption(unsigned idx) const { expr * get_assumption(unsigned idx) const override {
unsigned c1 = m_solver1->get_num_assumptions(); unsigned c1 = m_solver1->get_num_assumptions();
if (idx < c1) return m_solver1->get_assumption(idx); if (idx < c1) return m_solver1->get_assumption(idx);
return m_solver2->get_assumption(idx - c1); return m_solver2->get_assumption(idx - c1);
} }
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_solver1->display(out, n, es); return m_solver1->display(out, n, es);
} }
virtual void collect_statistics(statistics & st) const { void collect_statistics(statistics & st) const override {
m_solver2->collect_statistics(st); m_solver2->collect_statistics(st);
if (m_use_solver1_results) if (m_use_solver1_results)
m_solver1->collect_statistics(st); m_solver1->collect_statistics(st);
} }
virtual void get_unsat_core(ptr_vector<expr> & r) { void get_unsat_core(ptr_vector<expr> & r) override {
if (m_use_solver1_results) if (m_use_solver1_results)
m_solver1->get_unsat_core(r); m_solver1->get_unsat_core(r);
else else
m_solver2->get_unsat_core(r); m_solver2->get_unsat_core(r);
} }
virtual void get_model(model_ref & m) { void get_model(model_ref & m) override {
if (m_use_solver1_results) if (m_use_solver1_results)
m_solver1->get_model(m); m_solver1->get_model(m);
else else
m_solver2->get_model(m); m_solver2->get_model(m);
} }
virtual proof * get_proof() { proof * get_proof() override {
if (m_use_solver1_results) if (m_use_solver1_results)
return m_solver1->get_proof(); return m_solver1->get_proof();
else else
return m_solver2->get_proof(); return m_solver2->get_proof();
} }
virtual std::string reason_unknown() const { std::string reason_unknown() const override {
if (m_use_solver1_results) if (m_use_solver1_results)
return m_solver1->reason_unknown(); return m_solver1->reason_unknown();
else else
return m_solver2->reason_unknown(); return m_solver2->reason_unknown();
} }
virtual void set_reason_unknown(char const* msg) { void set_reason_unknown(char const* msg) override {
m_solver1->set_reason_unknown(msg); m_solver1->set_reason_unknown(msg);
m_solver2->set_reason_unknown(msg); m_solver2->set_reason_unknown(msg);
} }
virtual void get_labels(svector<symbol> & r) { void get_labels(svector<symbol> & r) override {
if (m_use_solver1_results) if (m_use_solver1_results)
return m_solver1->get_labels(r); return m_solver1->get_labels(r);
else else
@ -343,9 +343,9 @@ class combined_solver_factory : public solver_factory {
scoped_ptr<solver_factory> m_f2; scoped_ptr<solver_factory> m_f2;
public: public:
combined_solver_factory(solver_factory * f1, solver_factory * f2):m_f1(f1), m_f2(f2) {} combined_solver_factory(solver_factory * f1, solver_factory * f2):m_f1(f1), m_f2(f2) {}
virtual ~combined_solver_factory() {} ~combined_solver_factory() override {}
virtual solver * operator()(ast_manager & m, params_ref const & p, bool proofs_enabled, bool models_enabled, bool unsat_core_enabled, symbol const & logic) { solver * operator()(ast_manager & m, params_ref const & p, bool proofs_enabled, bool models_enabled, bool unsat_core_enabled, symbol const & logic) override {
return mk_combined_solver((*m_f1)(m, p, proofs_enabled, models_enabled, unsat_core_enabled, logic), return mk_combined_solver((*m_f1)(m, p, proofs_enabled, models_enabled, unsat_core_enabled, logic),
(*m_f2)(m, p, proofs_enabled, models_enabled, unsat_core_enabled, logic), (*m_f2)(m, p, proofs_enabled, models_enabled, unsat_core_enabled, logic),
p); p);

View file

@ -45,7 +45,7 @@ public:
class solver : public check_sat_result { class solver : public check_sat_result {
params_ref m_params; params_ref m_params;
public: public:
virtual ~solver() {} ~solver() override {}
/** /**
\brief Creates a clone of the solver. \brief Creates a clone of the solver.

View file

@ -92,20 +92,20 @@ public:
m_solver(s) m_solver(s)
{} {}
virtual void updt_params(params_ref const & p) { void updt_params(params_ref const & p) override {
m_params.append(p); m_params.append(p);
m_solver->updt_params(p); 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); m_solver->collect_param_descrs(r);
} }
virtual void operator()(/* in */ goal_ref const & in, void operator()(/* in */ goal_ref const & in,
/* out */ goal_ref_buffer & result, /* out */ goal_ref_buffer & result,
/* out */ model_converter_ref & mc, /* out */ model_converter_ref & mc,
/* out */ proof_converter_ref & pc, /* out */ proof_converter_ref & pc,
/* out */ expr_dependency_ref & core) { /* out */ expr_dependency_ref & core) override {
pc = 0; mc = 0; core = 0; pc = 0; mc = 0; core = 0;
expr_ref_vector clauses(m); expr_ref_vector clauses(m);
expr2expr_map bool2dep; expr2expr_map bool2dep;
@ -155,21 +155,21 @@ public:
local_solver->collect_statistics(m_st); local_solver->collect_statistics(m_st);
} }
virtual void collect_statistics(statistics & st) const { void collect_statistics(statistics & st) const override {
st.copy(m_st); st.copy(m_st);
} }
virtual void reset_statistics() { m_st.reset(); } void reset_statistics() override { m_st.reset(); }
virtual void cleanup() { } void cleanup() override { }
virtual void reset() { cleanup(); } void reset() override { cleanup(); }
virtual void set_logic(symbol const & l) {} void set_logic(symbol const & l) override {}
virtual void set_progress_callback(progress_callback * callback) { void set_progress_callback(progress_callback * callback) override {
m_solver->set_progress_callback(callback); m_solver->set_progress_callback(callback);
} }
virtual tactic * translate(ast_manager & m) { tactic * translate(ast_manager & m) override {
return alloc(solver2tactic, m_solver->translate(m, m_params)); return alloc(solver2tactic, m_solver->translate(m, m_params));
} }
}; };

View file

@ -32,21 +32,21 @@ class solver_na2as : public solver {
void restore_assumptions(unsigned old_sz); void restore_assumptions(unsigned old_sz);
public: public:
solver_na2as(ast_manager & m); solver_na2as(ast_manager & m);
virtual ~solver_na2as(); ~solver_na2as() override;
virtual void assert_expr(expr * t, expr * a); void assert_expr(expr * t, expr * a) override;
virtual void assert_expr(expr * t) = 0; void assert_expr(expr * t) override = 0;
// Subclasses of solver_na2as should redefine the following *_core methods instead of these ones. // Subclasses of solver_na2as should redefine the following *_core methods instead of these ones.
virtual lbool check_sat(unsigned num_assumptions, expr * const * assumptions); lbool check_sat(unsigned num_assumptions, expr * const * assumptions) override;
virtual void push(); void push() override;
virtual void pop(unsigned n); void pop(unsigned n) override;
virtual unsigned get_scope_level() const; unsigned get_scope_level() const override;
virtual unsigned get_num_assumptions() const { return m_assumptions.size(); } unsigned get_num_assumptions() const override { return m_assumptions.size(); }
virtual expr * get_assumption(unsigned idx) const { return m_assumptions[idx]; } expr * get_assumption(unsigned idx) const override { return m_assumptions[idx]; }
virtual lbool get_consequences(expr_ref_vector const& asms, expr_ref_vector const& vars, expr_ref_vector& consequences); lbool get_consequences(expr_ref_vector const& asms, expr_ref_vector const& vars, expr_ref_vector& consequences) override;
virtual lbool find_mutexes(expr_ref_vector const& vars, vector<expr_ref_vector>& mutexes); lbool find_mutexes(expr_ref_vector const& vars, vector<expr_ref_vector>& mutexes) override;
protected: protected:
virtual lbool check_sat_core(unsigned num_assumptions, expr * const * assumptions) = 0; virtual lbool check_sat_core(unsigned num_assumptions, expr * const * assumptions) = 0;
virtual void push_core() = 0; virtual void push_core() = 0;

View file

@ -53,7 +53,7 @@ public:
} }
} }
virtual ~pool_solver() { ~pool_solver() override {
if (m_pushed) pop(get_scope_level()); if (m_pushed) pop(get_scope_level());
if (is_virtual()) { if (is_virtual()) {
m_pred = m.mk_not(m_pred); m_pred = m.mk_not(m_pred);
@ -63,12 +63,12 @@ public:
solver* base_solver() { return m_base.get(); } solver* base_solver() { return m_base.get(); }
virtual solver* translate(ast_manager& m, params_ref const& p) { UNREACHABLE(); return nullptr; } solver* translate(ast_manager& m, params_ref const& p) override { UNREACHABLE(); return nullptr; }
virtual void updt_params(params_ref const& p) { solver::updt_params(p); m_base->updt_params(p); } void updt_params(params_ref const& p) override { solver::updt_params(p); m_base->updt_params(p); }
virtual void collect_param_descrs(param_descrs & r) { m_base->collect_param_descrs(r); } void collect_param_descrs(param_descrs & r) override { m_base->collect_param_descrs(r); }
virtual void collect_statistics(statistics & st) const { m_base->collect_statistics(st); } void collect_statistics(statistics & st) const override { m_base->collect_statistics(st); }
virtual void get_unsat_core(ptr_vector<expr> & r) { void get_unsat_core(ptr_vector<expr> & r) override {
m_base->get_unsat_core(r); m_base->get_unsat_core(r);
unsigned j = 0; unsigned j = 0;
for (unsigned i = 0; i < r.size(); ++i) for (unsigned i = 0; i < r.size(); ++i)
@ -77,12 +77,12 @@ public:
r.shrink(j); r.shrink(j);
} }
virtual unsigned get_num_assumptions() const { unsigned get_num_assumptions() const override {
unsigned sz = solver_na2as::get_num_assumptions(); unsigned sz = solver_na2as::get_num_assumptions();
return is_virtual() ? sz - 1 : sz; return is_virtual() ? sz - 1 : sz;
} }
virtual proof * get_proof() { proof * get_proof() override {
scoped_watch _t_(m_pool.m_proof_watch); scoped_watch _t_(m_pool.m_proof_watch);
if (!m_proof.get()) { if (!m_proof.get()) {
elim_aux_assertions pc(m_pred); elim_aux_assertions pc(m_pred);
@ -101,7 +101,7 @@ public:
} }
} }
virtual lbool check_sat_core(unsigned num_assumptions, expr * const * assumptions) { lbool check_sat_core(unsigned num_assumptions, expr * const * assumptions) override {
SASSERT(!m_pushed || get_scope_level() > 0); SASSERT(!m_pushed || get_scope_level() > 0);
m_proof.reset(); m_proof.reset();
scoped_watch _t_(m_pool.m_check_watch); scoped_watch _t_(m_pool.m_check_watch);
@ -158,7 +158,7 @@ public:
return res; return res;
} }
virtual void push_core() { void push_core() override {
SASSERT(!m_pushed || get_scope_level() > 0); SASSERT(!m_pushed || get_scope_level() > 0);
if (m_in_delayed_scope) { if (m_in_delayed_scope) {
// second push // second push
@ -178,7 +178,7 @@ public:
} }
} }
virtual void pop_core(unsigned n) { void pop_core(unsigned n) override {
SASSERT(!m_pushed || get_scope_level() > 0); SASSERT(!m_pushed || get_scope_level() > 0);
if (m_pushed) { if (m_pushed) {
SASSERT(!m_in_delayed_scope); SASSERT(!m_in_delayed_scope);
@ -190,7 +190,7 @@ public:
} }
} }
virtual void assert_expr(expr * e) { void assert_expr(expr * e) override {
SASSERT(!m_pushed || get_scope_level() > 0); SASSERT(!m_pushed || get_scope_level() > 0);
if (m.is_true(e)) return; if (m.is_true(e)) return;
if (m_in_delayed_scope) { if (m_in_delayed_scope) {
@ -211,18 +211,18 @@ public:
} }
} }
virtual void get_model(model_ref & _m) { m_base->get_model(_m); } void get_model(model_ref & _m) override { m_base->get_model(_m); }
virtual expr * get_assumption(unsigned idx) const { expr * get_assumption(unsigned idx) const override {
return solver_na2as::get_assumption(idx + is_virtual()); return solver_na2as::get_assumption(idx + is_virtual());
} }
virtual std::string reason_unknown() const { return m_base->reason_unknown(); } std::string reason_unknown() const override { return m_base->reason_unknown(); }
virtual void set_reason_unknown(char const* msg) { return m_base->set_reason_unknown(msg); } void set_reason_unknown(char const* msg) override { return m_base->set_reason_unknown(msg); }
virtual void get_labels(svector<symbol> & r) { return m_base->get_labels(r); } void get_labels(svector<symbol> & r) override { return m_base->get_labels(r); }
virtual void set_progress_callback(progress_callback * callback) { m_base->set_progress_callback(callback); } void set_progress_callback(progress_callback * callback) override { m_base->set_progress_callback(callback); }
virtual ast_manager& get_manager() const { return m_base->get_manager(); } ast_manager& get_manager() const override { return m_base->get_manager(); }
void refresh(solver* new_base) { void refresh(solver* new_base) {
SASSERT(!m_pushed); SASSERT(!m_pushed);

View file

@ -44,36 +44,36 @@ class tactic2solver : public solver_na2as {
public: public:
tactic2solver(ast_manager & m, tactic * t, params_ref const & p, bool produce_proofs, bool produce_models, bool produce_unsat_cores, symbol const & logic); tactic2solver(ast_manager & m, tactic * t, params_ref const & p, bool produce_proofs, bool produce_models, bool produce_unsat_cores, symbol const & logic);
virtual ~tactic2solver(); ~tactic2solver() override;
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); void updt_params(params_ref const & p) override;
virtual void collect_param_descrs(param_descrs & r); void collect_param_descrs(param_descrs & r) override;
virtual void set_produce_models(bool f) { m_produce_models = f; } void set_produce_models(bool f) override { m_produce_models = f; }
virtual void assert_expr(expr * t); void assert_expr(expr * t) override;
virtual void push_core(); void push_core() override;
virtual void pop_core(unsigned n); void pop_core(unsigned n) override;
virtual lbool check_sat_core(unsigned num_assumptions, expr * const * assumptions); lbool check_sat_core(unsigned num_assumptions, expr * const * assumptions) override;
virtual void collect_statistics(statistics & st) const; void collect_statistics(statistics & st) const override;
virtual void get_unsat_core(ptr_vector<expr> & r); void get_unsat_core(ptr_vector<expr> & r) override;
virtual void get_model(model_ref & m); void get_model(model_ref & m) override;
virtual proof * get_proof(); proof * get_proof() override;
virtual std::string reason_unknown() const; std::string reason_unknown() const override;
virtual void set_reason_unknown(char const* msg); void set_reason_unknown(char const* msg) override;
virtual void get_labels(svector<symbol> & r) {} void get_labels(svector<symbol> & r) override {}
virtual void set_progress_callback(progress_callback * callback) {} void set_progress_callback(progress_callback * callback) override {}
virtual unsigned get_num_assertions() const; unsigned get_num_assertions() const override;
virtual expr * get_assertion(unsigned idx) const; expr * get_assertion(unsigned idx) const override;
virtual ast_manager& get_manager() const; ast_manager& get_manager() const override;
}; };
ast_manager& tactic2solver::get_manager() const { return m_assertions.get_manager(); } ast_manager& tactic2solver::get_manager() const { return m_assertions.get_manager(); }
@ -261,9 +261,9 @@ public:
tactic2solver_factory(tactic * t):m_tactic(t) { tactic2solver_factory(tactic * t):m_tactic(t) {
} }
virtual ~tactic2solver_factory() {} ~tactic2solver_factory() override {}
virtual solver * operator()(ast_manager & m, params_ref const & p, bool proofs_enabled, bool models_enabled, bool unsat_core_enabled, symbol const & logic) { solver * operator()(ast_manager & m, params_ref const & p, bool proofs_enabled, bool models_enabled, bool unsat_core_enabled, symbol const & logic) override {
return mk_tactic2solver(m, m_tactic.get(), p, proofs_enabled, models_enabled, unsat_core_enabled, logic); return mk_tactic2solver(m, m_tactic.get(), p, proofs_enabled, models_enabled, unsat_core_enabled, logic);
} }
}; };
@ -274,9 +274,9 @@ public:
tactic_factory2solver_factory(tactic_factory * f):m_factory(f) { tactic_factory2solver_factory(tactic_factory * f):m_factory(f) {
} }
virtual ~tactic_factory2solver_factory() {} ~tactic_factory2solver_factory() override {}
virtual solver * operator()(ast_manager & m, params_ref const & p, bool proofs_enabled, bool models_enabled, bool unsat_core_enabled, symbol const & logic) { solver * operator()(ast_manager & m, params_ref const & p, bool proofs_enabled, bool models_enabled, bool unsat_core_enabled, symbol const & logic) override {
tactic * t = (*m_factory)(m, p); tactic * t = (*m_factory)(m, p);
return mk_tactic2solver(m, t, p, proofs_enabled, models_enabled, unsat_core_enabled, logic); return mk_tactic2solver(m, t, p, proofs_enabled, models_enabled, unsat_core_enabled, logic);
} }

View file

@ -46,7 +46,7 @@ public:
updt_params(p); updt_params(p);
} }
virtual tactic * translate(ast_manager & m) { tactic * translate(ast_manager & m) override {
aig_tactic * t = alloc(aig_tactic); aig_tactic * t = alloc(aig_tactic);
t->m_max_memory = m_max_memory; t->m_max_memory = m_max_memory;
t->m_aig_gate_encoding = m_aig_gate_encoding; t->m_aig_gate_encoding = m_aig_gate_encoding;
@ -54,13 +54,13 @@ public:
return t; return t;
} }
virtual void updt_params(params_ref const & p) { void updt_params(params_ref const & p) override {
m_max_memory = megabytes_to_bytes(p.get_uint("max_memory", UINT_MAX)); m_max_memory = megabytes_to_bytes(p.get_uint("max_memory", UINT_MAX));
m_aig_gate_encoding = p.get_bool("aig_default_gate_encoding", true); m_aig_gate_encoding = p.get_bool("aig_default_gate_encoding", true);
m_aig_per_assertion = p.get_bool("aig_per_assertion", true); m_aig_per_assertion = p.get_bool("aig_per_assertion", true);
} }
virtual void collect_param_descrs(param_descrs & r) { void collect_param_descrs(param_descrs & r) override {
insert_max_memory(r); insert_max_memory(r);
r.insert("aig_per_assertion", CPK_BOOL, "(default: true) process one assertion at a time."); r.insert("aig_per_assertion", CPK_BOOL, "(default: true) process one assertion at a time.");
} }
@ -90,11 +90,11 @@ public:
SASSERT(g->is_well_sorted()); SASSERT(g->is_well_sorted());
} }
virtual void operator()(goal_ref const & g, void operator()(goal_ref const & g,
goal_ref_buffer & result, goal_ref_buffer & result,
model_converter_ref & mc, model_converter_ref & mc,
proof_converter_ref & pc, proof_converter_ref & pc,
expr_dependency_ref & core) { expr_dependency_ref & core) override {
fail_if_proof_generation("aig", g); fail_if_proof_generation("aig", g);
mc = 0; pc = 0; core = 0; mc = 0; pc = 0; core = 0;
operator()(g); operator()(g);
@ -102,7 +102,7 @@ public:
result.push_back(g.get()); result.push_back(g.get());
} }
virtual void cleanup() {} void cleanup() override {}
}; };

View file

@ -48,10 +48,10 @@ bool is_unbounded(goal const & g) {
class is_unbounded_probe : public probe { class is_unbounded_probe : public probe {
public: public:
virtual result operator()(goal const & g) { result operator()(goal const & g) override {
return is_unbounded(g); return is_unbounded(g);
} }
virtual ~is_unbounded_probe() {} ~is_unbounded_probe() override {}
}; };
probe * mk_is_unbounded_probe() { probe * mk_is_unbounded_probe() {
@ -142,33 +142,33 @@ public:
m_imp = alloc(imp, m, p); m_imp = alloc(imp, m, p);
} }
virtual tactic * translate(ast_manager & m) { tactic * translate(ast_manager & m) override {
return alloc(add_bounds_tactic, m, m_params); return alloc(add_bounds_tactic, m, m_params);
} }
virtual ~add_bounds_tactic() { ~add_bounds_tactic() override {
dealloc(m_imp); dealloc(m_imp);
} }
virtual void updt_params(params_ref const & p) { void updt_params(params_ref const & p) override {
m_params = p; m_params = p;
m_imp->updt_params(p); m_imp->updt_params(p);
} }
virtual void collect_param_descrs(param_descrs & r) { void collect_param_descrs(param_descrs & r) override {
r.insert("add_bound_lower", CPK_NUMERAL, "(default: -2) lower bound to be added to unbounded variables."); r.insert("add_bound_lower", CPK_NUMERAL, "(default: -2) lower bound to be added to unbounded variables.");
r.insert("add_bound_upper", CPK_NUMERAL, "(default: 2) upper bound to be added to unbounded variables."); r.insert("add_bound_upper", CPK_NUMERAL, "(default: 2) upper bound to be added to unbounded variables.");
} }
virtual void operator()(goal_ref const & g, void operator()(goal_ref const & g,
goal_ref_buffer & result, goal_ref_buffer & result,
model_converter_ref & mc, model_converter_ref & mc,
proof_converter_ref & pc, proof_converter_ref & pc,
expr_dependency_ref & core) { expr_dependency_ref & core) override {
(*m_imp)(g, result, mc, pc, core); (*m_imp)(g, result, mc, pc, core);
} }
virtual void cleanup() { void cleanup() override {
imp * d = alloc(imp, m_imp->m, m_params); imp * d = alloc(imp, m_imp->m, m_params);
std::swap(d, m_imp); std::swap(d, m_imp);
dealloc(d); dealloc(d);

View file

@ -23,15 +23,15 @@ struct arith_bounds_tactic : public tactic {
ast_manager& get_manager() { return m; } ast_manager& get_manager() { return m; }
virtual void operator()(/* in */ goal_ref const & in, void operator()(/* in */ goal_ref const & in,
/* out */ goal_ref_buffer & result, /* out */ goal_ref_buffer & result,
/* out */ model_converter_ref & mc, /* out */ model_converter_ref & mc,
/* out */ proof_converter_ref & pc, /* out */ proof_converter_ref & pc,
/* out */ expr_dependency_ref & core) { /* out */ expr_dependency_ref & core) override {
bounds_arith_subsumption(in, result); bounds_arith_subsumption(in, result);
} }
virtual tactic* translate(ast_manager & mgr) { tactic* translate(ast_manager & mgr) override {
return alloc(arith_bounds_tactic, mgr); return alloc(arith_bounds_tactic, mgr);
} }
@ -146,7 +146,7 @@ struct arith_bounds_tactic : public tactic {
TRACE("arith_subsumption", s->display(tout); ); TRACE("arith_subsumption", s->display(tout); );
} }
virtual void cleanup() {} void cleanup() override {}
}; };

View file

@ -36,26 +36,26 @@ public:
m_params(p) { m_params(p) {
} }
virtual tactic * translate(ast_manager & m) { tactic * translate(ast_manager & m) override {
return alloc(card2bv_tactic, m, m_params); return alloc(card2bv_tactic, m, m_params);
} }
virtual ~card2bv_tactic() { ~card2bv_tactic() override {
} }
virtual void updt_params(params_ref const & p) { void updt_params(params_ref const & p) override {
m_params = p; m_params = p;
} }
virtual void collect_param_descrs(param_descrs & r) { void collect_param_descrs(param_descrs & r) override {
} }
virtual void operator()(goal_ref const & g, void operator()(goal_ref const & g,
goal_ref_buffer & result, goal_ref_buffer & result,
model_converter_ref & mc, model_converter_ref & mc,
proof_converter_ref & pc, proof_converter_ref & pc,
expr_dependency_ref & core) { expr_dependency_ref & core) override {
TRACE("card2bv-before", g->display(tout);); TRACE("card2bv-before", g->display(tout););
SASSERT(g->is_well_sorted()); SASSERT(g->is_well_sorted());
mc = 0; pc = 0; core = 0; result.reset(); mc = 0; pc = 0; core = 0; result.reset();
@ -101,7 +101,7 @@ public:
SASSERT(g->is_well_sorted()); SASSERT(g->is_well_sorted());
} }
virtual void cleanup() { void cleanup() override {
} }
}; };

View file

@ -297,23 +297,23 @@ public:
m_imp = alloc(imp, m); m_imp = alloc(imp, m);
} }
virtual tactic * translate(ast_manager & m) { tactic * translate(ast_manager & m) override {
return alloc(degree_shift_tactic, m); return alloc(degree_shift_tactic, m);
} }
virtual ~degree_shift_tactic() { ~degree_shift_tactic() override {
dealloc(m_imp); dealloc(m_imp);
} }
virtual void operator()(goal_ref const & in, void operator()(goal_ref const & in,
goal_ref_buffer & result, goal_ref_buffer & result,
model_converter_ref & mc, model_converter_ref & mc,
proof_converter_ref & pc, proof_converter_ref & pc,
expr_dependency_ref & core) { expr_dependency_ref & core) override {
(*m_imp)(in, result, mc, pc, core); (*m_imp)(in, result, mc, pc, core);
} }
virtual void cleanup() { void cleanup() override {
imp * d = alloc(imp, m_imp->m); imp * d = alloc(imp, m_imp->m);
std::swap(d, m_imp); std::swap(d, m_imp);
dealloc(d); dealloc(d);

View file

@ -354,28 +354,28 @@ public:
m_imp = alloc(imp, m, p); m_imp = alloc(imp, m, p);
} }
virtual tactic * translate(ast_manager & m) { tactic * translate(ast_manager & m) override {
return alloc(diff_neq_tactic, m, m_params); return alloc(diff_neq_tactic, m, m_params);
} }
virtual ~diff_neq_tactic() { ~diff_neq_tactic() override {
dealloc(m_imp); dealloc(m_imp);
} }
virtual void updt_params(params_ref const & p) { void updt_params(params_ref const & p) override {
m_params = p; m_params = p;
m_imp->updt_params(p); m_imp->updt_params(p);
} }
virtual void collect_param_descrs(param_descrs & r) { void collect_param_descrs(param_descrs & r) override {
r.insert("diff_neq_max_k", CPK_UINT, "(default: 1024) maximum variable upper bound for diff neq solver."); r.insert("diff_neq_max_k", CPK_UINT, "(default: 1024) maximum variable upper bound for diff neq solver.");
} }
virtual void collect_statistics(statistics & st) const { void collect_statistics(statistics & st) const override {
st.update("conflicts", m_imp->m_num_conflicts); st.update("conflicts", m_imp->m_num_conflicts);
} }
virtual void reset_statistics() { void reset_statistics() override {
m_imp->m_num_conflicts = 0; m_imp->m_num_conflicts = 0;
} }
@ -383,15 +383,15 @@ public:
\brief Fix a DL variable in s to 0. \brief Fix a DL variable in s to 0.
If s is not really in the difference logic fragment, then this is a NOOP. If s is not really in the difference logic fragment, then this is a NOOP.
*/ */
virtual void operator()(goal_ref const & in, void operator()(goal_ref const & in,
goal_ref_buffer & result, goal_ref_buffer & result,
model_converter_ref & mc, model_converter_ref & mc,
proof_converter_ref & pc, proof_converter_ref & pc,
expr_dependency_ref & core) { expr_dependency_ref & core) override {
(*m_imp)(in, result, mc, pc, core); (*m_imp)(in, result, mc, pc, core);
} }
virtual void cleanup() { void cleanup() override {
imp * d = alloc(imp, m_imp->m, m_params); imp * d = alloc(imp, m_imp->m, m_params);
d->m_num_conflicts = m_imp->m_num_conflicts; d->m_num_conflicts = m_imp->m_num_conflicts;
std::swap(d, m_imp); std::swap(d, m_imp);

View file

@ -41,7 +41,7 @@ public:
m_refs(m) m_refs(m)
{} {}
virtual void operator()(model_ref & old_model, unsigned goal_idx) { void operator()(model_ref & old_model, unsigned goal_idx) override {
SASSERT(goal_idx == 0); SASSERT(goal_idx == 0);
model * new_model = alloc(model, m); model * new_model = alloc(model, m);
unsigned num = old_model->get_num_constants(); unsigned num = old_model->get_num_constants();
@ -106,7 +106,7 @@ public:
} }
} }
virtual model_converter * translate(ast_translation & translator) { model_converter * translate(ast_translation & translator) override {
bool2int_model_converter* mc = alloc(bool2int_model_converter, translator.to()); bool2int_model_converter* mc = alloc(bool2int_model_converter, translator.to());
for (unsigned i = 0; i < m_nums_as_int.size(); ++i) { for (unsigned i = 0; i < m_nums_as_int.size(); ++i) {
mc->insert(m_nums_as_int[i], m_nums_as_bool[i].size(), m_nums_as_bool[i].c_ptr()); mc->insert(m_nums_as_int[i], m_nums_as_bool[i].size(), m_nums_as_bool[i].c_ptr());
@ -134,24 +134,24 @@ public:
m_max_hi(rational(m_max_hi_default)) { m_max_hi(rational(m_max_hi_default)) {
} }
virtual ~elim01_tactic() { ~elim01_tactic() override {
} }
virtual void updt_params(params_ref const & p) { void updt_params(params_ref const & p) override {
m_max_hi = rational(p.get_uint("max_coefficient", m_max_hi_default)); m_max_hi = rational(p.get_uint("max_coefficient", m_max_hi_default));
m_params = p; m_params = p;
} }
virtual void collect_param_descrs(param_descrs & r) { void collect_param_descrs(param_descrs & r) override {
r.insert("max_coefficient", CPK_UINT, "(default: 1) maximal upper bound for finite range -> Bool conversion"); r.insert("max_coefficient", CPK_UINT, "(default: 1) maximal upper bound for finite range -> Bool conversion");
} }
virtual void operator()(goal_ref const & g, void operator()(goal_ref const & g,
goal_ref_buffer & result, goal_ref_buffer & result,
model_converter_ref & mc, model_converter_ref & mc,
proof_converter_ref & pc, proof_converter_ref & pc,
expr_dependency_ref & core) { expr_dependency_ref & core) override {
SASSERT(g->is_well_sorted()); SASSERT(g->is_well_sorted());
mc = 0; pc = 0; core = 0; mc = 0; pc = 0; core = 0;
@ -211,11 +211,11 @@ public:
// TBD: support proof conversion (or not..) // TBD: support proof conversion (or not..)
} }
virtual tactic * translate(ast_manager & m) { tactic * translate(ast_manager & m) override {
return alloc(elim01_tactic, m, m_params); return alloc(elim01_tactic, m, m_params);
} }
virtual void cleanup() {} void cleanup() override {}
void add_variable(bool2int_model_converter* b2i, void add_variable(bool2int_model_converter* b2i,
expr_safe_replace& sub, expr_safe_replace& sub,

View file

@ -82,7 +82,7 @@ class eq2bv_tactic : public tactic {
m_map.insert(c_new, c_old); m_map.insert(c_new, c_old);
} }
virtual void operator()(model_ref& mdl) { void operator()(model_ref& mdl) override {
ast_manager& m = mdl->get_manager(); ast_manager& m = mdl->get_manager();
bv_util bv(m); bv_util bv(m);
arith_util a(m); arith_util a(m);
@ -105,7 +105,7 @@ class eq2bv_tactic : public tactic {
mdl = new_m; mdl = new_m;
} }
virtual model_converter* translate(ast_translation & translator) { model_converter* translate(ast_translation & translator) override {
bvmc* v = alloc(bvmc); bvmc* v = alloc(bvmc);
obj_map<func_decl, func_decl*>::iterator it = m_map.begin(), end = m_map.end(); obj_map<func_decl, func_decl*>::iterator it = m_map.begin(), end = m_map.end();
for (; it != end; ++it) { for (; it != end; ++it) {
@ -136,19 +136,18 @@ public:
m_bounds(m) { m_bounds(m) {
} }
virtual ~eq2bv_tactic() { ~eq2bv_tactic() override {
} }
void updt_params(params_ref const & p) { void updt_params(params_ref const & p) override {
} }
virtual void operator()( void operator()(goal_ref const & g,
goal_ref const & g, goal_ref_buffer & result,
goal_ref_buffer & result, model_converter_ref & mc,
model_converter_ref & mc, proof_converter_ref & pc,
proof_converter_ref & pc, expr_dependency_ref & core) override {
expr_dependency_ref & core) {
SASSERT(g->is_well_sorted()); SASSERT(g->is_well_sorted());
mc = 0; pc = 0; core = 0; mc = 0; pc = 0; core = 0;
m_trail.reset(); m_trail.reset();
@ -213,14 +212,14 @@ public:
} }
virtual tactic * translate(ast_manager & m) { tactic * translate(ast_manager & m) override {
return alloc(eq2bv_tactic, m); return alloc(eq2bv_tactic, m);
} }
virtual void collect_param_descrs(param_descrs & r) { void collect_param_descrs(param_descrs & r) override {
} }
virtual void cleanup() { void cleanup() override {
} }
void cleanup_fd(ref<bvmc>& mc) { void cleanup_fd(ref<bvmc>& mc) {

View file

@ -293,30 +293,30 @@ public:
m_imp = alloc(imp, m, p); m_imp = alloc(imp, m, p);
} }
virtual tactic * translate(ast_manager & m) { tactic * translate(ast_manager & m) override {
return alloc(factor_tactic, m, m_params); return alloc(factor_tactic, m, m_params);
} }
virtual ~factor_tactic() { ~factor_tactic() override {
dealloc(m_imp); dealloc(m_imp);
} }
virtual void updt_params(params_ref const & p) { void updt_params(params_ref const & p) override {
m_params = p; m_params = p;
m_imp->m_rw.cfg().updt_params(p); m_imp->m_rw.cfg().updt_params(p);
} }
virtual void collect_param_descrs(param_descrs & r) { void collect_param_descrs(param_descrs & r) override {
r.insert("split_factors", CPK_BOOL, r.insert("split_factors", CPK_BOOL,
"(default: true) apply simplifications such as (= (* p1 p2) 0) --> (or (= p1 0) (= p2 0))."); "(default: true) apply simplifications such as (= (* p1 p2) 0) --> (or (= p1 0) (= p2 0)).");
polynomial::factor_params::get_param_descrs(r); polynomial::factor_params::get_param_descrs(r);
} }
virtual void operator()(goal_ref const & in, void operator()(goal_ref const & in,
goal_ref_buffer & result, goal_ref_buffer & result,
model_converter_ref & mc, model_converter_ref & mc,
proof_converter_ref & pc, proof_converter_ref & pc,
expr_dependency_ref & core) { expr_dependency_ref & core) override {
try { try {
(*m_imp)(in, result, mc, pc, core); (*m_imp)(in, result, mc, pc, core);
} }
@ -328,7 +328,7 @@ public:
} }
} }
virtual void cleanup() { void cleanup() override {
imp * d = alloc(imp, m_imp->m, m_params); imp * d = alloc(imp, m_imp->m, m_params);
std::swap(d, m_imp); std::swap(d, m_imp);
dealloc(d); dealloc(d);

View file

@ -303,28 +303,28 @@ public:
m_imp = alloc(imp, m, p); m_imp = alloc(imp, m, p);
} }
virtual tactic * translate(ast_manager & m) { tactic * translate(ast_manager & m) override {
return alloc(fix_dl_var_tactic, m, m_params); return alloc(fix_dl_var_tactic, m, m_params);
} }
virtual ~fix_dl_var_tactic() { ~fix_dl_var_tactic() override {
dealloc(m_imp); dealloc(m_imp);
} }
virtual void updt_params(params_ref const & p) { void updt_params(params_ref const & p) override {
m_params = p; m_params = p;
m_imp->updt_params(p); m_imp->updt_params(p);
} }
virtual void collect_param_descrs(param_descrs & r) { void collect_param_descrs(param_descrs & r) override {
th_rewriter::get_param_descrs(r); th_rewriter::get_param_descrs(r);
} }
virtual void operator()(goal_ref const & in, void operator()(goal_ref const & in,
goal_ref_buffer & result, goal_ref_buffer & result,
model_converter_ref & mc, model_converter_ref & mc,
proof_converter_ref & pc, proof_converter_ref & pc,
expr_dependency_ref & core) { expr_dependency_ref & core) override {
try { try {
(*m_imp)(in, result, mc, pc, core); (*m_imp)(in, result, mc, pc, core);
} }
@ -333,7 +333,7 @@ public:
} }
} }
virtual void cleanup() { void cleanup() override {
imp * d = alloc(imp, m_imp->m, m_params); imp * d = alloc(imp, m_imp->m, m_params);
std::swap(d, m_imp); std::swap(d, m_imp);
dealloc(d); dealloc(d);

View file

@ -164,7 +164,7 @@ class fm_tactic : public tactic {
public: public:
fm_model_converter(ast_manager & _m):m(_m) {} fm_model_converter(ast_manager & _m):m(_m) {}
virtual ~fm_model_converter() { ~fm_model_converter() override {
m.dec_array_ref(m_xs.size(), m_xs.c_ptr()); m.dec_array_ref(m_xs.size(), m_xs.c_ptr());
vector<clauses>::iterator it = m_clauses.begin(); vector<clauses>::iterator it = m_clauses.begin();
vector<clauses>::iterator end = m_clauses.end(); vector<clauses>::iterator end = m_clauses.end();
@ -180,7 +180,7 @@ class fm_tactic : public tactic {
m_clauses.back().swap(c); m_clauses.back().swap(c);
} }
virtual void operator()(model_ref & md, unsigned goal_idx) { void operator()(model_ref & md, unsigned goal_idx) override {
TRACE("fm_mc", model_v2_pp(tout, *md); display(tout);); TRACE("fm_mc", model_v2_pp(tout, *md); display(tout););
model_evaluator ev(*(md.get())); model_evaluator ev(*(md.get()));
ev.set_model_completion(true); ev.set_model_completion(true);
@ -244,7 +244,7 @@ class fm_tactic : public tactic {
} }
virtual void display(std::ostream & out) { void display(std::ostream & out) override {
out << "(fm-model-converter"; out << "(fm-model-converter";
SASSERT(m_xs.size() == m_clauses.size()); SASSERT(m_xs.size() == m_clauses.size());
unsigned sz = m_xs.size(); unsigned sz = m_xs.size();
@ -261,7 +261,7 @@ class fm_tactic : public tactic {
out << ")\n"; out << ")\n";
} }
virtual model_converter * translate(ast_translation & translator) { model_converter * translate(ast_translation & translator) override {
ast_manager & to_m = translator.to(); ast_manager & to_m = translator.to();
fm_model_converter * res = alloc(fm_model_converter, to_m); fm_model_converter * res = alloc(fm_model_converter, to_m);
unsigned sz = m_xs.size(); unsigned sz = m_xs.size();
@ -1643,20 +1643,20 @@ public:
m_imp = alloc(imp, m, p); m_imp = alloc(imp, m, p);
} }
virtual tactic * translate(ast_manager & m) { tactic * translate(ast_manager & m) override {
return alloc(fm_tactic, m, m_params); return alloc(fm_tactic, m, m_params);
} }
virtual ~fm_tactic() { ~fm_tactic() override {
dealloc(m_imp); dealloc(m_imp);
} }
virtual void updt_params(params_ref const & p) { void updt_params(params_ref const & p) override {
m_params = p; m_params = p;
m_imp->updt_params(p); m_imp->updt_params(p);
} }
virtual void collect_param_descrs(param_descrs & r) { void collect_param_descrs(param_descrs & r) override {
insert_produce_models(r); insert_produce_models(r);
insert_max_memory(r); insert_max_memory(r);
r.insert("fm_real_only", CPK_BOOL, "(default: true) consider only real variables for fourier-motzkin elimination."); r.insert("fm_real_only", CPK_BOOL, "(default: true) consider only real variables for fourier-motzkin elimination.");
@ -1668,17 +1668,17 @@ public:
} }
virtual void cleanup() { void cleanup() override {
imp * d = alloc(imp, m_imp->m, m_params); imp * d = alloc(imp, m_imp->m, m_params);
std::swap(d, m_imp); std::swap(d, m_imp);
dealloc(d); dealloc(d);
} }
virtual void operator()(goal_ref const & in, void operator()(goal_ref const & in,
goal_ref_buffer & result, goal_ref_buffer & result,
model_converter_ref & mc, model_converter_ref & mc,
proof_converter_ref & pc, proof_converter_ref & pc,
expr_dependency_ref & core) { expr_dependency_ref & core) override {
(*m_imp)(in, result, mc, pc, core); (*m_imp)(in, result, mc, pc, core);
} }
}; };

View file

@ -148,21 +148,21 @@ public:
m_compile_equality(false) { m_compile_equality(false) {
} }
virtual ~lia2card_tactic() { ~lia2card_tactic() override {
dealloc(m_todo); dealloc(m_todo);
dealloc(m_01s); dealloc(m_01s);
} }
void updt_params(params_ref const & p) { void updt_params(params_ref const & p) override {
m_params = p; m_params = p;
m_compile_equality = p.get_bool("compile_equality", false); m_compile_equality = p.get_bool("compile_equality", false);
} }
virtual void operator()(goal_ref const & g, void operator()(goal_ref const & g,
goal_ref_buffer & result, goal_ref_buffer & result,
model_converter_ref & mc, model_converter_ref & mc,
proof_converter_ref & pc, proof_converter_ref & pc,
expr_dependency_ref & core) { expr_dependency_ref & core) override {
SASSERT(g->is_well_sorted()); SASSERT(g->is_well_sorted());
mc = 0; pc = 0; core = 0; mc = 0; pc = 0; core = 0;
m_01s->reset(); m_01s->reset();
@ -389,16 +389,16 @@ public:
} }
} }
virtual tactic * translate(ast_manager & m) { tactic * translate(ast_manager & m) override {
return alloc(lia2card_tactic, m, m_params); return alloc(lia2card_tactic, m, m_params);
} }
virtual void collect_param_descrs(param_descrs & r) { void collect_param_descrs(param_descrs & r) override {
r.insert("compile_equality", CPK_BOOL, r.insert("compile_equality", CPK_BOOL,
"(default:false) compile equalities into pseudo-Boolean equality"); "(default:false) compile equalities into pseudo-Boolean equality");
} }
virtual void cleanup() { void cleanup() override {
expr_set* d = alloc(expr_set); expr_set* d = alloc(expr_set);
ptr_vector<expr>* todo = alloc(ptr_vector<expr>); ptr_vector<expr>* todo = alloc(ptr_vector<expr>);
std::swap(m_01s, d); std::swap(m_01s, d);

View file

@ -313,30 +313,30 @@ public:
m_imp = alloc(imp, m, p); m_imp = alloc(imp, m, p);
} }
virtual tactic * translate(ast_manager & m) { tactic * translate(ast_manager & m) override {
return alloc(lia2pb_tactic, m, m_params); return alloc(lia2pb_tactic, m, m_params);
} }
virtual ~lia2pb_tactic() { ~lia2pb_tactic() override {
dealloc(m_imp); dealloc(m_imp);
} }
virtual void updt_params(params_ref const & p) { void updt_params(params_ref const & p) override {
m_params = p; m_params = p;
m_imp->updt_params(p); m_imp->updt_params(p);
} }
virtual void collect_param_descrs(param_descrs & r) { void collect_param_descrs(param_descrs & r) override {
r.insert("lia2pb_partial", CPK_BOOL, "(default: false) partial lia2pb conversion."); r.insert("lia2pb_partial", CPK_BOOL, "(default: false) partial lia2pb conversion.");
r.insert("lia2pb_max_bits", CPK_UINT, "(default: 32) maximum number of bits to be used (per variable) in lia2pb."); r.insert("lia2pb_max_bits", CPK_UINT, "(default: 32) maximum number of bits to be used (per variable) in lia2pb.");
r.insert("lia2pb_total_bits", CPK_UINT, "(default: 2048) total number of bits to be used (per problem) in lia2pb."); r.insert("lia2pb_total_bits", CPK_UINT, "(default: 2048) total number of bits to be used (per problem) in lia2pb.");
} }
virtual void operator()(goal_ref const & in, void operator()(goal_ref const & in,
goal_ref_buffer & result, goal_ref_buffer & result,
model_converter_ref & mc, model_converter_ref & mc,
proof_converter_ref & pc, proof_converter_ref & pc,
expr_dependency_ref & core) { expr_dependency_ref & core) override {
try { try {
(*m_imp)(in, result, mc, pc, core); (*m_imp)(in, result, mc, pc, core);
} }
@ -345,7 +345,7 @@ public:
} }
} }
virtual void cleanup() { void cleanup() override {
imp * d = alloc(imp, m_imp->m, m_params); imp * d = alloc(imp, m_imp->m, m_params);
std::swap(d, m_imp); std::swap(d, m_imp);
dealloc(d); dealloc(d);

View file

@ -418,18 +418,18 @@ public:
m_imp(0) { m_imp(0) {
} }
virtual tactic * translate(ast_manager & m) { tactic * translate(ast_manager & m) override {
return alloc(nla2bv_tactic, m_params); return alloc(nla2bv_tactic, m_params);
} }
virtual ~nla2bv_tactic() { ~nla2bv_tactic() override {
} }
virtual void updt_params(params_ref const & p) { void updt_params(params_ref const & p) override {
m_params = p; m_params = p;
} }
virtual void collect_param_descrs(param_descrs & r) { void collect_param_descrs(param_descrs & r) override {
r.insert("nla2bv_max_bv_size", CPK_UINT, "(default: inf) maximum bit-vector size used by nla2bv tactic"); r.insert("nla2bv_max_bv_size", CPK_UINT, "(default: inf) maximum bit-vector size used by nla2bv tactic");
r.insert("nla2bv_bv_size", CPK_UINT, "(default: 4) default bit-vector size used by nla2bv tactic."); r.insert("nla2bv_bv_size", CPK_UINT, "(default: 4) default bit-vector size used by nla2bv tactic.");
r.insert("nla2bv_root", CPK_UINT, "(default: 2) nla2bv tactic encodes reals into bit-vectors using expressions of the form a+b*sqrt(c), this parameter sets the value of c used in the encoding."); r.insert("nla2bv_root", CPK_UINT, "(default: 2) nla2bv tactic encodes reals into bit-vectors using expressions of the form a+b*sqrt(c), this parameter sets the value of c used in the encoding.");
@ -441,11 +441,11 @@ public:
arithmetic in place of non-linear integer arithmetic. arithmetic in place of non-linear integer arithmetic.
\return false if transformation is not possible. \return false if transformation is not possible.
*/ */
virtual void operator()(goal_ref const & g, void operator()(goal_ref const & g,
goal_ref_buffer & result, goal_ref_buffer & result,
model_converter_ref & mc, model_converter_ref & mc,
proof_converter_ref & pc, proof_converter_ref & pc,
expr_dependency_ref & core) { expr_dependency_ref & core) override {
SASSERT(g->is_well_sorted()); SASSERT(g->is_well_sorted());
fail_if_proof_generation("nla2bv", g); fail_if_proof_generation("nla2bv", g);
fail_if_unsat_core_generation("nla2bv", g); fail_if_unsat_core_generation("nla2bv", g);
@ -459,7 +459,7 @@ public:
SASSERT(g->is_well_sorted()); SASSERT(g->is_well_sorted());
} }
virtual void cleanup(void) { void cleanup(void) override {
} }
}; };

View file

@ -156,28 +156,28 @@ public:
m_imp = alloc(imp, m, p); m_imp = alloc(imp, m, p);
} }
virtual tactic * translate(ast_manager & m) { tactic * translate(ast_manager & m) override {
return alloc(normalize_bounds_tactic, m, m_params); return alloc(normalize_bounds_tactic, m, m_params);
} }
virtual ~normalize_bounds_tactic() { ~normalize_bounds_tactic() override {
dealloc(m_imp); dealloc(m_imp);
} }
virtual void updt_params(params_ref const & p) { void updt_params(params_ref const & p) override {
m_imp->updt_params(p); m_imp->updt_params(p);
} }
virtual void collect_param_descrs(param_descrs & r) { void collect_param_descrs(param_descrs & r) override {
insert_produce_models(r); insert_produce_models(r);
r.insert("norm_int_only", CPK_BOOL, "(default: true) normalize only the bounds of integer constants."); r.insert("norm_int_only", CPK_BOOL, "(default: true) normalize only the bounds of integer constants.");
} }
virtual void operator()(goal_ref const & in, void operator()(goal_ref const & in,
goal_ref_buffer & result, goal_ref_buffer & result,
model_converter_ref & mc, model_converter_ref & mc,
proof_converter_ref & pc, proof_converter_ref & pc,
expr_dependency_ref & core) { expr_dependency_ref & core) override {
try { try {
(*m_imp)(in, result, mc, pc, core); (*m_imp)(in, result, mc, pc, core);
} }
@ -186,7 +186,7 @@ public:
} }
} }
virtual void cleanup() { void cleanup() override {
ast_manager & m = m_imp->m; ast_manager & m = m_imp->m;
imp * d = alloc(imp, m, m_params); imp * d = alloc(imp, m, m_params);
std::swap(d, m_imp); std::swap(d, m_imp);

View file

@ -30,11 +30,11 @@ class pb2bv_model_converter : public model_converter {
public: public:
pb2bv_model_converter(ast_manager & _m); pb2bv_model_converter(ast_manager & _m);
pb2bv_model_converter(ast_manager & _m, obj_map<func_decl, expr*> const & c2bit, bound_manager const & bm); pb2bv_model_converter(ast_manager & _m, obj_map<func_decl, expr*> const & c2bit, bound_manager const & bm);
virtual ~pb2bv_model_converter(); ~pb2bv_model_converter() override;
virtual void operator()(model_ref & md); void operator()(model_ref & md) override;
virtual void operator()(model_ref & md, unsigned goal_idx); void operator()(model_ref & md, unsigned goal_idx) override;
virtual void display(std::ostream & out); void display(std::ostream & out) override;
virtual model_converter * translate(ast_translation & translator); model_converter * translate(ast_translation & translator) override;
}; };
#endif #endif

View file

@ -983,32 +983,32 @@ public:
m_imp = alloc(imp, m, p); m_imp = alloc(imp, m, p);
} }
virtual tactic * translate(ast_manager & m) { tactic * translate(ast_manager & m) override {
return alloc(pb2bv_tactic, m, m_params); return alloc(pb2bv_tactic, m, m_params);
} }
virtual ~pb2bv_tactic() { ~pb2bv_tactic() override {
dealloc(m_imp); dealloc(m_imp);
} }
virtual void updt_params(params_ref const & p) { void updt_params(params_ref const & p) override {
m_params = p; m_params = p;
m_imp->updt_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); m_imp->collect_param_descrs(r);
} }
virtual void operator()(goal_ref const & in, void operator()(goal_ref const & in,
goal_ref_buffer & result, goal_ref_buffer & result,
model_converter_ref & mc, model_converter_ref & mc,
proof_converter_ref & pc, proof_converter_ref & pc,
expr_dependency_ref & core) { expr_dependency_ref & core) override {
(*m_imp)(in, result, mc, pc, core); (*m_imp)(in, result, mc, pc, core);
} }
virtual void cleanup() { void cleanup() override {
ast_manager & m = m_imp->m; ast_manager & m = m_imp->m;
imp * d = alloc(imp, m, m_params); imp * d = alloc(imp, m, m_params);
std::swap(d, m_imp); std::swap(d, m_imp);
@ -1023,7 +1023,7 @@ tactic * mk_pb2bv_tactic(ast_manager & m, params_ref const & p) {
} }
struct is_pb_probe : public probe { struct is_pb_probe : public probe {
virtual result operator()(goal const & g) { result operator()(goal const & g) override {
try { try {
ast_manager & m = g.m(); ast_manager & m = g.m();
bound_manager bm(m); bound_manager bm(m);

View file

@ -74,7 +74,7 @@ class arith_degree_probe : public probe {
public: public:
arith_degree_probe(bool avg):m_avg(avg) {} arith_degree_probe(bool avg):m_avg(avg) {}
virtual result operator()(goal const & g) { result operator()(goal const & g) override {
proc p(g.m()); proc p(g.m());
for_each_expr_at(p, g); for_each_expr_at(p, g);
if (m_avg) if (m_avg)
@ -117,7 +117,7 @@ class arith_bw_probe : public probe {
public: public:
arith_bw_probe(bool avg):m_avg(avg) {} arith_bw_probe(bool avg):m_avg(avg) {}
virtual result operator()(goal const & g) { result operator()(goal const & g) override {
proc p(g.m()); proc p(g.m());
for_each_expr_at(p, g); for_each_expr_at(p, g);
if (m_avg) if (m_avg)
@ -269,14 +269,14 @@ static bool is_qfauflia(goal const & g) {
class is_qflia_probe : public probe { class is_qflia_probe : public probe {
public: public:
virtual result operator()(goal const & g) { result operator()(goal const & g) override {
return is_qflia(g); return is_qflia(g);
} }
}; };
class is_qfauflia_probe : public probe { class is_qfauflia_probe : public probe {
public: public:
virtual result operator()(goal const & g) { result operator()(goal const & g) override {
return is_qfauflia(g); return is_qfauflia(g);
} }
}; };
@ -288,7 +288,7 @@ static bool is_qflra(goal const & g) {
class is_qflra_probe : public probe { class is_qflra_probe : public probe {
public: public:
virtual result operator()(goal const & g) { result operator()(goal const & g) override {
return is_qflra(g); return is_qflra(g);
} }
}; };
@ -300,7 +300,7 @@ static bool is_qflira(goal const & g) {
class is_qflira_probe : public probe { class is_qflira_probe : public probe {
public: public:
virtual result operator()(goal const & g) { result operator()(goal const & g) override {
return is_qflira(g); return is_qflira(g);
} }
}; };
@ -344,14 +344,14 @@ static bool is_mip(goal const & g) {
class is_ilp_probe : public probe { class is_ilp_probe : public probe {
public: public:
virtual result operator()(goal const & g) { result operator()(goal const & g) override {
return is_ilp(g); return is_ilp(g);
} }
}; };
class is_mip_probe : public probe { class is_mip_probe : public probe {
public: public:
virtual result operator()(goal const & g) { result operator()(goal const & g) override {
return is_mip(g); return is_mip(g);
} }
}; };
@ -583,56 +583,56 @@ struct is_non_qfufnra_functor {
class is_qfnia_probe : public probe { class is_qfnia_probe : public probe {
public: public:
virtual result operator()(goal const & g) { result operator()(goal const & g) override {
return is_qfnia(g); return is_qfnia(g);
} }
}; };
class is_qfnra_probe : public probe { class is_qfnra_probe : public probe {
public: public:
virtual result operator()(goal const & g) { result operator()(goal const & g) override {
return is_qfnra(g); return is_qfnra(g);
} }
}; };
class is_nia_probe : public probe { class is_nia_probe : public probe {
public: public:
virtual result operator()(goal const & g) { result operator()(goal const & g) override {
return is_nia(g); return is_nia(g);
} }
}; };
class is_nra_probe : public probe { class is_nra_probe : public probe {
public: public:
virtual result operator()(goal const & g) { result operator()(goal const & g) override {
return is_nra(g); return is_nra(g);
} }
}; };
class is_nira_probe : public probe { class is_nira_probe : public probe {
public: public:
virtual result operator()(goal const & g) { result operator()(goal const & g) override {
return is_nira(g); return is_nira(g);
} }
}; };
class is_lia_probe : public probe { class is_lia_probe : public probe {
public: public:
virtual result operator()(goal const & g) { result operator()(goal const & g) override {
return is_lia(g); return is_lia(g);
} }
}; };
class is_lra_probe : public probe { class is_lra_probe : public probe {
public: public:
virtual result operator()(goal const & g) { result operator()(goal const & g) override {
return is_lra(g); return is_lra(g);
} }
}; };
class is_lira_probe : public probe { class is_lira_probe : public probe {
public: public:
virtual result operator()(goal const & g) { result operator()(goal const & g) override {
return is_lira(g); return is_lira(g);
} }
}; };
@ -644,7 +644,7 @@ static bool is_qfufnra(goal const& g) {
class is_qfufnra_probe : public probe { class is_qfufnra_probe : public probe {
public: public:
virtual result operator()(goal const & g) { result operator()(goal const & g) override {
return is_qfufnra(g); return is_qfufnra(g);
} }
}; };

View file

@ -43,18 +43,18 @@ class propagate_ineqs_tactic : public tactic {
public: public:
propagate_ineqs_tactic(ast_manager & m, params_ref const & p); propagate_ineqs_tactic(ast_manager & m, params_ref const & p);
virtual tactic * translate(ast_manager & m) { tactic * translate(ast_manager & m) override {
return alloc(propagate_ineqs_tactic, m, m_params); return alloc(propagate_ineqs_tactic, m, m_params);
} }
virtual ~propagate_ineqs_tactic(); ~propagate_ineqs_tactic() override;
virtual void updt_params(params_ref const & p); void updt_params(params_ref const & p) override;
virtual void collect_param_descrs(param_descrs & r) {} void collect_param_descrs(param_descrs & r) override {}
virtual void operator()(goal_ref const & g, goal_ref_buffer & result, model_converter_ref & mc, proof_converter_ref & pc, expr_dependency_ref & core); void operator()(goal_ref const & g, goal_ref_buffer & result, model_converter_ref & mc, proof_converter_ref & pc, expr_dependency_ref & core) override;
virtual void cleanup(); void cleanup() override;
}; };
tactic * mk_propagate_ineqs_tactic(ast_manager & m, params_ref const & p) { tactic * mk_propagate_ineqs_tactic(ast_manager & m, params_ref const & p) {

View file

@ -802,18 +802,18 @@ public:
m_params(p) { m_params(p) {
} }
virtual tactic * translate(ast_manager & m) { tactic * translate(ast_manager & m) override {
return alloc(purify_arith_tactic, m, m_params); return alloc(purify_arith_tactic, m, m_params);
} }
virtual ~purify_arith_tactic() { ~purify_arith_tactic() override {
} }
virtual void updt_params(params_ref const & p) { void updt_params(params_ref const & p) override {
m_params = p; m_params = p;
} }
virtual void collect_param_descrs(param_descrs & r) { void collect_param_descrs(param_descrs & r) override {
r.insert("complete", CPK_BOOL, r.insert("complete", CPK_BOOL,
"(default: true) add constraints to make sure that any interpretation of a underspecified arithmetic operators is a function. The result will include additional uninterpreted functions/constants: /0, div0, mod0, 0^0, neg-root"); "(default: true) add constraints to make sure that any interpretation of a underspecified arithmetic operators is a function. The result will include additional uninterpreted functions/constants: /0, div0, mod0, 0^0, neg-root");
r.insert("elim_root_objects", CPK_BOOL, r.insert("elim_root_objects", CPK_BOOL,
@ -823,11 +823,11 @@ public:
th_rewriter::get_param_descrs(r); th_rewriter::get_param_descrs(r);
} }
virtual void operator()(goal_ref const & g, void operator()(goal_ref const & g,
goal_ref_buffer & result, goal_ref_buffer & result,
model_converter_ref & mc, model_converter_ref & mc,
proof_converter_ref & pc, proof_converter_ref & pc,
expr_dependency_ref & core) { expr_dependency_ref & core) override {
try { try {
SASSERT(g->is_well_sorted()); SASSERT(g->is_well_sorted());
mc = 0; pc = 0; core = 0; mc = 0; pc = 0; core = 0;
@ -852,7 +852,7 @@ public:
} }
} }
virtual void cleanup() { void cleanup() override {
} }
}; };

View file

@ -390,20 +390,20 @@ public:
m_imp = alloc(imp, m, p); m_imp = alloc(imp, m, p);
} }
virtual tactic * translate(ast_manager & m) { tactic * translate(ast_manager & m) override {
return alloc(recover_01_tactic, m, m_params); return alloc(recover_01_tactic, m, m_params);
} }
virtual ~recover_01_tactic() { ~recover_01_tactic() override {
dealloc(m_imp); dealloc(m_imp);
} }
virtual void updt_params(params_ref const & p) { void updt_params(params_ref const & p) override {
m_params = p; m_params = p;
m_imp->updt_params(p); m_imp->updt_params(p);
} }
virtual void collect_param_descrs(param_descrs & r) { void collect_param_descrs(param_descrs & r) override {
th_rewriter::get_param_descrs(r); th_rewriter::get_param_descrs(r);
r.insert("recover_01_max_bits", CPK_UINT, "(default: 10) maximum number of bits to consider in a clause."); r.insert("recover_01_max_bits", CPK_UINT, "(default: 10) maximum number of bits to consider in a clause.");
} }
@ -412,7 +412,7 @@ public:
goal_ref_buffer & result, goal_ref_buffer & result,
model_converter_ref & mc, model_converter_ref & mc,
proof_converter_ref & pc, proof_converter_ref & pc,
expr_dependency_ref & core) { expr_dependency_ref & core) override {
try { try {
(*m_imp)(g, result, mc, pc, core); (*m_imp)(g, result, mc, pc, core);
} }
@ -421,7 +421,7 @@ public:
} }
} }
virtual void cleanup() { void cleanup() override {
imp * d = alloc(imp, m_imp->m, m_params); imp * d = alloc(imp, m_imp->m, m_params);
std::swap(d, m_imp); std::swap(d, m_imp);
dealloc(d); dealloc(d);

View file

@ -46,7 +46,7 @@ struct bit_blaster_model_converter : public model_converter {
} }
} }
virtual ~bit_blaster_model_converter() { ~bit_blaster_model_converter() override {
} }
void collect_bits(obj_hashtable<func_decl> & bits) { void collect_bits(obj_hashtable<func_decl> & bits) {
@ -142,7 +142,7 @@ struct bit_blaster_model_converter : public model_converter {
} }
} }
virtual void operator()(model_ref & md, unsigned goal_idx) { void operator()(model_ref & md, unsigned goal_idx) override {
SASSERT(goal_idx == 0); SASSERT(goal_idx == 0);
model * new_model = alloc(model, m()); model * new_model = alloc(model, m());
obj_hashtable<func_decl> bits; obj_hashtable<func_decl> bits;
@ -152,11 +152,11 @@ struct bit_blaster_model_converter : public model_converter {
md = new_model; md = new_model;
} }
virtual void operator()(model_ref & md) { void operator()(model_ref & md) override {
operator()(md, 0); operator()(md, 0);
} }
virtual void display(std::ostream & out) { void display(std::ostream & out) override {
out << "(bit-blaster-model-converter"; out << "(bit-blaster-model-converter";
unsigned sz = m_vars.size(); unsigned sz = m_vars.size();
for (unsigned i = 0; i < sz; i++) { for (unsigned i = 0; i < sz; i++) {
@ -171,7 +171,7 @@ protected:
bit_blaster_model_converter(ast_manager & m):m_vars(m), m_bits(m) { } bit_blaster_model_converter(ast_manager & m):m_vars(m), m_bits(m) { }
public: public:
virtual model_converter * translate(ast_translation & translator) { model_converter * translate(ast_translation & translator) override {
bit_blaster_model_converter * res = alloc(bit_blaster_model_converter, translator.to()); bit_blaster_model_converter * res = alloc(bit_blaster_model_converter, translator.to());
for (unsigned i = 0; i < m_vars.size(); i++) for (unsigned i = 0; i < m_vars.size(); i++)
res->m_vars.push_back(translator(m_vars[i].get())); res->m_vars.push_back(translator(m_vars[i].get()));

View file

@ -111,21 +111,21 @@ public:
m_imp = alloc(imp, m, m_rewriter, p); m_imp = alloc(imp, m, m_rewriter, p);
} }
virtual tactic * translate(ast_manager & m) { tactic * translate(ast_manager & m) override {
SASSERT(!m_rewriter); // assume translation isn't used where rewriter is external. SASSERT(!m_rewriter); // assume translation isn't used where rewriter is external.
return alloc(bit_blaster_tactic, m, 0, m_params); return alloc(bit_blaster_tactic, m, 0, m_params);
} }
virtual ~bit_blaster_tactic() { ~bit_blaster_tactic() override {
dealloc(m_imp); dealloc(m_imp);
} }
virtual void updt_params(params_ref const & p) { void updt_params(params_ref const & p) override {
m_params = p; m_params = p;
m_imp->updt_params(p); m_imp->updt_params(p);
} }
virtual void collect_param_descrs(param_descrs & r) { void collect_param_descrs(param_descrs & r) override {
insert_max_memory(r); insert_max_memory(r);
insert_max_steps(r); insert_max_steps(r);
r.insert("blast_mul", CPK_BOOL, "(default: true) bit-blast multipliers (and dividers, remainders)."); r.insert("blast_mul", CPK_BOOL, "(default: true) bit-blast multipliers (and dividers, remainders).");
@ -134,11 +134,11 @@ public:
r.insert("blast_full", CPK_BOOL, "(default: false) bit-blast any term with bit-vector sort, this option will make E-matching ineffective in any pattern containing bit-vector terms."); r.insert("blast_full", CPK_BOOL, "(default: false) bit-blast any term with bit-vector sort, this option will make E-matching ineffective in any pattern containing bit-vector terms.");
} }
virtual void operator()(goal_ref const & g, void operator()(goal_ref const & g,
goal_ref_buffer & result, goal_ref_buffer & result,
model_converter_ref & mc, model_converter_ref & mc,
proof_converter_ref & pc, proof_converter_ref & pc,
expr_dependency_ref & core) { expr_dependency_ref & core) override {
try { try {
(*m_imp)(g, result, mc, pc, core); (*m_imp)(g, result, mc, pc, core);
} }
@ -147,7 +147,7 @@ public:
} }
} }
virtual void cleanup() { void cleanup() override {
imp * d = alloc(imp, m_imp->m(), m_rewriter, m_params); imp * d = alloc(imp, m_imp->m(), m_rewriter, m_params);
std::swap(d, m_imp); std::swap(d, m_imp);
dealloc(d); dealloc(d);

View file

@ -426,20 +426,20 @@ public:
m_imp = alloc(imp, m, p); m_imp = alloc(imp, m, p);
} }
virtual tactic * translate(ast_manager & m) { tactic * translate(ast_manager & m) override {
return alloc(bv1_blaster_tactic, m, m_params); return alloc(bv1_blaster_tactic, m, m_params);
} }
virtual ~bv1_blaster_tactic() { ~bv1_blaster_tactic() override {
dealloc(m_imp); dealloc(m_imp);
} }
virtual void updt_params(params_ref const & p) { void updt_params(params_ref const & p) override {
m_params = p; m_params = p;
m_imp->m_rw.cfg().updt_params(p); m_imp->m_rw.cfg().updt_params(p);
} }
virtual void collect_param_descrs(param_descrs & r) { void collect_param_descrs(param_descrs & r) override {
insert_max_memory(r); insert_max_memory(r);
insert_max_steps(r); insert_max_steps(r);
} }
@ -454,15 +454,15 @@ public:
It also does not support quantifiers. It also does not support quantifiers.
Return a model_converter that converts any model for the updated set into a model for the old set. Return a model_converter that converts any model for the updated set into a model for the old set.
*/ */
virtual void operator()(goal_ref const & g, void operator()(goal_ref const & g,
goal_ref_buffer & result, goal_ref_buffer & result,
model_converter_ref & mc, model_converter_ref & mc,
proof_converter_ref & pc, proof_converter_ref & pc,
expr_dependency_ref & core) { expr_dependency_ref & core) override {
(*m_imp)(g, result, mc, pc, core); (*m_imp)(g, result, mc, pc, core);
} }
virtual void cleanup() { void cleanup() override {
imp * d = alloc(imp, m_imp->m(), m_params); imp * d = alloc(imp, m_imp->m(), m_params);
std::swap(d, m_imp); std::swap(d, m_imp);
dealloc(d); dealloc(d);
@ -480,7 +480,7 @@ tactic * mk_bv1_blaster_tactic(ast_manager & m, params_ref const & p) {
class is_qfbv_eq_probe : public probe { class is_qfbv_eq_probe : public probe {
public: public:
virtual result operator()(goal const & g) { result operator()(goal const & g) override {
bv1_blaster_tactic t(g.m()); bv1_blaster_tactic t(g.m());
return t.is_target(g); return t.is_target(g);

View file

@ -111,7 +111,7 @@ struct bv_bound_chk_rewriter : public rewriter_tpl<bv_bound_chk_rewriter_cfg> {
updt_params(p); updt_params(p);
} }
virtual ~bv_bound_chk_rewriter() {} ~bv_bound_chk_rewriter() override {}
void updt_params(params_ref const & _p) { void updt_params(params_ref const & _p) {
m_cfg.updt_params(_p); m_cfg.updt_params(_p);
@ -135,17 +135,17 @@ class bv_bound_chk_tactic : public tactic {
bv_bound_chk_stats m_stats; bv_bound_chk_stats m_stats;
public: public:
bv_bound_chk_tactic(ast_manager & m, params_ref const & p); bv_bound_chk_tactic(ast_manager & m, params_ref const & p);
virtual ~bv_bound_chk_tactic(); ~bv_bound_chk_tactic() override;
void operator()(goal_ref const & g, void operator()(goal_ref const & g,
goal_ref_buffer & result, goal_ref_buffer & result,
model_converter_ref & mc, model_converter_ref & mc,
proof_converter_ref & pc, proof_converter_ref & pc,
expr_dependency_ref & core); expr_dependency_ref & core) override;
virtual tactic * translate(ast_manager & m); tactic * translate(ast_manager & m) override;
virtual void updt_params(params_ref const & p); void updt_params(params_ref const & p) override;
void cleanup(); void cleanup() override;
void collect_statistics(statistics & st) const; void collect_statistics(statistics & st) const override;
void reset_statistics(); void reset_statistics() override;
}; };
class bv_bound_chk_tactic::imp { class bv_bound_chk_tactic::imp {

View file

@ -305,7 +305,7 @@ namespace {
updt_params(p); updt_params(p);
} }
virtual void updt_params(params_ref const & p) { void updt_params(params_ref const & p) override {
m_propagate_eq = p.get_bool("propagate_eq", false); m_propagate_eq = p.get_bool("propagate_eq", false);
} }
@ -313,7 +313,7 @@ namespace {
r.insert("propagate-eq", CPK_BOOL, "(default: false) propagate equalities from inequalities"); r.insert("propagate-eq", CPK_BOOL, "(default: false) propagate equalities from inequalities");
} }
virtual ~bv_bounds_simplifier() { ~bv_bounds_simplifier() override {
for (unsigned i = 0, e = m_expr_vars.size(); i < e; ++i) { for (unsigned i = 0, e = m_expr_vars.size(); i < e; ++i) {
dealloc(m_expr_vars[i]); dealloc(m_expr_vars[i]);
} }
@ -322,7 +322,7 @@ namespace {
} }
} }
virtual bool assert_expr(expr * t, bool sign) { bool assert_expr(expr * t, bool sign) override {
while (m.is_not(t, t)) { while (m.is_not(t, t)) {
sign = !sign; sign = !sign;
} }
@ -353,7 +353,7 @@ namespace {
return true; return true;
} }
virtual bool simplify(expr* t, expr_ref& result) { bool simplify(expr* t, expr_ref& result) override {
expr* t1; expr* t1;
interval b; interval b;
@ -465,7 +465,7 @@ namespace {
return false; return false;
} }
virtual bool may_simplify(expr* t) { bool may_simplify(expr* t) override {
if (m_bv.is_numeral(t)) if (m_bv.is_numeral(t))
return false; return false;
@ -504,7 +504,7 @@ namespace {
return false; return false;
} }
virtual void pop(unsigned num_scopes) { void pop(unsigned num_scopes) override {
TRACE("bv", tout << "pop: " << num_scopes << "\n";); TRACE("bv", tout << "pop: " << num_scopes << "\n";);
if (m_scopes.empty()) if (m_scopes.empty())
return; return;
@ -526,11 +526,11 @@ namespace {
m_scopes.shrink(target); m_scopes.shrink(target);
} }
virtual simplifier * translate(ast_manager & m) { simplifier * translate(ast_manager & m) override {
return alloc(bv_bounds_simplifier, m, m_params); return alloc(bv_bounds_simplifier, m, m_params);
} }
virtual unsigned scope_level() const { unsigned scope_level() const override {
return m_scopes.size(); return m_scopes.size();
} }
}; };
@ -622,7 +622,7 @@ namespace {
r.insert("propagate-eq", CPK_BOOL, "(default: false) propagate equalities from inequalities"); r.insert("propagate-eq", CPK_BOOL, "(default: false) propagate equalities from inequalities");
} }
virtual ~dom_bv_bounds_simplifier() { ~dom_bv_bounds_simplifier() override {
for (unsigned i = 0, e = m_expr_vars.size(); i < e; ++i) { for (unsigned i = 0, e = m_expr_vars.size(); i < e; ++i) {
dealloc(m_expr_vars[i]); dealloc(m_expr_vars[i]);
} }
@ -631,7 +631,7 @@ namespace {
} }
} }
virtual bool assert_expr(expr * t, bool sign) { bool assert_expr(expr * t, bool sign) override {
while (m.is_not(t, t)) { while (m.is_not(t, t)) {
sign = !sign; sign = !sign;
} }
@ -662,7 +662,7 @@ namespace {
return true; return true;
} }
virtual void operator()(expr_ref& r) { void operator()(expr_ref& r) override {
expr* t1, * t = r; expr* t1, * t = r;
interval b; interval b;
@ -781,7 +781,7 @@ namespace {
return false; return false;
} }
virtual void pop(unsigned num_scopes) { void pop(unsigned num_scopes) override {
TRACE("bv", tout << "pop: " << num_scopes << "\n";); TRACE("bv", tout << "pop: " << num_scopes << "\n";);
if (m_scopes.empty()) if (m_scopes.empty())
return; return;
@ -803,11 +803,11 @@ namespace {
m_scopes.shrink(target); m_scopes.shrink(target);
} }
virtual dom_simplifier * translate(ast_manager & m) { dom_simplifier * translate(ast_manager & m) override {
return alloc(dom_bv_bounds_simplifier, m, m_params); return alloc(dom_bv_bounds_simplifier, m, m_params);
} }
virtual unsigned scope_level() const { unsigned scope_level() const override {
return m_scopes.size(); return m_scopes.size();
} }

View file

@ -34,15 +34,15 @@ class bv_size_reduction_tactic : public tactic {
public: public:
bv_size_reduction_tactic(ast_manager & m); bv_size_reduction_tactic(ast_manager & m);
virtual tactic * translate(ast_manager & m) { tactic * translate(ast_manager & m) override {
return alloc(bv_size_reduction_tactic, m); return alloc(bv_size_reduction_tactic, m);
} }
virtual ~bv_size_reduction_tactic(); ~bv_size_reduction_tactic() override;
virtual void operator()(goal_ref const & g, goal_ref_buffer & result, model_converter_ref & mc, proof_converter_ref & pc, expr_dependency_ref & core); void operator()(goal_ref const & g, goal_ref_buffer & result, model_converter_ref & mc, proof_converter_ref & pc, expr_dependency_ref & core) override;
virtual void cleanup(); void cleanup() override;
}; };
tactic * mk_bv_size_reduction_tactic(ast_manager & m, params_ref const & p) { tactic * mk_bv_size_reduction_tactic(ast_manager & m, params_ref const & p) {

View file

@ -113,32 +113,32 @@ public:
m_imp = alloc(imp, m, p); m_imp = alloc(imp, m, p);
} }
virtual tactic * translate(ast_manager & m) { tactic * translate(ast_manager & m) override {
return alloc(bvarray2uf_tactic, m, m_params); return alloc(bvarray2uf_tactic, m, m_params);
} }
virtual ~bvarray2uf_tactic() { ~bvarray2uf_tactic() override {
dealloc(m_imp); dealloc(m_imp);
} }
virtual void updt_params(params_ref const & p) { void updt_params(params_ref const & p) override {
m_params = p; m_params = p;
m_imp->updt_params(p); m_imp->updt_params(p);
} }
virtual void collect_param_descrs(param_descrs & r) { void collect_param_descrs(param_descrs & r) override {
insert_produce_models(r); insert_produce_models(r);
} }
virtual void operator()(goal_ref const & in, void operator()(goal_ref const & in,
goal_ref_buffer & result, goal_ref_buffer & result,
model_converter_ref & mc, model_converter_ref & mc,
proof_converter_ref & pc, proof_converter_ref & pc,
expr_dependency_ref & core) { expr_dependency_ref & core) override {
(*m_imp)(in, result, mc, pc, core); (*m_imp)(in, result, mc, pc, core);
} }
virtual void cleanup() { void cleanup() override {
ast_manager & m = m_imp->m(); ast_manager & m = m_imp->m();
imp * d = alloc(imp, m, m_params); imp * d = alloc(imp, m, m_params);
std::swap(d, m_imp); std::swap(d, m_imp);

View file

@ -95,8 +95,8 @@ class dt2bv_tactic : public tactic {
struct sort_pred : public i_sort_pred { struct sort_pred : public i_sort_pred {
dt2bv_tactic& m_t; dt2bv_tactic& m_t;
sort_pred(dt2bv_tactic& t): m_t(t) {} sort_pred(dt2bv_tactic& t): m_t(t) {}
virtual ~sort_pred() {} ~sort_pred() override {}
virtual bool operator()(sort* s) { bool operator()(sort* s) override {
return m_t.m_fd_sorts.contains(s); return m_t.m_fd_sorts.contains(s);
} }
}; };
@ -107,21 +107,21 @@ public:
dt2bv_tactic(ast_manager& m, params_ref const& p): dt2bv_tactic(ast_manager& m, params_ref const& p):
m(m), m_params(p), m_dt(m), m_bv(m), m_is_fd(*this) {} m(m), m_params(p), m_dt(m), m_bv(m), m_is_fd(*this) {}
virtual tactic * translate(ast_manager & m) { tactic * translate(ast_manager & m) override {
return alloc(dt2bv_tactic, m, m_params); return alloc(dt2bv_tactic, m, m_params);
} }
virtual void updt_params(params_ref const & p) { void updt_params(params_ref const & p) override {
} }
virtual void collect_param_descrs(param_descrs & r) { void collect_param_descrs(param_descrs & r) override {
} }
virtual void operator()(goal_ref const & g, void operator()(goal_ref const & g,
goal_ref_buffer & result, goal_ref_buffer & result,
model_converter_ref & mc, model_converter_ref & mc,
proof_converter_ref & pc, proof_converter_ref & pc,
expr_dependency_ref & core) { expr_dependency_ref & core) override {
mc = 0; pc = 0; core = 0; mc = 0; pc = 0; core = 0;
bool produce_proofs = g->proofs_enabled(); bool produce_proofs = g->proofs_enabled();
tactic_report report("dt2bv", *g); tactic_report report("dt2bv", *g);
@ -177,7 +177,7 @@ public:
SASSERT(g->is_well_sorted()); SASSERT(g->is_well_sorted());
} }
virtual void cleanup() { void cleanup() override {
m_fd_sorts.reset(); m_fd_sorts.reset();
m_non_fd_sorts.reset(); m_non_fd_sorts.reset();
} }

View file

@ -268,34 +268,34 @@ public:
m_imp = alloc(imp, m, p); m_imp = alloc(imp, m, p);
} }
virtual tactic * translate(ast_manager & m) { tactic * translate(ast_manager & m) override {
return alloc(elim_small_bv_tactic, m, m_params); return alloc(elim_small_bv_tactic, m, m_params);
} }
virtual ~elim_small_bv_tactic() { ~elim_small_bv_tactic() override {
dealloc(m_imp); dealloc(m_imp);
} }
virtual void updt_params(params_ref const & p) { void updt_params(params_ref const & p) override {
m_params = p; m_params = p;
m_imp->m_rw.cfg().updt_params(p); m_imp->m_rw.cfg().updt_params(p);
} }
virtual void collect_param_descrs(param_descrs & r) { void collect_param_descrs(param_descrs & r) override {
insert_max_memory(r); insert_max_memory(r);
insert_max_steps(r); insert_max_steps(r);
r.insert("max_bits", CPK_UINT, "(default: 4) maximum bit-vector size of quantified bit-vectors to be eliminated."); r.insert("max_bits", CPK_UINT, "(default: 4) maximum bit-vector size of quantified bit-vectors to be eliminated.");
} }
virtual void operator()(goal_ref const & in, void operator()(goal_ref const & in,
goal_ref_buffer & result, goal_ref_buffer & result,
model_converter_ref & mc, model_converter_ref & mc,
proof_converter_ref & pc, proof_converter_ref & pc,
expr_dependency_ref & core) { expr_dependency_ref & core) override {
(*m_imp)(in, result, mc, pc, core); (*m_imp)(in, result, mc, pc, core);
} }
virtual void cleanup() { void cleanup() override {
ast_manager & m = m_imp->m; ast_manager & m = m_imp->m;
m_imp->~imp(); m_imp->~imp();
m_imp = new (m_imp) imp(m, m_params); m_imp = new (m_imp) imp(m, m_params);

View file

@ -278,35 +278,35 @@ public:
m_imp = alloc(imp, m, p); m_imp = alloc(imp, m, p);
} }
virtual tactic * translate(ast_manager & m) { tactic * translate(ast_manager & m) override {
return alloc(max_bv_sharing_tactic, m, m_params); return alloc(max_bv_sharing_tactic, m, m_params);
} }
virtual ~max_bv_sharing_tactic() { ~max_bv_sharing_tactic() override {
dealloc(m_imp); dealloc(m_imp);
} }
virtual void updt_params(params_ref const & p) { void updt_params(params_ref const & p) override {
m_params = p; m_params = p;
m_imp->m_rw.cfg().updt_params(p); m_imp->m_rw.cfg().updt_params(p);
} }
virtual void collect_param_descrs(param_descrs & r) { void collect_param_descrs(param_descrs & r) override {
insert_max_memory(r); insert_max_memory(r);
insert_max_steps(r); insert_max_steps(r);
r.insert("max_args", CPK_UINT, r.insert("max_args", CPK_UINT,
"(default: 128) maximum number of arguments (per application) that will be considered by the greedy (quadratic) heuristic."); "(default: 128) maximum number of arguments (per application) that will be considered by the greedy (quadratic) heuristic.");
} }
virtual void operator()(goal_ref const & in, void operator()(goal_ref const & in,
goal_ref_buffer & result, goal_ref_buffer & result,
model_converter_ref & mc, model_converter_ref & mc,
proof_converter_ref & pc, proof_converter_ref & pc,
expr_dependency_ref & core) { expr_dependency_ref & core) override {
(*m_imp)(in, result, mc, pc, core); (*m_imp)(in, result, mc, pc, core);
} }
virtual void cleanup() { void cleanup() override {
ast_manager & m = m_imp->m(); ast_manager & m = m_imp->m();
params_ref p = std::move(m_params); params_ref p = std::move(m_params);
m_imp->~imp(); m_imp->~imp();

View file

@ -58,16 +58,16 @@ protected:
public: public:
concat_converter(T * c1, T * c2):m_c1(c1), m_c2(c2) {} concat_converter(T * c1, T * c2):m_c1(c1), m_c2(c2) {}
virtual ~concat_converter() {} ~concat_converter() override {}
virtual void cancel() { void cancel() override {
m_c2->cancel(); m_c2->cancel();
m_c1->cancel(); m_c1->cancel();
} }
virtual char const * get_name() const = 0; virtual char const * get_name() const = 0;
virtual void display(std::ostream & out) { void display(std::ostream & out) override {
out << "(" << get_name() << "\n"; out << "(" << get_name() << "\n";
m_c1->display(out); m_c1->display(out);
m_c2->display(out); m_c2->display(out);
@ -104,7 +104,7 @@ public:
} }
} }
virtual ~concat_star_converter() { ~concat_star_converter() override {
unsigned sz = m_c2s.size(); unsigned sz = m_c2s.size();
for (unsigned i = 0; i < sz; i++) { for (unsigned i = 0; i < sz; i++) {
T * c2 = m_c2s[i]; T * c2 = m_c2s[i];
@ -113,7 +113,7 @@ public:
} }
} }
virtual void cancel() { void cancel() override {
if (m_c1) if (m_c1)
m_c1->cancel(); m_c1->cancel();
unsigned num = m_c2s.size(); unsigned num = m_c2s.size();
@ -125,7 +125,7 @@ public:
virtual char const * get_name() const = 0; virtual char const * get_name() const = 0;
virtual void display(std::ostream & out) { void display(std::ostream & out) override {
out << "(" << get_name() << "\n"; out << "(" << get_name() << "\n";
if (m_c1) if (m_c1)
m_c1->display(out); m_c1->display(out);

View file

@ -152,35 +152,35 @@ public:
m_imp = alloc(imp, m, p); m_imp = alloc(imp, m, p);
} }
virtual tactic * translate(ast_manager & m) { tactic * translate(ast_manager & m) override {
return alloc(blast_term_ite_tactic, m, m_params); return alloc(blast_term_ite_tactic, m, m_params);
} }
virtual ~blast_term_ite_tactic() { ~blast_term_ite_tactic() override {
dealloc(m_imp); dealloc(m_imp);
} }
virtual void updt_params(params_ref const & p) { void updt_params(params_ref const & p) override {
m_params = p; m_params = p;
m_imp->m_rw.cfg().updt_params(p); m_imp->m_rw.cfg().updt_params(p);
} }
virtual void collect_param_descrs(param_descrs & r) { void collect_param_descrs(param_descrs & r) override {
insert_max_memory(r); insert_max_memory(r);
insert_max_steps(r); insert_max_steps(r);
r.insert("max_args", CPK_UINT, r.insert("max_args", CPK_UINT,
"(default: 128) maximum number of arguments (per application) that will be considered by the greedy (quadratic) heuristic."); "(default: 128) maximum number of arguments (per application) that will be considered by the greedy (quadratic) heuristic.");
} }
virtual void operator()(goal_ref const & in, void operator()(goal_ref const & in,
goal_ref_buffer & result, goal_ref_buffer & result,
model_converter_ref & mc, model_converter_ref & mc,
proof_converter_ref & pc, proof_converter_ref & pc,
expr_dependency_ref & core) { expr_dependency_ref & core) override {
(*m_imp)(in, result, mc, pc, core); (*m_imp)(in, result, mc, pc, core);
} }
virtual void cleanup() { void cleanup() override {
ast_manager & m = m_imp->m; ast_manager & m = m_imp->m;
dealloc(m_imp); dealloc(m_imp);
m_imp = alloc(imp, m, m_params); m_imp = alloc(imp, m, m_params);

View file

@ -46,19 +46,19 @@ public:
m_elim_ite(m, p) { m_elim_ite(m, p) {
} }
virtual tactic * translate(ast_manager & m) { tactic * translate(ast_manager & m) override {
return alloc(cofactor_term_ite_tactic, m, m_params); return alloc(cofactor_term_ite_tactic, m, m_params);
} }
virtual ~cofactor_term_ite_tactic() {} ~cofactor_term_ite_tactic() override {}
virtual void updt_params(params_ref const & p) { m_params = p; m_elim_ite.updt_params(p); } void updt_params(params_ref const & p) override { m_params = p; m_elim_ite.updt_params(p); }
virtual void collect_param_descrs(param_descrs & r) { m_elim_ite.collect_param_descrs(r); } void collect_param_descrs(param_descrs & r) override { m_elim_ite.collect_param_descrs(r); }
virtual void operator()(goal_ref const & g, void operator()(goal_ref const & g,
goal_ref_buffer & result, goal_ref_buffer & result,
model_converter_ref & mc, model_converter_ref & mc,
proof_converter_ref & pc, proof_converter_ref & pc,
expr_dependency_ref & core) { expr_dependency_ref & core) override {
SASSERT(g->is_well_sorted()); SASSERT(g->is_well_sorted());
fail_if_proof_generation("cofactor-term-ite", g); fail_if_proof_generation("cofactor-term-ite", g);
fail_if_unsat_core_generation("cofactor-term-ite", g); fail_if_unsat_core_generation("cofactor-term-ite", g);
@ -71,7 +71,7 @@ public:
SASSERT(g->is_well_sorted()); SASSERT(g->is_well_sorted());
} }
virtual void cleanup() { return m_elim_ite.cleanup(); } void cleanup() override { return m_elim_ite.cleanup(); }
}; };

View file

@ -51,21 +51,21 @@ public:
m_params(p) { m_params(p) {
} }
virtual ~collect_statistics_tactic() {} ~collect_statistics_tactic() override {}
virtual tactic * translate(ast_manager & m_) { tactic * translate(ast_manager & m_) override {
return alloc(collect_statistics_tactic, m_, m_params); return alloc(collect_statistics_tactic, m_, m_params);
} }
virtual void updt_params(params_ref const & p) { void updt_params(params_ref const & p) override {
m_params = p; m_params = p;
} }
virtual void collect_param_descrs(param_descrs & r) {} void collect_param_descrs(param_descrs & r) override {}
virtual void operator()(goal_ref const & g, goal_ref_buffer & result, void operator()(goal_ref const & g, goal_ref_buffer & result,
model_converter_ref & mc, proof_converter_ref & pc, model_converter_ref & mc, proof_converter_ref & pc,
expr_dependency_ref & core) { expr_dependency_ref & core) override {
mc = 0; mc = 0;
tactic_report report("collect-statistics", *g); tactic_report report("collect-statistics", *g);
@ -86,13 +86,13 @@ public:
result.push_back(g.get()); result.push_back(g.get());
} }
virtual void cleanup() {} void cleanup() override {}
virtual void collect_statistics(statistics & st) const { void collect_statistics(statistics & st) const override {
} }
virtual void reset_statistics() { reset(); } void reset_statistics() override { reset(); }
virtual void reset() { cleanup(); } void reset() override { cleanup(); }
protected: protected:
class collect_proc { class collect_proc {

View file

@ -33,13 +33,13 @@ class ctx_propagate_assertions : public ctx_simplify_tactic::simplifier {
void assert_eq_core(expr * t, app * val); void assert_eq_core(expr * t, app * val);
public: public:
ctx_propagate_assertions(ast_manager& m); ctx_propagate_assertions(ast_manager& m);
virtual ~ctx_propagate_assertions() {} ~ctx_propagate_assertions() override {}
virtual bool assert_expr(expr * t, bool sign); bool assert_expr(expr * t, bool sign) override;
virtual bool simplify(expr* t, expr_ref& result); bool simplify(expr* t, expr_ref& result) override;
void push(); void push();
virtual void pop(unsigned num_scopes); void pop(unsigned num_scopes) override;
virtual unsigned scope_level() const { return m_scopes.size(); } unsigned scope_level() const override { return m_scopes.size(); }
virtual simplifier * translate(ast_manager & m); simplifier * translate(ast_manager & m) override;
}; };

View file

@ -46,21 +46,21 @@ protected:
public: public:
ctx_simplify_tactic(ast_manager & m, simplifier* simp, params_ref const & p = params_ref()); ctx_simplify_tactic(ast_manager & m, simplifier* simp, params_ref const & p = params_ref());
virtual tactic * translate(ast_manager & m); tactic * translate(ast_manager & m) override;
virtual ~ctx_simplify_tactic(); ~ctx_simplify_tactic() override;
virtual void updt_params(params_ref const & p); void updt_params(params_ref const & p) override;
static void get_param_descrs(param_descrs & r); static void get_param_descrs(param_descrs & r);
virtual void collect_param_descrs(param_descrs & r) { get_param_descrs(r); } void collect_param_descrs(param_descrs & r) override { get_param_descrs(r); }
virtual void operator()(goal_ref const & in, void operator()(goal_ref const & in,
goal_ref_buffer & result, goal_ref_buffer & result,
model_converter_ref & mc, model_converter_ref & mc,
proof_converter_ref & pc, proof_converter_ref & pc,
expr_dependency_ref & core); expr_dependency_ref & core) override;
virtual void cleanup(); void cleanup() override;
}; };
tactic * mk_ctx_simplify_tactic(ast_manager & m, params_ref const & p = params_ref()); tactic * mk_ctx_simplify_tactic(ast_manager & m, params_ref const & p = params_ref());

View file

@ -65,26 +65,26 @@ public:
m_imp = alloc(imp, m); m_imp = alloc(imp, m);
} }
virtual tactic * translate(ast_manager & m) { tactic * translate(ast_manager & m) override {
return alloc(der_tactic, m); return alloc(der_tactic, m);
} }
virtual ~der_tactic() { ~der_tactic() override {
dealloc(m_imp); dealloc(m_imp);
} }
virtual void operator()(goal_ref const & in, void operator()(goal_ref const & in,
goal_ref_buffer & result, goal_ref_buffer & result,
model_converter_ref & mc, model_converter_ref & mc,
proof_converter_ref & pc, proof_converter_ref & pc,
expr_dependency_ref & core) { expr_dependency_ref & core) override {
mc = 0; pc = 0; core = 0; mc = 0; pc = 0; core = 0;
(*m_imp)(*(in.get())); (*m_imp)(*(in.get()));
in->inc_depth(); in->inc_depth();
result.push_back(in.get()); result.push_back(in.get());
} }
virtual void cleanup() { void cleanup() override {
ast_manager & m = m_imp->m(); ast_manager & m = m_imp->m();
imp * d = alloc(imp, m); imp * d = alloc(imp, m);
std::swap(d, m_imp); std::swap(d, m_imp);

View file

@ -95,15 +95,15 @@ class distribute_forall_tactic : public tactic {
public: public:
distribute_forall_tactic():m_rw(0) {} distribute_forall_tactic():m_rw(0) {}
virtual tactic * translate(ast_manager & m) { tactic * translate(ast_manager & m) override {
return alloc(distribute_forall_tactic); return alloc(distribute_forall_tactic);
} }
virtual void operator()(goal_ref const & g, void operator()(goal_ref const & g,
goal_ref_buffer & result, goal_ref_buffer & result,
model_converter_ref & mc, model_converter_ref & mc,
proof_converter_ref & pc, proof_converter_ref & pc,
expr_dependency_ref & core) { expr_dependency_ref & core) override {
SASSERT(g->is_well_sorted()); SASSERT(g->is_well_sorted());
ast_manager & m = g->m(); ast_manager & m = g->m();
bool produce_proofs = g->proofs_enabled(); bool produce_proofs = g->proofs_enabled();
@ -134,7 +134,7 @@ public:
m_rw = 0; m_rw = 0;
} }
virtual void cleanup() {} void cleanup() override {}
}; };
tactic * mk_distribute_forall_tactic(ast_manager & m, params_ref const & p) { tactic * mk_distribute_forall_tactic(ast_manager & m, params_ref const & p) {

View file

@ -130,20 +130,20 @@ public:
m_dominators(m), m_depth(0), m_max_depth(1024), m_forward(true) {} m_dominators(m), m_depth(0), m_max_depth(1024), m_forward(true) {}
virtual ~dom_simplify_tactic(); ~dom_simplify_tactic() override;
virtual tactic * translate(ast_manager & m); tactic * translate(ast_manager & m) override;
virtual void updt_params(params_ref const & p) {} void updt_params(params_ref const & p) override {}
static void get_param_descrs(param_descrs & r) {} static void get_param_descrs(param_descrs & r) {}
virtual void collect_param_descrs(param_descrs & r) { get_param_descrs(r); } void collect_param_descrs(param_descrs & r) override { get_param_descrs(r); }
virtual void operator()(goal_ref const & in, void operator()(goal_ref const & in,
goal_ref_buffer & result, goal_ref_buffer & result,
model_converter_ref & mc, model_converter_ref & mc,
proof_converter_ref & pc, proof_converter_ref & pc,
expr_dependency_ref & core); expr_dependency_ref & core) override;
virtual void cleanup(); void cleanup() override;
}; };
class expr_substitution_simplifier : public dom_simplifier { class expr_substitution_simplifier : public dom_simplifier {
@ -160,18 +160,18 @@ class expr_substitution_simplifier : public dom_simplifier {
public: public:
expr_substitution_simplifier(ast_manager& m): m(m), m_subst(m), m_scoped_substitution(m_subst), m_trail(m) {} expr_substitution_simplifier(ast_manager& m): m(m), m_subst(m), m_scoped_substitution(m_subst), m_trail(m) {}
virtual ~expr_substitution_simplifier() {} ~expr_substitution_simplifier() override {}
virtual bool assert_expr(expr * t, bool sign); bool assert_expr(expr * t, bool sign) override;
void update_substitution(expr* n, proof* pr); void update_substitution(expr* n, proof* pr);
virtual void operator()(expr_ref& r) { r = m_scoped_substitution.find(r); } void operator()(expr_ref& r) override { r = m_scoped_substitution.find(r); }
virtual void pop(unsigned num_scopes) { m_scoped_substitution.pop(num_scopes); } void pop(unsigned num_scopes) override { m_scoped_substitution.pop(num_scopes); }
virtual unsigned scope_level() const { return m_scoped_substitution.scope_level(); } unsigned scope_level() const override { return m_scoped_substitution.scope_level(); }
virtual dom_simplifier * translate(ast_manager & m) { dom_simplifier * translate(ast_manager & m) override {
SASSERT(m_subst.empty()); SASSERT(m_subst.empty());
return alloc(expr_substitution_simplifier, m); return alloc(expr_substitution_simplifier, m);
} }

View file

@ -141,35 +141,35 @@ public:
m_imp = alloc(imp, m, p); m_imp = alloc(imp, m, p);
} }
virtual tactic * translate(ast_manager & m) { tactic * translate(ast_manager & m) override {
return alloc(elim_term_ite_tactic, m, m_params); return alloc(elim_term_ite_tactic, m, m_params);
} }
virtual ~elim_term_ite_tactic() { ~elim_term_ite_tactic() override {
dealloc(m_imp); dealloc(m_imp);
} }
virtual void updt_params(params_ref const & p) { void updt_params(params_ref const & p) override {
m_params = p; m_params = p;
m_imp->m_rw.cfg().updt_params(p); m_imp->m_rw.cfg().updt_params(p);
} }
virtual void collect_param_descrs(param_descrs & r) { void collect_param_descrs(param_descrs & r) override {
insert_max_memory(r); insert_max_memory(r);
insert_max_steps(r); insert_max_steps(r);
r.insert("max_args", CPK_UINT, r.insert("max_args", CPK_UINT,
"(default: 128) maximum number of arguments (per application) that will be considered by the greedy (quadratic) heuristic."); "(default: 128) maximum number of arguments (per application) that will be considered by the greedy (quadratic) heuristic.");
} }
virtual void operator()(goal_ref const & in, void operator()(goal_ref const & in,
goal_ref_buffer & result, goal_ref_buffer & result,
model_converter_ref & mc, model_converter_ref & mc,
proof_converter_ref & pc, proof_converter_ref & pc,
expr_dependency_ref & core) { expr_dependency_ref & core) override {
(*m_imp)(in, result, mc, pc, core); (*m_imp)(in, result, mc, pc, core);
} }
virtual void cleanup() { void cleanup() override {
ast_manager & m = m_imp->m; ast_manager & m = m_imp->m;
m_imp->~imp(); m_imp->~imp();
m_imp = new (m_imp) imp(m, m_params); m_imp = new (m_imp) imp(m, m_params);

View file

@ -915,34 +915,34 @@ public:
m_imp = alloc(imp, m, p); m_imp = alloc(imp, m, p);
} }
virtual tactic * translate(ast_manager & m) { tactic * translate(ast_manager & m) override {
return alloc(elim_uncnstr_tactic, m, m_params); return alloc(elim_uncnstr_tactic, m, m_params);
} }
virtual ~elim_uncnstr_tactic() { ~elim_uncnstr_tactic() override {
dealloc(m_imp); dealloc(m_imp);
} }
virtual void updt_params(params_ref const & p) { void updt_params(params_ref const & p) override {
m_params = p; m_params = p;
m_imp->updt_params(p); m_imp->updt_params(p);
} }
virtual void collect_param_descrs(param_descrs & r) { void collect_param_descrs(param_descrs & r) override {
insert_max_memory(r); insert_max_memory(r);
insert_max_steps(r); insert_max_steps(r);
} }
virtual void operator()(goal_ref const & g, void operator()(goal_ref const & g,
goal_ref_buffer & result, goal_ref_buffer & result,
model_converter_ref & mc, model_converter_ref & mc,
proof_converter_ref & pc, proof_converter_ref & pc,
expr_dependency_ref & core) { expr_dependency_ref & core) override {
(*m_imp)(g, result, mc, pc, core); (*m_imp)(g, result, mc, pc, core);
report_tactic_progress(":num-elim-apps", get_num_elim_apps()); report_tactic_progress(":num-elim-apps", get_num_elim_apps());
} }
virtual void cleanup() { void cleanup() override {
unsigned num_elim_apps = get_num_elim_apps(); unsigned num_elim_apps = get_num_elim_apps();
ast_manager & m = m_imp->m_manager; ast_manager & m = m_imp->m_manager;
imp * d = alloc(imp, m, m_params); imp * d = alloc(imp, m, m_params);
@ -955,11 +955,11 @@ public:
return m_imp->m_num_elim_apps; return m_imp->m_num_elim_apps;
} }
virtual void collect_statistics(statistics & st) const { void collect_statistics(statistics & st) const override {
st.update("eliminated applications", get_num_elim_apps()); st.update("eliminated applications", get_num_elim_apps());
} }
virtual void reset_statistics() { void reset_statistics() override {
m_imp->m_num_elim_apps = 0; m_imp->m_num_elim_apps = 0;
} }

View file

@ -250,31 +250,31 @@ public:
m_eq = alloc(rewriter_eq, m, *m_map, p); m_eq = alloc(rewriter_eq, m, *m_map, p);
} }
virtual tactic * translate(ast_manager & m) { tactic * translate(ast_manager & m) override {
return alloc(injectivity_tactic, m, m_params); return alloc(injectivity_tactic, m, m_params);
} }
virtual ~injectivity_tactic() { ~injectivity_tactic() override {
dealloc(m_finder); dealloc(m_finder);
dealloc(m_eq); dealloc(m_eq);
dealloc(m_map); dealloc(m_map);
} }
virtual void updt_params(params_ref const & p) { void updt_params(params_ref const & p) override {
m_params = p; m_params = p;
m_finder->updt_params(p); m_finder->updt_params(p);
} }
virtual void collect_param_descrs(param_descrs & r) { void collect_param_descrs(param_descrs & r) override {
insert_max_memory(r); insert_max_memory(r);
insert_produce_models(r); insert_produce_models(r);
} }
virtual void operator()(goal_ref const & g, void operator()(goal_ref const & g,
goal_ref_buffer & result, goal_ref_buffer & result,
model_converter_ref & mc, model_converter_ref & mc,
proof_converter_ref & pc, proof_converter_ref & pc,
expr_dependency_ref & core) { expr_dependency_ref & core) override {
(*m_finder)(g, result, mc, pc, core); (*m_finder)(g, result, mc, pc, core);
for (unsigned i = 0; i < g->size(); ++i) { for (unsigned i = 0; i < g->size(); ++i) {
@ -287,7 +287,7 @@ public:
result.push_back(g.get()); result.push_back(g.get());
} }
virtual void cleanup() { void cleanup() override {
InjHelper * m = alloc(InjHelper, m_manager); InjHelper * m = alloc(InjHelper, m_manager);
finder * f = alloc(finder, m_manager, *m, m_params); finder * f = alloc(finder, m_manager, *m, m_params);
rewriter_eq * r = alloc(rewriter_eq, m_manager, *m, m_params); rewriter_eq * r = alloc(rewriter_eq, m_manager, *m, m_params);

View file

@ -43,21 +43,21 @@ public:
TRACE("nnf", tout << "nnf_tactic constructor: " << p << "\n";); TRACE("nnf", tout << "nnf_tactic constructor: " << p << "\n";);
} }
virtual tactic * translate(ast_manager & m) { tactic * translate(ast_manager & m) override {
return alloc(nnf_tactic, m_params); return alloc(nnf_tactic, m_params);
} }
virtual ~nnf_tactic() {} ~nnf_tactic() override {}
virtual void updt_params(params_ref const & p) { m_params = p; } void updt_params(params_ref const & p) override { m_params = p; }
virtual void collect_param_descrs(param_descrs & r) { nnf::get_param_descrs(r); } void collect_param_descrs(param_descrs & r) override { nnf::get_param_descrs(r); }
virtual void operator()(goal_ref const & g, void operator()(goal_ref const & g,
goal_ref_buffer & result, goal_ref_buffer & result,
model_converter_ref & mc, model_converter_ref & mc,
proof_converter_ref & pc, proof_converter_ref & pc,
expr_dependency_ref & core) { expr_dependency_ref & core) override {
TRACE("nnf", tout << "params: " << m_params << "\n"; g->display(tout);); TRACE("nnf", tout << "params: " << m_params << "\n"; g->display(tout););
SASSERT(g->is_well_sorted()); SASSERT(g->is_well_sorted());
mc = 0; pc = 0; core = 0; mc = 0; pc = 0; core = 0;
@ -106,7 +106,7 @@ public:
SASSERT(g->is_well_sorted()); SASSERT(g->is_well_sorted());
} }
virtual void cleanup() {} void cleanup() override {}
}; };
tactic * mk_snf_tactic(ast_manager & m, params_ref const & p) { tactic * mk_snf_tactic(ast_manager & m, params_ref const & p) {

View file

@ -199,26 +199,26 @@ public:
m_imp = alloc(imp, m); m_imp = alloc(imp, m);
} }
virtual tactic * translate(ast_manager & m) { tactic * translate(ast_manager & m) override {
return alloc(occf_tactic, m); return alloc(occf_tactic, m);
} }
virtual ~occf_tactic() { ~occf_tactic() override {
dealloc(m_imp); dealloc(m_imp);
} }
virtual void updt_params(params_ref const & p) {} void updt_params(params_ref const & p) override {}
virtual void collect_param_descrs(param_descrs & r) {} void collect_param_descrs(param_descrs & r) override {}
virtual void operator()(goal_ref const & in, void operator()(goal_ref const & in,
goal_ref_buffer & result, goal_ref_buffer & result,
model_converter_ref & mc, model_converter_ref & mc,
proof_converter_ref & pc, proof_converter_ref & pc,
expr_dependency_ref & core) { expr_dependency_ref & core) override {
(*m_imp)(in, result, mc, pc, core); (*m_imp)(in, result, mc, pc, core);
} }
virtual void cleanup() { void cleanup() override {
imp * d = alloc(imp, m_imp->m); imp * d = alloc(imp, m_imp->m);
std::swap(d, m_imp); std::swap(d, m_imp);
dealloc(d); dealloc(d);

Some files were not shown because too many files have changed in this diff Show more