-
Notifications
You must be signed in to change notification settings - Fork 41
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
NonZero (max & min) Proof #199
Conversation
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.
trigger merge workflow
Requesting another change before merge.
@@ -2265,3 +2265,69 @@ mod verify { | |||
nonzero_check!(u128, core::num::NonZeroU128, nonzero_check_new_unchecked_for_u128); | |||
nonzero_check!(usize, core::num::NonZeroUsize, nonzero_check_new_unchecked_for_usize); | |||
} | |||
|
|||
#[cfg(kani)] | |||
mod macro_nonzero_check_max { |
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.
Nice! Last thing -- instead of having a module for each function, can you move all of these harnesses inside of mod verify
? We're trying to keep a consistent format for these proofs across challenges, and that's how we've been doing it so far.
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 have done this in NonZero (rotate_left & rotate_right) Proof #202
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.
Sure, but could you please also do it here?
Closing because this work got incorporated into #202 |
Working on #71 (Safety of NonZero)
We are looking for feedback on our proof for max and min.
This is the initial logic; we will add a macro to extrapolate for data types.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 and MIT licenses.