mirror of
https://github.com/Z3Prover/z3
synced 2025-04-24 01:25:31 +00:00
better help
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
This commit is contained in:
parent
0934cb06d8
commit
91096b638a
5 changed files with 133 additions and 38 deletions
|
@ -77,8 +77,11 @@ void display_usage() {
|
|||
std::cout << " " << OPT << "version prints version number of Z3.\n";
|
||||
std::cout << " " << OPT << "v:level be verbose, where <level> is the verbosity level.\n";
|
||||
std::cout << " " << OPT << "nw disable warning messages.\n";
|
||||
std::cout << " " << OPT << "ps display Z3 global (and module) parameters.\n";
|
||||
std::cout << " --" << " all remaining arguments are assumed to be part of the input file name. This option allows Z3 to read files with strange names such as: -foo.smt2.\n";
|
||||
std::cout << " " << OPT << "p display Z3 global (and module) parameters.\n";
|
||||
std::cout << " " << OPT << "pd display Z3 global (and module) parameter descriptions.\n";
|
||||
std::cout << " " << OPT << "pm:name display Z3 module ('name') parameters.\n";
|
||||
std::cout << " " << OPT << "pp:name display Z3 parameter description.\n";
|
||||
std::cout << " --" << " all remaining arguments are assumed to be part of the input file name. This option allows Z3 to read files with strange names such as: -foo.smt2.\n";
|
||||
std::cout << "\nResources:\n";
|
||||
// timeout and memout are now available on Linux and OSX too.
|
||||
std::cout << " " << OPT << "T:timeout set the timeout (in seconds).\n";
|
||||
|
@ -166,7 +169,7 @@ void parse_cmd_line_args(int argc, char ** argv) {
|
|||
}
|
||||
else if (strcmp(opt_name, "v") == 0) {
|
||||
if (!opt_arg)
|
||||
error("option argument (/v:level) is missing.");
|
||||
error("option argument (-v:level) is missing.");
|
||||
long lvl = strtol(opt_arg, 0, 10);
|
||||
set_verbosity_level(lvl);
|
||||
}
|
||||
|
@ -175,39 +178,55 @@ void parse_cmd_line_args(int argc, char ** argv) {
|
|||
}
|
||||
else if (strcmp(opt_name, "T") == 0) {
|
||||
if (!opt_arg)
|
||||
error("option argument (/T:timeout) is missing.");
|
||||
error("option argument (-T:timeout) is missing.");
|
||||
long tm = strtol(opt_arg, 0, 10);
|
||||
set_timeout(tm * 1000);
|
||||
}
|
||||
else if (strcmp(opt_name, "t") == 0) {
|
||||
if (!opt_arg)
|
||||
error("option argument (/t:timeout) is missing.");
|
||||
error("option argument (-t:timeout) is missing.");
|
||||
gparams::set("timeout", opt_arg);
|
||||
}
|
||||
else if (strcmp(opt_name, "nw") == 0) {
|
||||
enable_warning_messages(false);
|
||||
}
|
||||
else if (strcmp(opt_name, "ps") == 0) {
|
||||
gparams::display(std::cout);
|
||||
else if (strcmp(opt_name, "p") == 0) {
|
||||
gparams::display(std::cout, 0, false, false);
|
||||
exit(0);
|
||||
}
|
||||
else if (strcmp(opt_name, "pd") == 0) {
|
||||
gparams::display(std::cout, 0, false, true);
|
||||
exit(0);
|
||||
}
|
||||
else if (strcmp(opt_name, "pm") == 0) {
|
||||
if (!opt_arg)
|
||||
error("option argument (-pm:name) is missing.");
|
||||
gparams::display_module(std::cout, opt_arg);
|
||||
exit(0);
|
||||
}
|
||||
else if (strcmp(opt_name, "pp") == 0) {
|
||||
if (!opt_arg)
|
||||
error("option argument (-pp:name) is missing.");
|
||||
gparams::display_parameter(std::cout, opt_arg);
|
||||
exit(0);
|
||||
}
|
||||
#ifdef _TRACE
|
||||
else if (strcmp(opt_name, "tr") == 0) {
|
||||
if (!opt_arg)
|
||||
error("option argument (/tr:tag) is missing.");
|
||||
error("option argument (-tr:tag) is missing.");
|
||||
enable_trace(opt_arg);
|
||||
}
|
||||
#endif
|
||||
#ifdef Z3DEBUG
|
||||
else if (strcmp(opt_name, "dbg") == 0) {
|
||||
if (!opt_arg)
|
||||
error("option argument (/dbg:tag) is missing.");
|
||||
error("option argument (-dbg:tag) is missing.");
|
||||
enable_debug(opt_arg);
|
||||
}
|
||||
#endif
|
||||
else if (strcmp(opt_name, "memory") == 0) {
|
||||
if (!opt_arg)
|
||||
error("option argument (/memory:val) is missing.");
|
||||
error("option argument (-memory:val) is missing.");
|
||||
gparams::set("memory_max_size", opt_arg);
|
||||
}
|
||||
else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue