Skip to content

Only emit proxy branch-eliminating rewrite trace when asked #3976

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 12, 2024
Merged
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
23 changes: 13 additions & 10 deletions booster/tools/booster/Proxy.hs
Original file line number Diff line number Diff line change
Expand Up @@ -642,22 +642,25 @@ respondEither cfg@ProxyConfig{boosterState} booster kore req = case req of
-- extract the rule-id information from the result we proceed with
let onlyNext = head filteredNexts
rewriteRuleId = fromMaybe "UNKNOWN" onlyNext.ruleId
proxyRewriteStepLog =
RPCLog.Rewrite
{ result =
RPCLog.Success
{ rewrittenTerm = Nothing
, substitution = Nothing
, ruleId = rewriteRuleId
proxyRewriteStepLogs
| Just True <- logSettings.logSuccessfulRewrites =
Just . (: []) $
RPCLog.Rewrite
{ result =
RPCLog.Success
{ rewrittenTerm = Nothing
, substitution = Nothing
, ruleId = rewriteRuleId
}
, origin = RPCLog.Proxy
}
, origin = RPCLog.Proxy
}
| otherwise = Nothing
Booster.Log.withContext CtxProxy $
Booster.Log.logMessage' ("Continuing after rewriting with rule " <> rewriteRuleId)
pure $
Left
( execStateToKoreJson onlyNext
, logsOnly <> filteredNextLogs <> [Just [proxyRewriteStepLog]]
, logsOnly <> filteredNextLogs <> [proxyRewriteStepLogs]
)
-- otherwise falling through to _otherReason
CutPointRule
Expand Down
Loading