@@ -621,16 +621,22 @@ respondEither cfg@ProxyConfig{boosterState} booster kore req = case req of
621
621
second unzip $ partitionEithers simplifiedNexts
622
622
newLogs = simplifiedStateLogs : logsOnly <> filteredNextLogs
623
623
624
- pure $ case reason of
624
+ when (length filteredNexts < maybe 0 length nextStates) $
625
+ Booster.Log. withContext CtxProxy $
626
+ Booster.Log. logMessage'
627
+ (Text. pack (" Pruned #Bottom states: " <> show (length nextStates)))
628
+
629
+ case reason of
625
630
Branching
626
- | null filteredNexts ->
627
- Right
628
- res
629
- { reason = Stuck
630
- , nextStates = Nothing
631
- , logs = combineLogs $ res. logs : simplifiedStateLogs : logsOnly
632
- }
633
- | length filteredNexts == 1 ->
631
+ | null filteredNexts -> do
632
+ pure $
633
+ Right
634
+ res
635
+ { reason = Stuck
636
+ , nextStates = Nothing
637
+ , logs = combineLogs $ res. logs : simplifiedStateLogs : logsOnly
638
+ }
639
+ | length filteredNexts == 1 -> do
634
640
-- all but one next states are bottom, execution should proceed
635
641
-- Note that we've effectively made a rewrite step here, so we need to
636
642
-- extract the rule-id information from the result we proceed with
@@ -646,24 +652,28 @@ respondEither cfg@ProxyConfig{boosterState} booster kore req = case req of
646
652
}
647
653
, origin = RPCLog. Proxy
648
654
}
649
- in Left
655
+ Booster.Log. withContext CtxProxy $
656
+ Booster.Log. logMessage' (" Continuing after rewriting with rule " <> rewriteRuleId)
657
+ pure $
658
+ Left
650
659
( execStateToKoreJson onlyNext
651
660
, logsOnly <> filteredNextLogs <> [Just [proxyRewriteStepLog]]
652
661
)
653
662
-- otherwise falling through to _otherReason
654
663
CutPointRule
655
664
| null filteredNexts ->
656
- Right $ makeVacuous (combineLogs $ res. logs : newLogs) res
665
+ pure $ Right $ makeVacuous (combineLogs $ res. logs : newLogs) res
657
666
_otherReason ->
658
- Right $
659
- res
660
- { state = simplifiedState
661
- , nextStates =
662
- if null filteredNexts
663
- then Nothing
664
- else Just filteredNexts
665
- , logs = combineLogs $ res. logs : newLogs
666
- }
667
+ pure $
668
+ Right $
669
+ res
670
+ { state = simplifiedState
671
+ , nextStates =
672
+ if null filteredNexts
673
+ then Nothing
674
+ else Just filteredNexts
675
+ , logs = combineLogs $ res. logs : newLogs
676
+ }
667
677
668
678
data LogSettings = LogSettings
669
679
{ logSuccessfulRewrites :: Maybe Bool
0 commit comments