3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-06-29 17:38:45 +00:00

Use override rather than virtual.

This commit is contained in:
Bruce Mitchener 2018-02-10 09:15:12 +07:00
parent ce123d9dbc
commit 7167fda1dc
220 changed files with 2546 additions and 2548 deletions

View file

@ -63,7 +63,7 @@ namespace smt {
m_unique_sequences.insert(m.get_sort(uniq), uniq);
}
virtual expr* get_some_value(sort* s) {
expr* get_some_value(sort* s) override {
if (u.is_seq(s)) {
return u.str.mk_empty(s);
}
@ -74,7 +74,7 @@ namespace smt {
UNREACHABLE();
return 0;
}
virtual bool get_some_values(sort* s, expr_ref& v1, expr_ref& v2) {
bool get_some_values(sort* s, expr_ref& v1, expr_ref& v2) override {
if (u.is_string(s)) {
v1 = u.str.mk_string(symbol("a"));
v2 = u.str.mk_string(symbol("b"));
@ -94,7 +94,7 @@ namespace smt {
NOT_IMPLEMENTED_YET();
return false;
}
virtual expr* get_fresh_value(sort* s) {
expr* get_fresh_value(sort* s) override {
if (u.is_string(s)) {
while (true) {
std::ostringstream strm;
@ -122,7 +122,7 @@ namespace smt {
UNREACHABLE();
return 0;
}
virtual void register_value(expr* n) {
void register_value(expr* n) override {
symbol sym;
if (u.str.is_string(n, sym)) {
m_strings.insert(sym);
@ -148,17 +148,17 @@ namespace smt {
class theory_seq_empty : public theory {
bool m_used;
virtual final_check_status final_check_eh() { return m_used?FC_GIVEUP:FC_DONE; }
virtual bool internalize_atom(app*, bool) { if (!m_used) { get_context().push_trail(value_trail<context,bool>(m_used)); m_used = true; } return false; }
virtual bool internalize_term(app*) { return internalize_atom(0,false); }
virtual void new_eq_eh(theory_var, theory_var) { }
virtual void new_diseq_eh(theory_var, theory_var) {}
virtual theory* mk_fresh(context* new_ctx) { return alloc(theory_seq_empty, new_ctx->get_manager()); }
virtual char const * get_name() const { return "seq-empty"; }
virtual void display(std::ostream& out) const {}
final_check_status final_check_eh() override { return m_used?FC_GIVEUP:FC_DONE; }
bool internalize_atom(app*, bool) override { if (!m_used) { get_context().push_trail(value_trail<context,bool>(m_used)); m_used = true; } return false; }
bool internalize_term(app*) override { return internalize_atom(0,false); }
void new_eq_eh(theory_var, theory_var) override { }
void new_diseq_eh(theory_var, theory_var) override {}
theory* mk_fresh(context* new_ctx) override { return alloc(theory_seq_empty, new_ctx->get_manager()); }
char const * get_name() const override { return "seq-empty"; }
void display(std::ostream& out) const override {}
public:
theory_seq_empty(ast_manager& m):theory(m.mk_family_id("seq")), m_used(false) {}
virtual void init_model(model_generator & mg) {
void init_model(model_generator & mg) override {
mg.register_factory(alloc(seq_factory, get_manager(), get_family_id(), mg.get_model()));
}