mirror of
https://github.com/Z3Prover/z3
synced 2025-04-24 01:25:31 +00:00
add parameter descriptions
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
583dae2e27
commit
b169292743
14 changed files with 737 additions and 25 deletions
|
@ -363,6 +363,21 @@ public:
|
|||
result = au.mk_numeral(num, true);
|
||||
return;
|
||||
}
|
||||
if (name == "as-array" && sz == 3) {
|
||||
array_util au(m);
|
||||
auto const* ch2 = sexpr->get_child(2);
|
||||
switch (ch2->get_kind()) {
|
||||
case sexpr::kind_t::COMPOSITE:
|
||||
break;
|
||||
default:
|
||||
name = sexpr->get_child(2)->get_symbol();
|
||||
f = ctx.find_func_decl(name);
|
||||
if (f) {
|
||||
result = au.mk_as_array(f);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
for (unsigned i = 2; i < sz; ++i) {
|
||||
auto* child = sexpr->get_child(i);
|
||||
if (child->is_numeral() && child->get_numeral().is_unsigned())
|
||||
|
@ -378,7 +393,6 @@ public:
|
|||
name = sexpr->get_symbol();
|
||||
break;
|
||||
case sexpr::kind_t::BV_NUMERAL: {
|
||||
std::cout << "bv numeral\n";
|
||||
goto bail;
|
||||
}
|
||||
case sexpr::kind_t::STRING:
|
||||
|
|
|
@ -95,6 +95,7 @@ void display_usage() {
|
|||
std::cout << " -p display Z3 global (and module) parameters.\n";
|
||||
std::cout << " -pd display Z3 global (and module) parameter descriptions.\n";
|
||||
std::cout << " -pm:name display Z3 module ('name') parameters.\n";
|
||||
std::cout << " -pmmd:name display Z3 module ('name') parameters in Markdown format.\n";
|
||||
std::cout << " -pp:name display Z3 parameter description, if 'name' is not provided, then all module names are listed.\n";
|
||||
std::cout << " -tactics[:name] display built-in tactics or if argument is given, display detailed information on tactic.\n";
|
||||
std::cout << " -probes display avilable probes.\n";
|
||||
|
@ -246,6 +247,15 @@ static void parse_cmd_line_args(std::string& input_file, int argc, char ** argv)
|
|||
gparams::display(std::cout, 0, false, true);
|
||||
exit(0);
|
||||
}
|
||||
else if (strcmp(opt_name, "pmmd") == 0) {
|
||||
if (opt_arg)
|
||||
gparams::display_module_markdown(std::cout, opt_arg);
|
||||
else {
|
||||
gparams::display_modules(std::cout);
|
||||
std::cout << "\nUse -pm:name to display all parameters available at module 'name'\n";
|
||||
}
|
||||
exit(0);
|
||||
}
|
||||
else if (strcmp(opt_name, "pm") == 0) {
|
||||
if (opt_arg) {
|
||||
gparams::display_module(std::cout, opt_arg);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue