-
Notifications
You must be signed in to change notification settings - Fork 0
squin Verification Analyses #179
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
Comments
@weinbe58 and I had the opportunity to talk over what this would look like in more detail as well as @Roger-luo 's recommendation of a custom Error type for error handling. Before going any further, @weinbe58 pointed out to me that it's useful to have two verification passes. One that just ensures the squin program is syntactically valid, with another one being able to build off that pass and ensure a narrower definition so Stim codegen can happen without a hitch. For the first "is valid squin program" analysis, the structure we agreed upon for implementation goes something like this:
The final analysis pass would have a type lattice like the following:
@weinbe58 has also pointed out that this idea of having a "broader" base verification pass that you can then build upon might also be worth making more generic and a feature of Kirin itself. |
Oh one thing to consider about the lattice: what if we can't infer there is an error? Do we need to have an |
do you have an example? |
I think if you cannot infer there is an error it should be |
E.g. I have an OperatorType with and site analysis value of |
I think it might make sense to have warnings here like we can enable/disable them as needed. |
@johnzl-777 maybe you can think about adding a |
Some additional discussion on subcomponents and infrastructure for the verification analyses with @weinbe58 . I'll spawn of some sub-issues to keep track of everything soon.
|
Are we implementing this somewhere? |
@Roger-luo the shared infrastructure and all these analyses? Yes, they'll get their own PRs quite soon. I think the second bullet point from @weinbe58 is just something that could be useful for Kirin (: |
The current rewrite approach to #19 attempted in #148 would be much better handled in terms of codegen. To that end, and to follow the proper usage pattern @Roger-luo has pointed out to me where rewrites/codegen are only attempted when equivalence is guaranteed, another analysis pass should exist to catch squin programs that are structured in a way that cannot be translated to stim.
The text was updated successfully, but these errors were encountered: