@@ -21,6 +21,7 @@ import org.usvm.memory.UReadOnlyMemory
21
21
import org.usvm.model.ULazyModelDecoder
22
22
import org.usvm.sizeSort
23
23
import org.usvm.types.single.SingleTypeSystem
24
+ import org.usvm.utils.assertSat
24
25
import kotlin.test.assertSame
25
26
import kotlin.time.Duration.Companion.INFINITE
26
27
@@ -65,7 +66,7 @@ open class SoftConstraintsTest {
65
66
pc + = expr
66
67
67
68
val softConstraints = softConstraintsProvider.makeSoftConstraints(pc)
68
- val result = solver.checkWithSoftConstraints(pc, softConstraints) as USatResult
69
+ val result = solver.checkWithSoftConstraints(pc, softConstraints).assertSat()
69
70
val model = result.model
70
71
71
72
val fstRegisterValue = model.eval(fstRegister)
@@ -99,7 +100,7 @@ open class SoftConstraintsTest {
99
100
USolverBase (ctx, KZ3Solver (ctx), typeSolver, translator, decoder, timeout = INFINITE )
100
101
101
102
val softConstraints = softConstraintsProvider.makeSoftConstraints(pc)
102
- val result = solver.checkWithSoftConstraints(pc, softConstraints) as USatResult
103
+ val result = solver.checkWithSoftConstraints(pc, softConstraints).assertSat()
103
104
val model = result.model
104
105
105
106
verify(exactly = 1 ) {
@@ -144,7 +145,7 @@ open class SoftConstraintsTest {
144
145
pc + = (inputRef eq nullRef).not ()
145
146
146
147
val softConstraints = softConstraintsProvider.makeSoftConstraints(pc)
147
- val result = solver.checkWithSoftConstraints(pc, softConstraints) as USatResult
148
+ val result = solver.checkWithSoftConstraints(pc, softConstraints).assertSat()
148
149
149
150
val model = result.model
150
151
val value = model.eval(mkInputArrayLengthReading(region, inputRef))
@@ -164,7 +165,7 @@ open class SoftConstraintsTest {
164
165
pc + = (inputRef eq nullRef).not ()
165
166
166
167
val softConstraints = softConstraintsProvider.makeSoftConstraints(pc)
167
- val result = solver.checkWithSoftConstraints(pc, softConstraints) as USatResult
168
+ val result = solver.checkWithSoftConstraints(pc, softConstraints).assertSat()
168
169
169
170
val model = result.model
170
171
val value = model.eval(mkInputArrayLengthReading(region, inputRef))
@@ -182,7 +183,7 @@ open class SoftConstraintsTest {
182
183
pc + = expression
183
184
184
185
val softConstraints = softConstraintsProvider.makeSoftConstraints(pc)
185
- val result = solver.checkWithSoftConstraints(pc, softConstraints) as USatResult
186
+ val result = solver.checkWithSoftConstraints(pc, softConstraints).assertSat()
186
187
187
188
val model = result.model
188
189
model.eval(expression)
0 commit comments