mirror of
https://github.com/Z3Prover/z3
synced 2025-06-27 16:38:45 +00:00
add cube mode
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
commit
ae9a6664d4
144 changed files with 6012 additions and 3174 deletions
|
@ -16,20 +16,20 @@
|
|||
// and print "PASS" to indicate success.
|
||||
//
|
||||
|
||||
#define TST(MODULE) { \
|
||||
std::string s("test "); \
|
||||
s += #MODULE; \
|
||||
void tst_##MODULE(); \
|
||||
#define TST(MODULE) { \
|
||||
std::string s("test "); \
|
||||
s += #MODULE; \
|
||||
void tst_##MODULE(); \
|
||||
if (do_display_usage) \
|
||||
std::cout << #MODULE << "\n"; \
|
||||
for (int i = 0; i < argc; i++) \
|
||||
if (test_all || strcmp(argv[i], #MODULE) == 0) { \
|
||||
for (int i = 0; i < argc; i++) \
|
||||
if (test_all || strcmp(argv[i], #MODULE) == 0) { \
|
||||
enable_trace(#MODULE); \
|
||||
enable_debug(#MODULE); \
|
||||
timeit timeit(true, s.c_str()); \
|
||||
tst_##MODULE(); \
|
||||
enable_debug(#MODULE); \
|
||||
timeit timeit(true, s.c_str()); \
|
||||
tst_##MODULE(); \
|
||||
std::cout << "PASS" << std::endl; \
|
||||
} \
|
||||
} \
|
||||
}
|
||||
|
||||
#define TST_ARGV(MODULE) { \
|
||||
|
@ -39,13 +39,13 @@
|
|||
if (do_display_usage) \
|
||||
std::cout << #MODULE << "\n"; \
|
||||
for (int i = 0; i < argc; i++) \
|
||||
if (strcmp(argv[i], #MODULE) == 0) { \
|
||||
if (strcmp(argv[i], #MODULE) == 0) { \
|
||||
enable_trace(#MODULE); \
|
||||
enable_debug(#MODULE); \
|
||||
timeit timeit(true, s.c_str()); \
|
||||
tst_##MODULE(argv, argc, i); \
|
||||
enable_debug(#MODULE); \
|
||||
timeit timeit(true, s.c_str()); \
|
||||
tst_##MODULE(argv, argc, i); \
|
||||
std::cout << "PASS" << std::endl; \
|
||||
} \
|
||||
} \
|
||||
}
|
||||
|
||||
void error(const char * msg) {
|
||||
|
@ -78,48 +78,48 @@ void parse_cmd_line_args(int argc, char ** argv, bool& do_display_usage, bool& t
|
|||
while (i < argc) {
|
||||
char * arg = argv[i];
|
||||
char * eq_pos = 0;
|
||||
|
||||
if (arg[0] == '-' || arg[0] == '/') {
|
||||
char * opt_name = arg + 1;
|
||||
char * opt_arg = 0;
|
||||
char * colon = strchr(arg, ':');
|
||||
if (colon) {
|
||||
opt_arg = colon + 1;
|
||||
*colon = 0;
|
||||
}
|
||||
if (strcmp(opt_name, "h") == 0 ||
|
||||
|
||||
if (arg[0] == '-' || arg[0] == '/') {
|
||||
char * opt_name = arg + 1;
|
||||
char * opt_arg = 0;
|
||||
char * colon = strchr(arg, ':');
|
||||
if (colon) {
|
||||
opt_arg = colon + 1;
|
||||
*colon = 0;
|
||||
}
|
||||
if (strcmp(opt_name, "h") == 0 ||
|
||||
strcmp(opt_name, "?") == 0) {
|
||||
display_usage();
|
||||
display_usage();
|
||||
do_display_usage = true;
|
||||
return;
|
||||
}
|
||||
else if (strcmp(opt_name, "v") == 0) {
|
||||
if (!opt_arg)
|
||||
error("option argument (/v:level) is missing.");
|
||||
long lvl = strtol(opt_arg, 0, 10);
|
||||
set_verbosity_level(lvl);
|
||||
}
|
||||
else if (strcmp(opt_name, "w") == 0) {
|
||||
}
|
||||
else if (strcmp(opt_name, "v") == 0) {
|
||||
if (!opt_arg)
|
||||
error("option argument (/v:level) is missing.");
|
||||
long lvl = strtol(opt_arg, 0, 10);
|
||||
set_verbosity_level(lvl);
|
||||
}
|
||||
else if (strcmp(opt_name, "w") == 0) {
|
||||
enable_warning_messages(true);
|
||||
}
|
||||
else if (strcmp(opt_name, "a") == 0) {
|
||||
}
|
||||
else if (strcmp(opt_name, "a") == 0) {
|
||||
test_all = true;
|
||||
}
|
||||
}
|
||||
#ifdef _TRACE
|
||||
else if (strcmp(opt_name, "tr") == 0) {
|
||||
if (!opt_arg)
|
||||
error("option argument (/tr:tag) is missing.");
|
||||
enable_trace(opt_arg);
|
||||
}
|
||||
else if (strcmp(opt_name, "tr") == 0) {
|
||||
if (!opt_arg)
|
||||
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.");
|
||||
enable_debug(opt_arg);
|
||||
}
|
||||
else if (strcmp(opt_name, "dbg") == 0) {
|
||||
if (!opt_arg)
|
||||
error("option argument (/dbg:tag) is missing.");
|
||||
enable_debug(opt_arg);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
else if (arg[0] != '"' && (eq_pos = strchr(arg, '='))) {
|
||||
char * key = arg;
|
||||
*eq_pos = 0;
|
||||
|
@ -131,7 +131,7 @@ void parse_cmd_line_args(int argc, char ** argv, bool& do_display_usage, bool& t
|
|||
std::cerr << ex.msg() << "\n";
|
||||
}
|
||||
}
|
||||
i++;
|
||||
i++;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -238,6 +238,7 @@ int main(int argc, char ** argv) {
|
|||
TST(sat_user_scope);
|
||||
TST(pdr);
|
||||
TST_ARGV(ddnf);
|
||||
TST(ddnf1);
|
||||
TST(model_evaluator);
|
||||
TST(get_consequences);
|
||||
TST(pb2bv);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue