forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 49
NonZero (unchecked_mul & unchecked_add) Proof for Contracts #338
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
Open
tautschnig
wants to merge
45
commits into
model-checking:main
Choose a base branch
from
tautschnig:unchecked_mull_add
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
45 commits
Select commit
Hold shift + click to select a range
dffe30b
Initial proof/contract/harness for nonzero:
aa-luna daf1576
Bytewise comparision (new_unchecked contract)
SahithiMV 21ae29e
Removed kani assumes removed from proof_for_contract
aa-luna 4241687
Macros for data types
SahithiMV 801f9a4
Adding i32 and isize
SahithiMV eafef0b
Pull Request fixes
aa-luna 3015feb
Pull Request fixes
aa-luna ce918f8
Update library/core/src/num/nonzero.rs
MooniniteErr 2304fad
Update library/core/src/num/nonzero.rs
MooniniteErr 14a50e2
Update library/core/src/num/nonzero.rs
aa-luna acef65a
Update library/core/src/num/nonzero.rs
aa-luna 4d3efd1
Update library/core/src/num/nonzero.rs
aa-luna 7bc64eb
doc: add explanations for const function attribute
aa-luna 82ff59c
Merge branch 'main' into main
aa-luna 4ce34b5
Merge branch 'main' into main
aa-luna f81aa80
Merge branch 'model-checking:main' into main
aa-luna b2b534b
Merge branch 'model-checking:main' into main
aa-luna dcbf4f5
Merge branch 'model-checking:main' into unchecked_mull_add
aa-luna d67be7e
Unchecked Add and Mul: Init
SahithiMV 36e75be
Unchecked Mul and Add: Adding Macros & cleanup
SahithiMV 4f945c8
Fixes
SahithiMV fb30e98
Merge remote-tracking branch 'origin/main' into unchecked_mull_add
tautschnig 71e57fa
Apply suggestions
tautschnig fcfd000
Arrange lines
tautschnig 7603984
Add contract to from_mut_unchecked
tautschnig 6dab042
Fix syntax error, naming
tautschnig 06fad10
Disable what does not currently compile
tautschnig d8e3977
Proof target names
tautschnig 014a44e
Contracts lookup, again
tautschnig 0a7a3c6
Lookup, once more
tautschnig fb8ad3e
rustfmt
tautschnig 0c0318f
Merge remote-tracking branch 'origin/main' into unchecked_mull_add
tautschnig 3b69e21
rustfmt 2
tautschnig 8bd1151
Remove stray space
tautschnig 233c41c
Update library/core/src/num/nonzero.rs
tautschnig d21fdf2
Update library/core/src/num/nonzero.rs
tautschnig 5f13ef4
Update library/core/src/num/nonzero.rs
tautschnig 36030a8
Update library/core/src/num/nonzero.rs
tautschnig 1c5b394
Update library/core/src/num/nonzero.rs
tautschnig f2667db
Merge remote-tracking branch 'origin/main' into unchecked_mull_add
tautschnig ebfd876
Remove from_mut_unchecked contract/harnesses (commented out)
tautschnig cc23429
Merge remote-tracking branch 'tautschnig/unchecked_mull_add' into unc…
tautschnig 2e6ccae
Adjust target lookup
tautschnig cd7db54
Merge branch 'main' into unchecked_mull_add
tautschnig f67539e
Add comment
tautschnig File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 am curious how this interval trick works for 16 and 32-bit int types (without smt backend?), and how did you pick those interval? Could you please add some comments here?
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.
This is effectively a copy of what was previously introduced in #96 for the types without non-zero restriction by @rajath-mk. Comment added. I believe this trick works for it triggers Boolean constraint propagation (of leading zeros), thereby reducing the size of multiplier circuits.