Skip to content

Commit 49ea9ec

Browse files
committed
Make sure currentSolver is empty when entering NonIncrementalSolver
1 parent 57942e7 commit 49ea9ec

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/main/scala/inox/solvers/combinators/NonIncrementalSolver.scala

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ trait NonIncrementalSolver extends AbstractSolver { self =>
2828
def interrupt(): Unit = for (solver <- currentSolver) solver.interrupt()
2929

3030
override def check(config: CheckConfiguration): config.Response[Model, Assumptions] = {
31+
assert(currentSolver.isEmpty,
32+
"`currentSolver` should be empty when invoking `check` in NonIncrementalSolver")
3133
val newSolver = underlying()
3234
try {
3335
currentSolver = Some(newSolver)
@@ -43,6 +45,8 @@ trait NonIncrementalSolver extends AbstractSolver { self =>
4345

4446
override def checkAssumptions(config: Configuration)
4547
(assumptions: Set[Trees]): config.Response[Model, Assumptions] = {
48+
assert(currentSolver.isEmpty,
49+
"`currentSolver` should be empty when invoking `checkAssumptions` in NonIncrementalSolver")
4650
val newSolver = underlying()
4751
try {
4852
currentSolver = Some(newSolver)

0 commit comments

Comments
 (0)