@@ -15,56 +15,7 @@ import org.utbot.common.workaround
15
15
import org.utbot.engine.overrides.UtArrayMock
16
16
import org.utbot.engine.overrides.UtLogicMock
17
17
import org.utbot.engine.overrides.UtOverrideMock
18
- import org.utbot.engine.pc.NotBoolExpression
19
- import org.utbot.engine.pc.UtAddNoOverflowExpression
20
- import org.utbot.engine.pc.UtAddrExpression
21
- import org.utbot.engine.pc.UtAndBoolExpression
22
- import org.utbot.engine.pc.UtArrayApplyForAll
23
- import org.utbot.engine.pc.UtArrayExpressionBase
24
- import org.utbot.engine.pc.UtArraySelectExpression
25
- import org.utbot.engine.pc.UtArraySetRange
26
- import org.utbot.engine.pc.UtArraySort
27
- import org.utbot.engine.pc.UtBoolExpression
28
- import org.utbot.engine.pc.UtBoolOpExpression
29
- import org.utbot.engine.pc.UtBvConst
30
- import org.utbot.engine.pc.UtBvLiteral
31
- import org.utbot.engine.pc.UtByteSort
32
- import org.utbot.engine.pc.UtCastExpression
33
- import org.utbot.engine.pc.UtCharSort
34
- import org.utbot.engine.pc.UtContextInitializer
35
- import org.utbot.engine.pc.UtExpression
36
- import org.utbot.engine.pc.UtFalse
37
- import org.utbot.engine.pc.UtInstanceOfExpression
38
- import org.utbot.engine.pc.UtIntSort
39
- import org.utbot.engine.pc.UtIsExpression
40
- import org.utbot.engine.pc.UtIteExpression
41
- import org.utbot.engine.pc.UtLongSort
42
- import org.utbot.engine.pc.UtMkTermArrayExpression
43
- import org.utbot.engine.pc.UtNegExpression
44
- import org.utbot.engine.pc.UtOrBoolExpression
45
- import org.utbot.engine.pc.UtPrimitiveSort
46
- import org.utbot.engine.pc.UtShortSort
47
- import org.utbot.engine.pc.UtSolver
48
- import org.utbot.engine.pc.UtSolverStatusSAT
49
- import org.utbot.engine.pc.UtSubNoOverflowExpression
50
- import org.utbot.engine.pc.UtTrue
51
- import org.utbot.engine.pc.addrEq
52
- import org.utbot.engine.pc.align
53
- import org.utbot.engine.pc.cast
54
- import org.utbot.engine.pc.findTheMostNestedAddr
55
- import org.utbot.engine.pc.isInteger
56
- import org.utbot.engine.pc.mkAnd
57
- import org.utbot.engine.pc.mkBVConst
58
- import org.utbot.engine.pc.mkBoolConst
59
- import org.utbot.engine.pc.mkChar
60
- import org.utbot.engine.pc.mkEq
61
- import org.utbot.engine.pc.mkFalse
62
- import org.utbot.engine.pc.mkFpConst
63
- import org.utbot.engine.pc.mkInt
64
- import org.utbot.engine.pc.mkNot
65
- import org.utbot.engine.pc.mkOr
66
- import org.utbot.engine.pc.select
67
- import org.utbot.engine.pc.store
18
+ import org.utbot.engine.pc.*
68
19
import org.utbot.engine.symbolic.emptyAssumption
69
20
import org.utbot.engine.symbolic.emptyHardConstraint
70
21
import org.utbot.engine.symbolic.emptySoftConstraint
@@ -2535,6 +2486,15 @@ class Traverser(
2535
2486
*/
2536
2487
val artificialMethodOverride = overrideInvocation(invocation, target = null )
2537
2488
2489
+ // The problem here is that we might have an unsat current state.
2490
+ // We get states with `SAT` last status only for traversing,
2491
+ // but during the parameters resolving this status might be changed.
2492
+ // It happens inside the `org.utbot.engine.Traverser.initStringLiteral` function.
2493
+ // So, if it happens, we should just drop the state we processing now.
2494
+ if (environment.state.solver.lastStatus is UtSolverStatusUNSAT ) {
2495
+ return mutableListOf ()
2496
+ }
2497
+
2538
2498
// If so, return the result of the override
2539
2499
if (artificialMethodOverride.success) {
2540
2500
if (artificialMethodOverride.results.size > 1 ) {
0 commit comments