mirror of
https://github.com/Z3Prover/z3
synced 2025-07-31 08:23:17 +00:00
#7468 - add option (get-info :parameters) to display solver parameters that were updated globally and distinct from defaults
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
62126fd6e2
commit
c2b7b58c78
8 changed files with 62 additions and 6 deletions
|
@ -433,7 +433,7 @@ class set_option_cmd : public set_get_option_cmd {
|
|||
}
|
||||
|
||||
void set_param(cmd_context & ctx, char const * value) {
|
||||
try {
|
||||
try {
|
||||
gparams::set(m_option, value);
|
||||
env_params::updt_params();
|
||||
ctx.global_params_updated();
|
||||
|
@ -693,7 +693,7 @@ public:
|
|||
m_rlimit(":rlimit") {
|
||||
}
|
||||
char const * get_usage() const override { return "<keyword>"; }
|
||||
char const * get_descr(cmd_context & ctx) const override { return "get information."; }
|
||||
char const * get_descr(cmd_context & ctx) const override { return "(get-info :?) for options."; }
|
||||
unsigned get_arity() const override { return 1; }
|
||||
cmd_arg_kind next_arg_kind(cmd_context & ctx) const override { return CPK_KEYWORD; }
|
||||
void set_next_arg(cmd_context & ctx, symbol const & opt) override {
|
||||
|
@ -707,7 +707,7 @@ public:
|
|||
ctx.regular_stream() << "(:name \"Z3\")" << std::endl;
|
||||
}
|
||||
else if (opt == m_authors) {
|
||||
ctx.regular_stream() << "(:authors \"Leonardo de Moura, Nikolaj Bjorner and Christoph Wintersteiger\")" << std::endl;
|
||||
ctx.regular_stream() << "(:authors \"Leonardo de Moura, Nikolaj Bjorner, Lev Nachmanson and Christoph Wintersteiger\")" << std::endl;
|
||||
}
|
||||
else if (opt == m_version) {
|
||||
ctx.regular_stream() << "(:version \"" << Z3_MAJOR_VERSION << "." << Z3_MINOR_VERSION << "." << Z3_BUILD_NUMBER
|
||||
|
@ -731,8 +731,20 @@ public:
|
|||
else if (opt == m_assertion_stack_levels) {
|
||||
ctx.regular_stream() << "(:assertion-stack-levels " << ctx.num_scopes() << ")" << std::endl;
|
||||
}
|
||||
else if (opt == symbol(":parameters")) {
|
||||
ctx.display_parameters(ctx.regular_stream());
|
||||
}
|
||||
else {
|
||||
ctx.print_unsupported(opt, m_line, m_pos);
|
||||
if (opt != symbol(":?"))
|
||||
ctx.print_unsupported(opt, m_line, m_pos);
|
||||
ctx.regular_stream() << "; (get-info :reason-unknown)\n";
|
||||
ctx.regular_stream() << "; (get-info :status)\n";
|
||||
ctx.regular_stream() << "; (get-info :version)\n";
|
||||
ctx.regular_stream() << "; (get-info :authors)\n";
|
||||
ctx.regular_stream() << "; (get-info :error-behavior)\n";
|
||||
ctx.regular_stream() << "; (get-info :parameters)\n";
|
||||
ctx.regular_stream() << "; (get-info :rlimit)\n";
|
||||
ctx.regular_stream() << "; (get-info :assertion-stack-levels)\n";
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
|
@ -1902,6 +1902,11 @@ void cmd_context::display_model(model_ref& mdl) {
|
|||
}
|
||||
}
|
||||
|
||||
void cmd_context::display_parameters(std::ostream& out) {
|
||||
if (m_solver)
|
||||
m_solver->display_parameters(out);
|
||||
}
|
||||
|
||||
void cmd_context::add_declared_functions(model& mdl) {
|
||||
model_params p;
|
||||
if (!p.user_functions())
|
||||
|
|
|
@ -506,6 +506,7 @@ public:
|
|||
void display_assertions();
|
||||
void display_statistics(bool show_total_time = false, double total_time = 0.0);
|
||||
void display_dimacs();
|
||||
void display_parameters(std::ostream& out);
|
||||
void reset(bool finalize = false);
|
||||
void assert_expr(expr * t);
|
||||
void assert_expr(symbol const & name, expr * t);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue