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

Proofs for Vec::swap_remove, Option::as_slice, and VecDeque::swap #212

Merged
merged 64 commits into from
Dec 12, 2024

Conversation

stogaru
Copy link

@stogaru stogaru commented Dec 6, 2024

Resolves: #76

Changes

  • Adds proofs for the following functions using raw pointer operations:
    • Vec::swap_remove
    • Option::as_slice
    • VecDeque::swap
  • ideally the usages should have been verified by stubbing the contracts for reaw pointer operations like byte_add, add and offset, but stubbing cannot be done for these functions at this time due to Compilation Error When Stubbing Functions That Return Pointers Using Function Contracts kani#3732
  • Marks Challenge 3 as Resolved and changes its end date.
  • Adds contributors.

PoCs:

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

xsxszab and others added 30 commits October 7, 2024 12:44
implemented integer type proof for contract for fn add, sub and offset
Combines macros for different types.
…allocation api, modified their proof for harness accordingly
@feliperodri
Copy link

@stogaru Update the description of the PR to close the issue, update the goal's document stating the challenge is completed, and list the previous PRs that need to be merged before we can evaluate this PR and complete the goal.

@stogaru
Copy link
Author

stogaru commented Dec 8, 2024

@feliperodri, I made the required changes.

library/core/src/option.rs Outdated Show resolved Hide resolved
library/core/src/option.rs Outdated Show resolved Hide resolved
library/alloc/src/collections/vec_deque/mod.rs Outdated Show resolved Hide resolved
library/alloc/src/collections/vec_deque/mod.rs Outdated Show resolved Hide resolved
library/alloc/src/string.rs Outdated Show resolved Hide resolved
library/alloc/src/string.rs Outdated Show resolved Hide resolved
library/alloc/src/string.rs Outdated Show resolved Hide resolved
library/alloc/src/string.rs Outdated Show resolved Hide resolved
library/alloc/src/vec/mod.rs Outdated Show resolved Hide resolved
@feliperodri feliperodri changed the title Proofs for String::remove, Vec::swap_remove, Option::as_slice, and VecDeque::swap Proofs for Vec::swap_remove, Option::as_slice, and VecDeque::swap Dec 12, 2024
@tautschnig tautschnig enabled auto-merge December 12, 2024 18:32
@tautschnig tautschnig added this pull request to the merge queue Dec 12, 2024
Merged via the queue into model-checking:main with commit 955577c Dec 12, 2024
8 of 9 checks passed
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.

Challenge 3: Verifying Raw Pointer Arithmetic Operations
7 participants