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

Move type checking to compile #111

Closed
wants to merge 1 commit into from
Closed

Conversation

lukem12345
Copy link
Member

Close #109

@lukem12345 lukem12345 requested a review from GeorgeR227 March 24, 2023 19:17
@lukem12345 lukem12345 self-assigned this Mar 24, 2023
@@ -141,6 +141,7 @@ gensim(d::AbstractNamedDecapode) = gensim(d,
vcat(collect(infer_state_names(d)), d[incident(d, :Literal, :type), :name]))

function gensim(d::AbstractNamedDecapode, input_vars)
recognize_types(d)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks mutating, should have ! In the name

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This function checks that types are in the set {Form1, ..., Constant, Literal, etc.}.

There is a function called infer_types! which does indeed mutate the types of a Decapode. I'm not completely satisfied with this name recognize_types. Do you have a suggestion?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If a function calls a mutating function on its argument, then it is mutating too. What is recognize_types adding over infer_types!

@lukem12345 lukem12345 closed this Feb 23, 2024
@lukem12345 lukem12345 deleted the llm/types-at-compile branch February 23, 2024 22:23
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.

Check types at compile-time, not parse-time
2 participants