-
Notifications
You must be signed in to change notification settings - Fork 123
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
Type checker not following conditional control flow. #1341
Comments
This is something we've talked about quite a bit and would like to do, but requires some pretty complicated extensions to the typechecker to do correctly (our current thinking is that doing this properly requires implementing the Also, I think that even if you had The |
Here's a working solution for @ramsdell's problem. Both
|
And with that knowledge, here is an O(n log n) NTT that type checks! (I haven't tested it yet with data.)
|
That reminds me of Knuth
Some polish just for fun.
|
And here is a version of the NTT that both type checks and along with the inverse NTT, checks out that applying the inverse NTT to the NTT is the identity function. Notice the correction in the butterfly operation.
|
The type checker fails to accept the following program.
It appears that the problem is that the type checker doesn't infer
that n >= 1 in the else branch.
This kind of function is useful for implementing O(n log n) number
theoretic transforms such as is used in Dilithium. I using Cryptol
version 2.12.0.
The text was updated successfully, but these errors were encountered: