mirror of
https://github.com/Z3Prover/z3
synced 2025-05-12 10:14:42 +00:00
Use override rather than virtual.
This commit is contained in:
parent
2b847478a2
commit
b7d1753843
138 changed files with 1621 additions and 1624 deletions
|
@ -58,17 +58,17 @@ public:
|
|||
m_decl(0) {
|
||||
}
|
||||
|
||||
virtual char const * get_usage() const { 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."; }
|
||||
virtual unsigned get_arity() const { return 2; }
|
||||
virtual void prepare(cmd_context & ctx) { m_name = symbol::null; m_decl = 0; }
|
||||
virtual cmd_arg_kind next_arg_kind(cmd_context & ctx) const {
|
||||
char const * get_usage() const override { return "<symbol> <tactic>"; }
|
||||
char const * get_descr(cmd_context & ctx) const override { return "declare a new tactic, use (help-tactic) for the tactic language syntax."; }
|
||||
unsigned get_arity() const override { return 2; }
|
||||
void prepare(cmd_context & ctx) override { m_name = symbol::null; m_decl = 0; }
|
||||
cmd_arg_kind next_arg_kind(cmd_context & ctx) const override {
|
||||
if (m_name == symbol::null) return CPK_SYMBOL;
|
||||
return CPK_SEXPR;
|
||||
}
|
||||
virtual void set_next_arg(cmd_context & ctx, symbol const & s) { m_name = s; }
|
||||
virtual void set_next_arg(cmd_context & ctx, sexpr * n) { m_decl = n; }
|
||||
virtual void execute(cmd_context & ctx) {
|
||||
void set_next_arg(cmd_context & ctx, symbol const & s) override { m_name = s; }
|
||||
void set_next_arg(cmd_context & ctx, sexpr * n) override { m_decl = n; }
|
||||
void execute(cmd_context & ctx) override {
|
||||
tactic_ref t = sexpr2tactic(ctx, m_decl); // make sure the tactic is well formed.
|
||||
ctx.insert_user_tactic(m_name, m_decl);
|
||||
}
|
||||
|
@ -133,23 +133,23 @@ public:
|
|||
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);
|
||||
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;
|
||||
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;
|
||||
}
|
||||
|
||||
virtual void init_pdescrs(cmd_context & ctx, param_descrs & p) {
|
||||
void init_pdescrs(cmd_context & ctx, param_descrs & p) override {
|
||||
insert_timeout(p);
|
||||
insert_max_memory(p);
|
||||
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) {
|
||||
}
|
||||
|
||||
virtual void get_labels(svector<symbol> & r) {
|
||||
void get_labels(svector<symbol> & r) override {
|
||||
r.append(labels);
|
||||
}
|
||||
|
||||
|
@ -187,16 +187,16 @@ public:
|
|||
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);
|
||||
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_model", CPK_BOOL, "(default: false) print model.");
|
||||
}
|
||||
|
||||
virtual void execute(cmd_context & ctx) {
|
||||
void execute(cmd_context & ctx) override {
|
||||
if (!m_tactic) {
|
||||
throw cmd_exception("check-sat-using needs a tactic argument");
|
||||
}
|
||||
|
@ -295,9 +295,9 @@ public:
|
|||
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.");
|
||||
#ifndef _EXTERNAL_RELEASE
|
||||
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);
|
||||
}
|
||||
|
||||
virtual void execute(cmd_context & ctx) {
|
||||
void execute(cmd_context & ctx) override {
|
||||
if (!m_tactic) {
|
||||
throw cmd_exception("apply needs a tactic argument");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue