Skip to content

Commit 34d6955

Browse files
committed
Increment depth when pruning a branch to a single next state
1 parent 0932411 commit 34d6955

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

booster/tools/booster/Proxy.hs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -412,18 +412,18 @@ respondEither cfg@ProxyConfig{boosterState} booster kore req = case req of
412412
, koreResult.logs
413413
, fallbackLog
414414
]
415-
loopState newLogs =
416-
( currentDepth + boosterResult.depth + koreResult.depth
415+
loopState incDepth newLogs =
416+
( currentDepth + boosterResult.depth + koreResult.depth + if incDepth then 1 else 0
417417
, time + bTime + kTime
418418
, koreTime + kTime
419419
, postProcessLogs
420420
<$> combineLogs (accumulatedLogs : newLogs)
421421
)
422-
continueWith newLogs nextState =
422+
continueWith incDepth newLogs nextState =
423423
executionLoop
424424
logSettings
425425
def
426-
(loopState newLogs)
426+
(loopState incDepth newLogs)
427427
r{ExecuteRequest.state = nextState}
428428
case (boosterResult.reason, koreResult.reason) of
429429
(Aborted, res) ->
@@ -455,7 +455,7 @@ respondEither cfg@ProxyConfig{boosterState} booster kore req = case req of
455455
"kore depth-bound, continuing... (currently at "
456456
<> show (currentDepth + boosterResult.depth + koreResult.depth)
457457
<> ")"
458-
continueWith [] (execStateToKoreJson koreResult.state)
458+
continueWith False [] (execStateToKoreJson koreResult.state)
459459
_ -> do
460460
-- otherwise we have hit a different
461461
-- HaltReason, at which point we should
@@ -471,7 +471,7 @@ respondEither cfg@ProxyConfig{boosterState} booster kore req = case req of
471471
case postExecResult of
472472
Left (nextState, newLogs) -> do
473473
-- simplification revealed that we should actually proceed
474-
continueWith newLogs nextState
474+
continueWith True newLogs nextState
475475
Right result -> do
476476
logStats ExecuteM (time + bTime + kTime, koreTime + kTime)
477477
pure $

0 commit comments

Comments
 (0)