-
Notifications
You must be signed in to change notification settings - Fork 42
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
3888 typed context and parser #3950
Conversation
|
||
withPatternContext :: LoggerMIO m => Pattern -> m a -> m a | ||
withPatternContext Pattern{term, constraints} m = | ||
let t' = foldl' AndTerm term $ Set.toList $ Set.map coerce constraints | ||
let t' = foldl' AndTerm term $ Set.toList $ Set.map coerce constraints -- FIXME |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I noticed this earlier while trying to copy/paste a KoreJson
pattern from a log into a file for custom requests.
- The output does not have the correct sort (we would need to introduce
#Equals{SortBool, <sort-of-term>}(true, _)
around the predicates) - That would mean we cannot use
AndTerm
any more
We should probably go toKoreJson
first (externalise the pattern) for the output, but then we need to come up with a stable hash for logging purposes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does it cause issues when internalising? I.e. when you copy/pasted KoreJson
from a log line and tried to send that to the server it reported an error?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The server rejects the predicates having a wrong sort IIRC, but I would have to re-try this to be sure.
ec5ccf3
to
bcef5c3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Monumental work and a major improvement!
@@ -230,7 +230,7 @@ main = do | |||
kore@KoreServer{runSMT} <- | |||
mkKoreServer Log.LoggerEnv{logAction} clOPts koreSolverOptions | |||
runBoosterLogger $ | |||
Booster.Log.withContext "proxy" $ | |||
Booster.Log.withContext CtxKore $ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
count-aborts
to parse the json data using the new type. Performance is on par after switching to TH-derivedFromJSON
instances.Conversion of
kore-rpc
logging is left for future work.Part of #3888