예제 #1
0
void SIGINT_handler(int)
{
    SATSolver* solver = solverToInterrupt;
    cout << "c " << endl;
    std::cerr << "*** INTERRUPTED ***" << endl;
    if (!redDumpFname.empty() || !irredDumpFname.empty() || need_clean_exit) {
        solver->interrupt_asap();
        std::cerr
        << "*** Please wait. We need to interrupt cleanly" << endl
        << "*** This means we might need to finish some calculations"
        << endl;
    } else {
        if (solver->nVars() > 0) {
            //if (conf.verbosity >= 1) {
                solver->add_in_partial_solving_stats();
                solver->print_stats();
            //}
        } else {
            cout
            << "No clauses or variables were put into the solver, exiting without stats"
            << endl;
        }
        _exit(1);
    }
}
예제 #2
0
void signalHandler(int signum) {
    std::cerr << "*** INTERRUPTED ***\n";

    SATSolver* solver = solverToInterrupt;
    solver->interrupt_asap();

    solver->add_in_partial_solving_stats();
    solver->print_stats();

    _exit(1);
}