@@ -46,6 +46,7 @@ OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWA
4646
4747#include " CoreSMTSolver.h"
4848
49+ #include < api/GlobalStop.h>
4950#include < common/InternalException.h>
5051#include < common/Random.h>
5152#include < common/ReportUtils.h>
@@ -60,16 +61,13 @@ OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWA
6061
6162namespace opensmt {
6263
63- extern bool stop;
64-
6564// =================================================================================================
6665// Constructor/Destructor:
6766
6867CoreSMTSolver::CoreSMTSolver (SMTConfig & c, THandler& t )
6968 : config (c)
7069 , theory_handler (t)
7170 , verbosity (c.verbosity())
72- , stop (false )
7371 // Parameters: (formerly in 'SearchParams')
7472 , var_decay (c.sat_var_decay())
7573 , clause_decay (c.sat_clause_decay())
@@ -115,7 +113,6 @@ CoreSMTSolver::CoreSMTSolver(SMTConfig & c, THandler& t )
115113#endif
116114 , conflict_budget (-1 )
117115 , propagation_budget (-1 )
118- , asynch_interrupt (false )
119116 , learnt_t_lemmata (0 )
120117 , perm_learnt_t_lemmata (0 )
121118 , luby_i (0 )
@@ -1346,7 +1343,7 @@ void CoreSMTSolver::popBacktrackPoint()
13461343
13471344bool CoreSMTSolver::okContinue () const
13481345{
1349- return not opensmt::stop ;
1346+ return not stopped () and not globallyStopped () ;
13501347}
13511348
13521349void CoreSMTSolver::learntSizeAdjust () {
@@ -1705,9 +1702,11 @@ lbool CoreSMTSolver::solve_()
17051702
17061703 // Search:
17071704
1708- if (config.dryrun ())
1709- stop = true ;
1710- while (status == l_Undef && okContinue () && !this ->stop ) {
1705+ if (config.dryrun ()) {
1706+ notifyStop ();
1707+ }
1708+
1709+ while (status == l_Undef && okContinue ()) {
17111710 // Print some information. At every restart for
17121711 // standard mode or any 2^n intervarls for luby
17131712 // restarts
@@ -1737,7 +1736,7 @@ lbool CoreSMTSolver::solve_()
17371736 model[i] = value (i);
17381737 }
17391738 } else {
1740- assert (not okContinue () || status == l_False || this -> stop );
1739+ assert (not okContinue () || status == l_False);
17411740 }
17421741
17431742 // We terminate
0 commit comments