@@ -3277,12 +3277,12 @@ class Traverser(
3277
3277
queuedSymbolicStateUpdates + = mkNot(mkEq(symbolicResult.value.addr, nullObjectAddr)).asHardConstraint()
3278
3278
}
3279
3279
3280
- val state = environment.state.update( queuedSymbolicStateUpdates)
3281
- val memory = state .memory
3282
- val solver = state .solver
3280
+ val symbolicState = environment.state.symbolicState + queuedSymbolicStateUpdates
3281
+ val memory = symbolicState .memory
3282
+ val solver = symbolicState .solver
3283
3283
3284
3284
// no need to respect soft constraints in NestedMethod
3285
- val holder = solver.check(respectSoft = ! state.isInNestedMethod())
3285
+ val holder = solver.check(respectSoft = ! environment. state.isInNestedMethod())
3286
3286
3287
3287
if (holder !is UtSolverStatusSAT ) {
3288
3288
logger.trace { " processResult<${environment.method.signature} > UNSAT" }
@@ -3291,7 +3291,7 @@ class Traverser(
3291
3291
val methodResult = MethodResult (symbolicResult)
3292
3292
3293
3293
// execution frame from level 2 or above
3294
- if (state.isInNestedMethod()) {
3294
+ if (environment. state.isInNestedMethod()) {
3295
3295
// static fields substitution
3296
3296
// TODO: JIRA:1610 -- better way of working with statics
3297
3297
val updates = if (environment.method.name == STATIC_INITIALIZER && substituteStaticsWithSymbolicVariable) {
@@ -3302,15 +3302,17 @@ class Traverser(
3302
3302
} else {
3303
3303
MemoryUpdate () // all memory updates are already added in [environment.state]
3304
3304
}
3305
- val stateToOffer = state.pop(methodResult.copy(symbolicStateUpdate = updates.asUpdate()))
3305
+ val methodResultWithUpdates = methodResult.copy(symbolicStateUpdate = queuedSymbolicStateUpdates + updates)
3306
+ val stateToOffer = environment.state.pop(methodResultWithUpdates)
3306
3307
offerState(stateToOffer)
3307
3308
3308
3309
logger.trace { " processResult<${environment.method.signature} > return from nested method" }
3309
3310
return
3310
3311
}
3311
3312
3312
3313
// toplevel method
3313
- val terminalExecutionState = state.copy(
3314
+ val terminalExecutionState = environment.state.copy(
3315
+ symbolicState = symbolicState,
3314
3316
methodResult = methodResult, // the way to put SymbolicResult into terminal state
3315
3317
label = StateLabel .TERMINAL
3316
3318
)
0 commit comments