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. |
radumereuta
left a comment
There was a problem hiding this comment.
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): |
Baltoli
left a comment
There was a problem hiding this comment.
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
{...}<:Ssyntax for strict casts. Specifically,#InnerCastto#SyntacticCastBraced#InnerCastwas a holdover from prior to make the "inner cast" be a synonym for a strict cast #2352{...}<:Sto{...}::S::S<:Sis misleading in that it reads as "subsort ofS", but the actual meaning is "exactly the sortSand not a proper subsort".rv-matchand two tests inpykwhere 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.