Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Make complement op for function type explicit #1220

Open
heshanpadmasiri opened this issue Jul 24, 2023 · 0 comments
Open

Make complement op for function type explicit #1220

heshanpadmasiri opened this issue Jul 24, 2023 · 0 comments
Assignees
Labels
idea Important idea about implementation Type/Task

Comments

@heshanpadmasiri
Copy link
Member

heshanpadmasiri commented Jul 24, 2023

Currently, we are using bddSubtypeComplement (ref) as the complement operation for function types. Furthermore, the function type represents its parameters as a read-only tuple. Therefore when we take the complement for a function type we calculate the parameter type by removing the parameter type from all list types. This is wrong and we must instead use the set of all read-only tuples as the top type for parameters.

Edit: above statement is wrong since function parameters are contravariant. Therefore "top type" for parameters is NEVER. Therefore current implementation is technically correct. But it may still be worth it to make the function top type explicit.

@heshanpadmasiri heshanpadmasiri self-assigned this Jul 24, 2023
@heshanpadmasiri heshanpadmasiri changed the title Invalid complement op for function type Make complement op for function type explicit Jul 25, 2023
@heshanpadmasiri heshanpadmasiri added idea Important idea about implementation Type/Task labels May 17, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
idea Important idea about implementation Type/Task
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant