-
Notifications
You must be signed in to change notification settings - Fork 151
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
Clean up {...}<:S
strict cast syntax
#3853
Conversation
I'm in favour of the syntactic change; it's been a while since I looked at this and I'd totally forgotten we even had this inconsistency. The surface area seems small enough that we're unlikely to break anything by making the change. |
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.
Looks weird to me.
I would hardcode the type inferencer to go over braces when you have a strict cast.
If you have a strict cast on top of a parametric production, it should go as deep as possible as long as it is parametric.
That way the curly braces would simply disappear.
Seems like we opted not to do that "push inwards through braces" solution previously. |
The tutorial didn't have a lesson about this one because I was kinda of the opinion that it should be completely deleted. Where are we actually using this in practice and can we replace those usages? |
In
In C (seems like that could trivially be a strict cast, no braces):
|
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.
Agreed in the K meeting that this is the right thing to do here; we want to keep this syntax for generality even if it's not actively being used other than that one case in domains.md
.
This PR cleans up a few issues related to the
{...}<:S
syntax for strict casts. Specifically,#InnerCast
to#SyntacticCastBraced
#InnerCast
was a holdover from prior to make the "inner cast" be a synonym for a strict cast #2352{...}<:S
to{...}::S
::S
<:S
is misleading in that it reads as "subsort ofS
", but the actual meaning is "exactly the sortS
and not a proper subsort".rv-match
and two tests inpyk
where this needs to be changed (https://github.com/search?q=org%3Aruntimeverification+%7D%3C%3A&type=code)The commit history is clean and I can just drop the last commit if we don't want to change the syntax.