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

Add 10 more challenges #260

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

thanhnguyen-aws
Copy link

In this PR, I add 10 new challenge:

  • 3 for integer and NonZero functions
  • 2 for slices
  • 5 for str

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 and MIT licenses.

@thanhnguyen-aws thanhnguyen-aws requested a review from a team as a code owner February 28, 2025 16:15
Copy link

@celinval celinval left a comment

Choose a reason for hiding this comment

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

I'm curious why some of these challenges are focused on correctness.

Copy link

@carolynzech carolynzech left a comment

Choose a reason for hiding this comment

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

  1. You'll need to add links to these challenge files in SUMMARY.md as well.
  2. I don't think we should merge any challenges about correctness--this effort is about safety, and we should stay focused on that goal.


The verification must be unbounded---it must hold for slices of arbitrary length.

It is OK to assume that the generic type `T` of the proofs is primitive types, e.g., `i32`, `u32`, `bool`, etc.

Choose a reason for hiding this comment

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

We should be explicit about which concrete types we want proofs for.

Copy link
Author

Choose a reason for hiding this comment

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

Thanks. I will edit.

@@ -0,0 +1,79 @@
# Challenge 20: Verify the memory safety of `slice` functions

Choose a reason for hiding this comment

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

This file name has a typo (silce instead of slice).

- **Tracking Issue:** [#29](https://github.com/model-checking/verify-rust-std/issues/29)
- **Start date:** *2025/03/07*
- **End date:** *2025/10/17*
- **Reward:** *?*

Choose a reason for hiding this comment

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

Note for the future: we'll need to ping @rahulku for reward numbers before merging this, but let's get the content reviews done before doing that.


| Function |
|---------|
|next_back_unchecked|
Copy link

@carolynzech carolynzech Mar 3, 2025

Choose a reason for hiding this comment

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

@celinval already started work on this in #148 . So we either need to update this challenge to acknowledge that fact and be explicit about what remains to be done, or, if we don't think enough remains to justify a challenge, remove it altogether. You should audit the work that Celina did and see what remains to be done, and we can make a decision from there.

Copy link
Author

Choose a reason for hiding this comment

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

Thanks. I have taken a look at it. The different is that this challenge requires unbounded proofs.


The verification must be unbounded---it must hold for slices of arbitrary length.

It is OK to assume that the generic type `T` of the proofs is primitive types, e.g., `i32`, `u32`, `bool`, etc.

Choose a reason for hiding this comment

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

Same comment about being explicit about which of these primitive types we care about.

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