-
Notifications
You must be signed in to change notification settings - Fork 44
Fix uninterpreted functions in keys of Maps and Sets #2323
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
Conversation
I still need to fix up the unit tests, but I was able to test this against the C semantics. I can execute beyond the error about uninterpreted functions (which can't be thrown anymore, anyway). However, I discovered that the C semantics also requires using Set in the keys of Map, so I will have to add support for that. |
cfea534
to
9add9cd
Compare
1b0552a
to
deb23a6
Compare
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 left a few minor suggestions, and I have some questions about the integration tests.
@@ -7535,9 +7523,9 @@ | |||
/* Inj: */ inj{SortPair{}, SortData{}}( | |||
/* Fl Fn D Sfc */ | |||
LblPair'UndsUndsUnds'MICHELSON-COMMON-SYNTAX'Unds'Pair'Unds'Data'Unds'Data{}( | |||
/* Fl Fn D Sfc */ | |||
/* Fl Fn D Sfa Cli */ |
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.
Why did the simplified attribute change here? (Here and in other places in the output.)
Edit: I think the reason is that now these patterns are considered constructor-like, but I'll leave this comment here in case I'm wrong.
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.
Yes, it's because built-in lists are now considered constructor-like.
/* Inj: */ inj{SortId{}, SortKItem{}}( | ||
/* Fl Fn D Sfa Cl */ | ||
\dv{SortId{}}(/* Fl Fn D Sfa Cl */ "n") | ||
\dv{SortId{}}("n") |
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.
Why are the attribute comments missing? (Here and in other places in the expected output.)
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.
This is a Key
, so the Unparse
instance isn't going through TermLike
(which is what creates the comments). The comments aren't necessary because all Key
are functional constructor-like patterns.
Co-authored-by: ana-pantilie <[email protected]>
Co-authored-by: ana-pantilie <[email protected]>
@@ -437,10 +439,9 @@ internal representations themselves; this "flattening" step also recurses to | |||
|
|||
-} | |||
renormalize | |||
:: HasCallStack |
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.
why did we get rid of HasCallStack
?
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.
This function doesn't throw errors anymore.
Fixes #2012.
Kore.Internal.Key.Key
, which represents concrete patterns used as keys in maps and sets.Key
to be constructed fromTermLike
which are constructor-like.Key
type makes that branch of code dead.Review checklist
The author performs the actions on the checklist. The reviewer evaluates the work and checks the boxes as they are completed.