Skip to content

NonZero (max & min) Proof - #199

Closed
lang280 wants to merge 5 commits into
model-checking:mainfrom
lang280:Nonezero_max_min
Closed

NonZero (max & min) Proof#199
lang280 wants to merge 5 commits into
model-checking:mainfrom
lang280:Nonezero_max_min

Conversation

@lang280

@lang280 lang280 commented Dec 1, 2024

Copy link
Copy Markdown

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.

@lang280
lang280 requested a review from a team as a code owner December 1, 2024 21:42
Comment thread library/core/src/num/nonzero.rs Outdated
@lang280 lang280 changed the title NonZero (max & min) Proof (Init) NonZero (max & min) Proof Dec 4, 2024
carolynzech
carolynzech previously approved these changes Dec 5, 2024
@carolynzech
carolynzech enabled auto-merge (squash) December 5, 2024 20:04

@carolynzech carolynzech left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

trigger merge workflow

@carolynzech
carolynzech dismissed their stale review December 5, 2024 20:09

Requesting another change before merge.

@carolynzech
carolynzech disabled auto-merge December 5, 2024 20:09
}

#[cfg(kani)]
mod macro_nonzero_check_max {

Copy link
Copy Markdown

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.

Copy link
Copy Markdown
Author

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

Copy link
Copy Markdown
Member

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?

@carolynzech

Copy link
Copy Markdown

Closing because this work got incorporated into #202

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants