Skip to content
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

Merged
merged 5 commits into from
Oct 29, 2024
Merged

Conversation

dwightguth
Copy link
Collaborator

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.

@rv-jenkins rv-jenkins changed the base branch from master to develop October 23, 2024 20:26
@dwightguth dwightguth marked this pull request as ready for review October 28, 2024 16:55
Copy link
Collaborator

@theo25 theo25 left a 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);
Copy link
Collaborator

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?

Copy link
Collaborator Author

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.

Copy link
Collaborator

@Robertorosmaninho Robertorosmaninho left a 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!

@dwightguth dwightguth enabled auto-merge (squash) October 29, 2024 18:46
@dwightguth dwightguth merged commit c655b8b into develop Oct 29, 2024
10 checks passed
@dwightguth dwightguth deleted the ordinal branch October 29, 2024 19:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants