-
Notifications
You must be signed in to change notification settings - Fork 28
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
Support for Ghost Types #773
base: master
Are you sure you want to change the base?
Conversation
Oh, cool! Do I see it correctly that, for two instances |
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 only have one minor comment, the rest seems fine.
case _: PBoolType | _: PIntegerType | _: PFloatType | _: PStringType | _: PFunctionType | _: PInterfaceType => false | ||
case PArrayType(_, elem) => isTypeGhost(elem) | ||
case PSliceType(elem) => isTypeGhost(elem) | ||
case PMapType(key, elem) => isTypeGhost(key) && isTypeGhost(elem) |
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 think this should be a disjunction.
case PMapType(key, elem) => isTypeGhost(key) && isTypeGhost(elem) | |
case PMapType(key, elem) => isTypeGhost(key) || isTypeGhost(elem) |
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.
Also do the thing that Joao said
This PR adds support for Ghost Types, i.e., the ability to mark a named type or type alias as ghost such that this type is erased. This feature came up in the context of structs that are declared for verification-only purposes and, thus, contain only ghost fields.
In addition, this PR makes
PPermissionType
andPPredType
ghost types, which did not use to be the case.