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 operator declaraion lambda IDs #1280

Merged
merged 5 commits into from
Dec 1, 2023
Merged

Fix operator declaraion lambda IDs #1280

merged 5 commits into from
Dec 1, 2023

Conversation

shonfeder
Copy link
Contributor

@shonfeder shonfeder commented Dec 1, 2023

Thanks to discussion with @bugarela, following the review comment at
#1277 (comment) , we
realized that the lambdas constructed for the body of an operator def
declaration where using the wrong ID (they where reusing the IDs from the
declaration as a whole). But every IR component is meant to have its own ID, so
this is incorrect.

  • Tests added for any new code
  • Documentation added for any new functionality
  • Entries added to the respective CHANGELOG.md for any new functionality
  • Feature table on README.md updated for any listed functionality

@shonfeder shonfeder requested a review from bugarela December 1, 2023 02:01
@shonfeder shonfeder changed the title Fix opreator declaraion lambda IDs Fix operator declaraion lambda IDs Dec 1, 2023
Copy link
Collaborator

@bugarela bugarela left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for taking care of this!

Comment on lines +73 to +92
[7n, '(bool) => int'],
[8n, 'bool'],
[9n, 'bool'],
[10n, 'int'],
[11n, 'bool'],
[12n, 'bool'],
[13n, 'int'],
[14n, 'int'],
[15n, '((bool) => int, bool) => int'],
[16n, '((bool) => int, bool) => int'],
[1n, '∀ t0, t1 . (t0) => t1'],
[2n, '∀ t0 . t0'],
[3n, '∀ t0 . t0'],
[4n, '∀ t0 . t0'],
[5n, '∀ t0, t1 . ((t0) => t1, t0) => t1'],
[6n, '(bool) => int'],
[7n, 'bool'],
[8n, 'bool'],
[9n, 'int'],
[10n, 'bool'],
[11n, 'bool'],
[12n, 'int'],
[13n, 'int'],
[14n, '((bool) => int, bool) => int'],
[6n, '∀ t0, t1 . ((t0) => t1, t0) => t1'],
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These ids have a weird order (7-16, then 1-6). I guess if you feel like fixing, nice, otherwise its fine as well, this is not important.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will. Or mess with it so long as the tests are passing. I wonder why the order is that way!

@shonfeder shonfeder enabled auto-merge December 1, 2023 12:37
@shonfeder shonfeder disabled auto-merge December 1, 2023 12:37
Shon Feder added 5 commits December 1, 2023 07:47
The lambda's on the right side of operator definitions where getting
assigned the same IDs as operator declaration itself, violating our
expectation that every IR component will have a uniqe id.
@shonfeder shonfeder force-pushed the fix-oper-lambda-ids branch from 634c490 to d0bc358 Compare December 1, 2023 12:48
@shonfeder shonfeder enabled auto-merge December 1, 2023 12:49
@shonfeder shonfeder merged commit f0067e6 into main Dec 1, 2023
@shonfeder shonfeder deleted the fix-oper-lambda-ids branch December 1, 2023 12:55
@shonfeder shonfeder mentioned this pull request Dec 4, 2023
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.

2 participants