-
Notifications
You must be signed in to change notification settings - Fork 44
SMT.Translate.translatePattern: add fallback for translateApplication #2261
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
SMT.Translate.translatePattern: add fallback for translateApplication #2261
Conversation
kore/src/Kore/Step/SMT/Translate.hs
Outdated
ApplySymbolF app | ||
| isFunctionalPattern pat -> | ||
translateApplication app | ||
<|> translateUninterpreted' |
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.
Why can't we add this to translateApplication
itself?
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.
Thanks for suggesting this, I made the change and added some comments on the PR about the additional things I had to modify resulting from this.
sexpr <- maybe empty return translated | ||
when (isNothing translated) |
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.
From my understanding, if translated
is Nothing
this gets discarded before logging the warning. My changes should fix this.
| isFunctionalPattern original = | ||
translateInterpretedApplication | ||
<|> translateUninterpreted' | ||
| otherwise = | ||
translateInterpretedApplication |
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.
Before, we would fall back to translateUninterpreted
for translateInt
and translateBool
without first checking if the pattern is functional. I assumed this wasn't correct, and fixed it here. This is reflected in the tests by the need to add some test data with the functional
attribute.
Reviewer checklist
stack test --coverage
stack haddock