Skip to content
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

Refactor type inference in functions #523

Merged

Conversation

mristin
Copy link
Contributor

@mristin mristin commented Aug 31, 2024

So far, we were unsure what the best abstraction for type inference would be. After a couple of code generators, the structure for the type inference crystalized out: we refactor it into two functions, one for the class invariants and one for the transpilable verification functions.

The type inference for pattern verification functions is explicitly left out as we can not infer the type of the matching result in any meaningful way with the simple types we have so far, and we also do not need to. Namely, we ensure that pattern verification functions follow a very strict structure where each variable can only be a string in the parsing stage.

So far, we were unsure what the best abstraction for type inference
would be. After a couple of code generators, the structure for the type
inference crystalized out: we refactor it into two functions, one for
the class invariants and one for the transpilable verification
functions.

The type inference for pattern verification functions is explicitly left
out as we can not infer the type of the matching result in any
meaningful way with the simple types we have so far, and we also do not
need to. Namely, we ensure that pattern verification functions follow a
very strict structure where each variable can only be a string in the
parsing stage.
@mristin mristin merged commit 6df5c9e into main Aug 31, 2024
5 checks passed
@mristin mristin deleted the mristin/Refactor-type-inference-in-functions-of-intermediate branch August 31, 2024 07:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant