Skip to content

Usage proofs - #26

Merged
szlee118 merged 64 commits into
mainfrom
usage_proofs
Dec 11, 2024
Merged

szlee118 merged 64 commits into
mainfrom
usage_proofs

Conversation

@szlee118

Copy link
Copy Markdown
Collaborator

Please add a description of your PR.
If this is a solution to an open challenge, please explain your solution.

Don't forget to check our book to ensure your solution satisfy the overall
requirements as well as the challenge success criteria.

Resolves #ISSUE-NUMBER

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
szlee118 and others added 29 commits December 2, 2024 20:11
Verify String::remove in alloc::string
Added updated proof for Vec::swap_remove
…nd `byte_offset` (model-checking#188)

Towards model-checking#76 

This pull request impelments proof for contracts for `byte_add`,
`byte_sub` and `byte_offset` for `<dyn Trait>`. Both `const` and `mut`
versions are included.

It serves as an addition to an existing
[PR](model-checking#169) but is
submitted separately to avoid disrupting the ongoing review process for
that PR.

---------

Co-authored-by: Surya Togaru <[email protected]>
Co-authored-by: stogaru <[email protected]>
Co-authored-by: Felipe R. Monteiro <[email protected]>
Add `merge_group` as a trigger for our workflows. For the review check
workflow, I also added a review dismissed option, and for the
`merge_group` case, the workflow does nothing.

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

---------

Co-authored-by: Carolyn Zech <[email protected]>
Co-authored-by: Michael Tautschnig <[email protected]>
Co-authored-by: Felipe R. Monteiro <[email protected]>
Update the `kani list` part of our workflow to:
- Be its own step of the workflow so it can run in parallel, which is
nice because it finishes much faster than the other jobs in the Kani
workflow
- Use the new markdown format. This makes the list much more readable
(compare [current
format](https://github.com/model-checking/verify-rust-std/actions/runs/12199714877/attempts/2#summary-34034201022)
to [markdown
format](https://github.com/carolynzech/verify-rust-std/actions/runs/12203155221/attempts/1#summary-34045490103)).

Also remove the Test Kani workflow step, because it's expensive and
duplicates verification work.
Towards model-checking#76

This pull request implements proof for contracts for `byte_offset_from`
verifying `dyn Trait` pointee types. Both const and mut versions are
included.
…ng#179)

Towards model-checking#76


## Changes
### Contracts Added:

- Added contracts for <*mut T>::add, <*mut T>::sub, and <*mut T>::offset
operations for raw pointers to slices.
### Proofs Implemented:

- Added proofs for the above contracts, verifying safety for the
following slice pointee types using arrays:
 - All integer types (i8, i16, i32, etc.).
 - Tuples (composite types) (e.g., (i8, i8), (i32, f64, bool)).
 - Unit type (()).
 
### Macro Definitions:
- Introduced macros to simplify and automate harness generation:
 - One macro for add and sub operations on slices.
 - Another macro for offset operations on slices.
 
### Array-Based Implementation for Slice Verification:
- Arrays are used as a proxy for slices (as slices do not have a known
length at compile time) to enable proper bounds checking and assumptions
during verification.
@szlee118
szlee118 merged commit 519cd5d into main Dec 11, 2024
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.

6 participants