-
Notifications
You must be signed in to change notification settings - Fork 24
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
fix ordinals not being applied to return types of symbols #1162
Conversation
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 approved, but left one question for my better understanding.
} | ||
if (symbol->get_sort()->is_concrete()) { | ||
process_sort_ordinal( | ||
symbol->get_sort().get(), sorts, all_sorts_, next_sort); |
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 that I missed processing the return sort in my implementation of the work list. However checking back at the original code, I don't think this was there either. So could you explain why this is needed? Is it the case that it missing was a bug even before we added the work list implementation?
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.
It was a bug that was there before your changes were made, yes. The issue is that formal parameters that appear only in the return sort of the symbol (e.g. the second parameter of inj
) were not getting their ordinal set and thus were getting serialized incorrectly.
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.
LGTM. I've tested and it passes the corner cases it was failing before!
This fixes a bug where the sort ordinals for formal parameters mentioned only in the return type of the symbol were not correct, leading to incorrect serialization of terms containing injections.