-
Notifications
You must be signed in to change notification settings - Fork 143
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
Removing #rangeBool
reasoning
#2616
Conversation
(Some of) the added lemmas are tested by some of the I am not sure what a reasonable test that is not direct would look like. |
// Relationship with `#rangeBool` | ||
rule [b2w-rangeBool-eq-not-zero-l]: bool2Word (notBool (X ==Int 0)) => X requires #rangeBool(X) [simplification, comm] | ||
rule [b2w-rangeBool-eq-not-zero-r]: bool2Word (notBool (0 ==Int X)) => X requires #rangeBool(X) [simplification, comm] | ||
|
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.
Do we also want the ones for X ==Int 1
and 1 ==Int X
?
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.
I don't think so, at least not for now, because these ones (the one with X ==Int 0
specifically, and then I added the commutative version) come from the compiler as a check that something is a bool.
The lemmas removed in this PR slow down execution of some real-world proofs considerably because the
rangeBool
constraints are SMT-checked for every expression of the formnotBool ( X ==Int 0 )
ornotBool ( X ==Int 1 )
.The lemmas brought in reflect the (so-far-observed) checks made by the compiler, and their LHS is complex enough so they it will not be matched against unnecessarily.