Skip to content
This repository was archived by the owner on Oct 9, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion dev-tools/kore-rpc-dev/Server.hs
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ main = do
jsonRpcServer
srvSettings
(const $ respond koreRespond)
[handleErrorCall, handleSomeException]
[Kore.handleDecidePredicateUnknown, handleErrorCall, handleSomeException]
interruptHandler _ = do
when (logLevel >= LevelInfo) $
hPutStrLn stderr "[Info#proxy] Server shutting down"
Expand Down
12 changes: 10 additions & 2 deletions tools/booster/Proxy.hs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ module Proxy (

import Control.Concurrent.MVar qualified as MVar
import Control.Monad (when)
import Control.Monad.Catch (MonadCatch (..), catch)
import Control.Monad.IO.Class (MonadIO, liftIO)
import Control.Monad.Logger qualified as Log
import Control.Monad.Trans.Except (runExcept)
Expand Down Expand Up @@ -43,6 +44,7 @@ import Kore.JsonRpc.Types qualified as ExecuteRequest (ExecuteRequest (..))
import Kore.JsonRpc.Types qualified as SimplifyRequest (SimplifyRequest (..))
import Kore.JsonRpc.Types.Log qualified as RPCLog
import Kore.Log qualified
import Kore.Log.DecidePredicateUnknown (DecidePredicateUnknown, externaliseDecidePredicateUnknown)
import Kore.Syntax.Definition (SentenceAxiom)
import Kore.Syntax.Json.Types qualified as KoreJson
import SMT qualified
Expand Down Expand Up @@ -72,7 +74,7 @@ serverError detail = ErrorObj ("Server error: " <> detail) (-32032)
respondEither ::
forall m.
Log.MonadLogger m =>
MonadIO m =>
(MonadIO m, MonadCatch m) =>
ProxyConfig ->
Respond (API 'Req) m (API 'Res) ->
Respond (API 'Req) m (API 'Res) ->
Expand Down Expand Up @@ -418,7 +420,13 @@ respondEither ProxyConfig{statsVar, forceFallback, boosterState} booster kore re
postExecSimplify ::
LogSettings -> TimeSpec -> Maybe Text -> KoreDefinition -> API 'Res -> m (API 'Res)
postExecSimplify logSettings start mbModule def = \case
Execute res -> Execute <$> simplifyResult res
Execute res ->
Execute
<$> ( simplifyResult res
`catch` ( \(err :: DecidePredicateUnknown) ->
pure res{reason = Aborted, unknownPredicate = Just . externaliseDecidePredicateUnknown $ err}
)
)
other -> pure other
where
-- timeLog :: TimeDiff -> Maybe [LogEntry]
Expand Down
2 changes: 1 addition & 1 deletion tools/booster/Server.hs
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ main = do
jsonRpcServer
srvSettings
(const $ Proxy.respondEither proxyConfig boosterRespond koreRespond)
[handleErrorCall, handleSomeException]
[Kore.handleDecidePredicateUnknown, handleErrorCall, handleSomeException]
interruptHandler _ = do
when (logLevel >= LevelInfo) $
hPutStrLn stderr "[Info#proxy] Server shutting down"
Expand Down