mirror of
https://github.com/Z3Prover/z3
synced 2025-04-15 13:28:47 +00:00
improve interrupts
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
f7f4feaa47
commit
e774634217
|
@ -309,11 +309,16 @@ static unsigned parse_opt(std::istream& in, bool is_wcnf) {
|
||||||
opb opb(opt, _in);
|
opb opb(opt, _in);
|
||||||
opb.parse();
|
opb.parse();
|
||||||
}
|
}
|
||||||
lbool r = opt.optimize();
|
try {
|
||||||
switch (r) {
|
lbool r = opt.optimize();
|
||||||
case l_true: std::cout << "sat\n"; break;
|
switch (r) {
|
||||||
case l_false: std::cout << "unsat\n"; break;
|
case l_true: std::cout << "sat\n"; break;
|
||||||
case l_undef: std::cout << "unknown\n"; break;
|
case l_false: std::cout << "unsat\n"; break;
|
||||||
|
case l_undef: std::cout << "unknown\n"; break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (z3_exception & ex) {
|
||||||
|
std::cerr << ex.msg() << "\n";
|
||||||
}
|
}
|
||||||
#pragma omp critical (g_display_stats)
|
#pragma omp critical (g_display_stats)
|
||||||
{
|
{
|
||||||
|
@ -325,6 +330,7 @@ static unsigned parse_opt(std::istream& in, bool is_wcnf) {
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned parse_opt(char const* file_name, bool is_wcnf) {
|
unsigned parse_opt(char const* file_name, bool is_wcnf) {
|
||||||
|
g_first_interrupt = true;
|
||||||
g_start_time = static_cast<double>(clock());
|
g_start_time = static_cast<double>(clock());
|
||||||
register_on_timeout_proc(on_timeout);
|
register_on_timeout_proc(on_timeout);
|
||||||
signal(SIGINT, on_ctrl_c);
|
signal(SIGINT, on_ctrl_c);
|
||||||
|
|
Loading…
Reference in a new issue