-
Notifications
You must be signed in to change notification settings - Fork 39
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
sem: remove float analysis from sem/guards
#1240
Conversation
sem/guards
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.
One minor typo.
So now we're using very simple symbol equality during tree equivalence checks in guards. Are we relying on guards outside of things like checked arithmetic which might be impacted?
sem/guards
sem/guards
For the summary, the impact here would be not removing floating point operation checks in certain cases? |
Co-authored-by: Saem Ghani <[email protected]>
|
I moved the extra info into details, guards stuff seems so broken. |
/merge |
Merge requested by: @saem Contents after the first section break of the PR description has been removed and preserved below:
|
/merge |
Summary
Remove float analysis from
sem/guards
since it's currently unsound.Details
sem/guards
is only used for static bounds checking (--staticBoundChecks
),not nil
checking, warning for checked fieldaccesses (
--warning:ProveField
) and field accesses of fieldsannotated with
{.guard: ...}
.Since object variants with a
float
discriminator are invalid andbound checks only concern integers, only conversions to float range
types would be affected under
--staticBoundChecks
.It's not clear whether the analysis method here can work with floats
without special treatment in a lot of cases, due to float equality
lacking the subsitution and reflexivity property or the comparison
relations not being total.