Skip to content
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

[P1-Unsafe Int] unchecked_neg #5

Closed
parkerqi opened this issue Sep 9, 2024 · 3 comments
Closed

[P1-Unsafe Int] unchecked_neg #5

parkerqi opened this issue Sep 9, 2024 · 3 comments
Assignees

Comments

@parkerqi
Copy link
Collaborator

parkerqi commented Sep 9, 2024

Official Repo Tracking Issue

Tasks :

  1. Set up the necessary environment.
  2. Write individual proofs for verifying the absence of arithmetic overflow/underflow and undefined behavior for all integer types: i8, i16, i32, i64, i128.
  3. Add proofs into a dedicated file.
    a. For example, library/core/src/num/mod.rs --> This will contain all proofs for unchecked_add/del/sub, etc.
  4. Please make sure not to modify other people's code, since we will be co-working on the same files. Avoid code conflicts as much as possible. Pull code every time a merge is made.

IMP: comment with the branch name you will be working on, with its link.

Ref: https://github.com/rajathkotyal/verify-rust-std/blob/main/doc/src/challenges/0011-floats-ints.md

@Yenyun035
Copy link
Collaborator

Yenyun035 commented Sep 26, 2024

@parkerqi Could you take a look at the proofs written by the others? Mainly two points:

  1. Add a function contract (requires) to unchecked_neg method.
  2. Write harnesses with proof_for_contract(<type>::unchecked_neg) attribute. You don't need kani::assume and assert if using this one.

@Yenyun035 Yenyun035 self-assigned this Oct 4, 2024
@Yenyun035
Copy link
Collaborator

PR#102

@Yenyun035
Copy link
Collaborator

Merged in PR#102

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

When branches are created from issues, their pull requests are automatically linked.

2 participants