Skip to content

Log rewrite rule remainders #3944

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 6 commits into from
Jun 20, 2024
Merged

Conversation

geo2a
Copy link
Contributor

@geo2a geo2a commented Jun 17, 2024

This PR allows logging Kore's rewrite rule remainders in full.

Example log message with 'kore>remainder':

[kore][execute][remainder][detail] After applying  1  rewrite rules there is a satisfiable remainder condition:  \not{_}(\not{_}(\equals{SortInt{}, _}(ConfigVarCONTRACT'Unds'ID:SortInt{}, Lbl'UndsAnd-'Int'Unds'{}(\dv{SortInt{}}("1461501637330902918203684832716283019655932542975"), Lbllookup{}(ConfigVarCONTRACT'Unds'STORAGE:SortMap{}, \dv{SortInt{}}("1"))))))

and in json:

{"context":["kore","execute","remainder",{"term":"39a4b3d"},{"rules-count":"1"}],"message":{"format":"KORE","version":1,"term":{"tag":"Not","sort":{"tag":"SortApp","name":"SortBool","args":[]},"arg":{"tag":"Not","sort":{"tag":"SortApp","name":"SortBool","args":[]},"arg":{"tag":"Equals","argSort":{"tag":"SortApp","name":"SortInt","args":[]},"sort":{"tag":"SortApp","name":"SortBool","args":[]},"first":{"tag":"EVar","name":"VarCONTRACT'Unds'ID","sort":{"tag":"SortApp","name":"SortInt","args":[]}},"second":{"tag":"App","name":"Lbl'UndsAnd-'Int'Unds'","sorts":[],"args":[{"tag":"DV","sort":{"tag":"SortApp","name":"SortInt","args":[]},"value":"1461501637330902918203684832716283019655932542975"},{"tag":"App","name":"Lbllookup","sorts":[],"args":[{"tag":"EVar","name":"VarCONTRACT'Unds'STORAGE","sort":{"tag":"SortApp","name":"SortMap","args":[]}},{"tag":"DV","sort":{"tag":"SortApp","name":"SortInt","args":[]},"value":"1"}]}]}}}}}}

Add negative info to DebugAppliedRewriteRules log entry

Debug remainder

Debug remainders more

Make kore-rpc-booster aware of DebugRewriteRulesRemainder

Revert "Debug remainders more"

This reverts commit 0c56365.

Revert "Debug remainder"

This reverts commit cab0016.

Add json log for DebugRewriteRulesRemainder

Add default implementation of oneLineContextJson

Add entry type to json of DebugRewriteRulesRemainder

Ask forDebugEvaluateCondition

Fix typo

Accept rule count in DebugRewriteRulesRemainder
@geo2a geo2a force-pushed the georgy/add-remainders-debug-entry branch 2 times, most recently from 723019d to d04ebc0 Compare June 19, 2024 09:44
@geo2a geo2a force-pushed the georgy/add-remainders-debug-entry branch from fecafeb to 6211796 Compare June 19, 2024 09:54
@geo2a geo2a marked this pull request as ready for review June 19, 2024 13:51
@geo2a geo2a changed the title Log the combined rewrite rule remainder Log rewrite rule remainders Jun 19, 2024
@rv-jenkins rv-jenkins merged commit 5b32b7b into master Jun 20, 2024
6 checks passed
@rv-jenkins rv-jenkins deleted the georgy/add-remainders-debug-entry branch June 20, 2024 07:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants