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_add #1

Closed
rajathkotyal opened this issue Sep 4, 2024 · 4 comments
Closed

[P1-Unsafe Int] unchecked_add #1

rajathkotyal opened this issue Sep 4, 2024 · 4 comments
Assignees
Labels
enhancement New feature or request

Comments

@rajathkotyal
Copy link
Owner

rajathkotyal commented Sep 4, 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, u8, u16, u32, u64, u128.
  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

@rajathkotyal rajathkotyal added the enhancement New feature or request label Sep 4, 2024
@Yenyun035
Copy link
Collaborator

Yenyun035 commented Sep 11, 2024

Working branch: c-0011-core-nums-yenyunw-unsafe-ints

Verification code location: module verify in library/core/src/num/mod.rs

@Yenyun035
Copy link
Collaborator

Yenyun035 commented Sep 13, 2024

TODO:

  • Relocate the proof module to library/core/src/num/mod.rs (or int_macros.rs?)
  • Rewrite unchecked_add proofs
    • i8
    • i16
    • i32
    • i64
    • i128
    • u8
    • u16
    • u32
    • u64
    • u128
  • Run proofs and get results

@rajathkotyal
Copy link
Owner Author

rajathkotyal commented Sep 21, 2024

Nicely done! Tag me in the issues as well if you have any doubts / important information, its easier to keep track.

@Yenyun035
Copy link
Collaborator

PR#91 merged

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants