-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
inference: form conditional constraint from non-Conditional
object
#40832
Conversation
We can form a conditional constraint from a branch condition itself when its type isn't already `Conditional` but can be refined as `Conditional(condx, Const(true), Const(false))`.
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.
It is potentially even stronger than this, if we could do stupdate!
multiple times, but we'd need to keep a list of changes to be able to check if any of them made an update
condt = tmeet(condt, Bool)
newstate_else = stupdate!(states[l], StateUpdate(condx, VarState(Const(false), false), something(newstate_else, changes_else), false)
...
changes = stupdate!(states[pc´], StateUpdate(condx, VarState(Const(true), false), changes, false)
...
That's better, yet I'd like to postpone to #40880 the discussion on how to apply multiple state updates. |
This change addresses JuliaLang#40832 (review)
This change addresses <JuliaLang#40832 (review)>
This change addresses <JuliaLang#40832 (review)>
This change addresses <JuliaLang#40832 (review)>
This change addresses <#40832 (review)>
This change addresses <JuliaLang#40832 (review)>
This change addresses <JuliaLang#40832 (review)>
This change addresses <JuliaLang#40832 (review)>
This change addresses <JuliaLang#40832 (review)>
This change addresses <JuliaLang#40832 (review)>
This change addresses <JuliaLang#40832 (review)>
We can form a conditional constraint from a branch condition itself
when its type isn't already
Conditional
but can be refined asConditional(condx, Const(true), Const(false))
.