2020import java .util .Optional ;
2121import java .util .Set ;
2222import org .checkerframework .checker .nullness .qual .Nullable ;
23+ import org .sosy_lab .common .ShutdownManager ;
2324import org .sosy_lab .common .ShutdownNotifier ;
2425import org .sosy_lab .java_smt .api .BooleanFormula ;
2526import org .sosy_lab .java_smt .api .Evaluator ;
@@ -230,8 +231,9 @@ public boolean isUnsat() throws InterruptedException, SolverException {
230231 changedSinceLastSatQuery = false ;
231232
232233 sstat result ;
233- try (ShutdownHook listener = new ShutdownHook (shutdownNotifier , osmtSolver ::stop )) {
234- shutdownNotifier .shutdownIfNecessary ();
234+ try (ShutdownHook listener =
235+ new ShutdownHook (proverShutdownManager .getNotifier (), osmtSolver ::stop )) {
236+ proverShutdownManager .getNotifier ().shutdownIfNecessary ();
235237 try {
236238 result = osmtSolver .check ();
237239 } catch (Exception e ) {
@@ -250,7 +252,7 @@ public boolean isUnsat() throws InterruptedException, SolverException {
250252 throw new SolverException ("OpenSMT crashed while checking satisfiability." , e );
251253 }
252254 }
253- shutdownNotifier .shutdownIfNecessary ();
255+ proverShutdownManager . getNotifier () .shutdownIfNecessary ();
254256 }
255257
256258 if (result .equals (sstat .Error ())) {
@@ -289,4 +291,9 @@ public void close() {
289291 }
290292 super .close ();
291293 }
294+
295+ @ Override
296+ protected ShutdownManager getShutdownManagerForProverImpl () throws UnsupportedOperationException {
297+ return proverShutdownManager ;
298+ }
292299}
0 commit comments