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 compliment op for function types more explicit #1221

Conversation

heshanpadmasiri
Copy link
Member

Purpose

$Subject
Resolves #1220

@heshanpadmasiri heshanpadmasiri requested a review from jclark as a code owner July 25, 2023 04:55
@@ -221,6 +221,10 @@ function bddFunctionAtomicType(Env env, Bdd bdd) returns FunctionAtomicType? {
return ();
}

function functionSubtypeComplement(ProperSubtypeData t) returns SubtypeData {
return bddSubtypeDiff(FUNCTION_TOP, t);
Copy link
Member Author

Choose a reason for hiding this comment

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

@jclark I don't think this actually makes a difference since I can replace the FUNCTION_TOP with any arbitrary BDD node (say LIST_SUBTYPE_MAPPING_RO -> readonly & (map<readonly>)[]) and everything works. This is true for table type as well. The only test that fails is this serialization test since they produce slightly different BDDs.

Represent the function top type (`function`) explicitly as an atomic
type and use that to calculate the function complement. Note that typing
was even without this fix.
@heshanpadmasiri heshanpadmasiri force-pushed the fix/function-complement branch 2 times, most recently from c32f1b8 to 37b9aa9 Compare July 27, 2023 06:15
We don't have a signature to represent the function top type. Which
means we have to special case serialization of function top type.
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make complement op for function type explicit
2 participants