File tree Expand file tree Collapse file tree 2 files changed +23
-1
lines changed
Expand file tree Collapse file tree 2 files changed +23
-1
lines changed Original file line number Diff line number Diff line change 1212
1313// decision procedure wrapper for boolean propositional logics
1414
15+ #include < stdint.h>
16+
1517#include < util/message.h>
1618#include < util/threeval.h>
1719
Original file line number Diff line number Diff line change @@ -115,13 +115,17 @@ void satcheck_minisat2_baset<T>::lcnf(const bvt &bv)
115115 clause_counter++;
116116}
117117
118+ #ifndef _WIN32
119+
118120static Minisat::Solver *solver_to_interrupt=nullptr ;
119121
120122static void interrupt_solver (int signum)
121123{
122124 solver_to_interrupt->interrupt ();
123125}
124126
127+ #endif
128+
125129template <typename T>
126130propt::resultt satcheck_minisat2_baset<T>::prop_solve()
127131{
@@ -161,6 +165,10 @@ propt::resultt satcheck_minisat2_baset<T>::prop_solve()
161165 Minisat::vec<Minisat::Lit> solver_assumptions;
162166 convert (assumptions, solver_assumptions);
163167
168+ using Minisat::lbool;
169+
170+ #ifndef _WIN32
171+
164172 void (*old_handler)(int )=SIG_ERR;
165173
166174 if (time_limit_seconds!=0 )
@@ -173,7 +181,6 @@ propt::resultt satcheck_minisat2_baset<T>::prop_solve()
173181 alarm (time_limit_seconds);
174182 }
175183
176- using Minisat::lbool;
177184 lbool solver_result=solver->solveLimited (solver_assumptions);
178185
179186 if (old_handler!=SIG_ERR)
@@ -183,6 +190,19 @@ propt::resultt satcheck_minisat2_baset<T>::prop_solve()
183190 solver_to_interrupt=solver;
184191 }
185192
193+ #else // _WIN32
194+
195+ if (time_limit_seconds!=0 )
196+ {
197+ messaget::warning () <<
198+ " Time limit ignored (not supported on Win32 yet)" << messaget::eom;
199+ }
200+
201+ lbool solver_result=
202+ solver->solve (solver_assumptions) ? l_True : l_False;
203+
204+ #endif
205+
186206 if (solver_result==l_True)
187207 {
188208 messaget::status () <<
You can’t perform that action at this time.
0 commit comments