}
#endif
+#ifndef _WIN32
ezMiniSAT *ezMiniSAT::alarmHandlerThis = NULL;
clock_t ezMiniSAT::alarmHandlerTimeout = 0;
} else
alarm(1);
}
+#endif
bool ezMiniSAT::solver(const std::vector<int> &modelExpressions, std::vector<bool> &modelValues, const std::vector<int> &assumptions)
{
#endif
}
+#ifndef _WIN32
struct sigaction sig_action;
struct sigaction old_sig_action;
int old_alarm_timeout = 0;
sigaction(SIGALRM, &sig_action, &old_sig_action);
alarm(1);
}
+#endif
bool foundSolution = minisatSolver->solve(assumps);
+#ifndef _WIN32
if (solverTimeout > 0) {
if (alarmHandlerTimeout == 0)
solverTimoutStatus = true;
sigaction(SIGALRM, &old_sig_action, NULL);
alarm(old_alarm_timeout);
}
+#endif
if (!foundSolution) {
#if !EZMINISAT_INCREMENTAL
std::set<int> cnfFrozenVars;
#endif
+#ifndef _WIN32
static ezMiniSAT *alarmHandlerThis;
static clock_t alarmHandlerTimeout;
static void alarmHandler(int);
+#endif
public:
ezMiniSAT();