Skip to content

Contract and Harnesses for byte_add, byte_sub and byte_offset - #169

Merged
carolynzech merged 27 commits into
model-checking:mainfrom
stogaru:verify/ptr_mut_byte
Dec 5, 2024
Merged

Contract and Harnesses for byte_add, byte_sub and byte_offset#169
carolynzech merged 27 commits into
model-checking:mainfrom
stogaru:verify/ptr_mut_byte

Conversation

@stogaru

@stogaru stogaru commented Nov 18, 2024

Copy link
Copy Markdown

Towards #76

Changes

  • Adds contracts for <*mut T>::byte_add, <*mut T>::byte_sub and <*mut T>::byte_offset.
  • Adds harnesses for the function verifying the following pointee types:
    • All integer types
    • Tuples (composite types)
    • Unit Type
    • Slices
  • Accomplishes this using a few macros.

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

@stogaru
stogaru requested a review from a team as a code owner November 18, 2024 21:46
@stogaru

stogaru commented Nov 19, 2024

Copy link
Copy Markdown
Author

@feliperodri FYI

Comment thread library/core/src/ptr/mut_ptr.rs Outdated
Comment thread library/core/src/ptr/const_ptr.rs
Comment thread library/core/src/ptr/const_ptr.rs Outdated
Comment thread library/core/src/ptr/const_ptr.rs Outdated
Comment thread library/core/src/ptr/const_ptr.rs Outdated
Comment thread library/core/src/ptr/const_ptr.rs
@stogaru stogaru changed the title Contract and Harnesses for <*mut T>::byte_add, byte_sub and byte_offset Contract and Harnesses for byte_add, byte_sub and byte_offset Nov 26, 2024
@feliperodri

Copy link
Copy Markdown
Member

@jswrenn could you give another round of review for this one? I believe they have addressed all your comments.

@jswrenn jswrenn left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Two final nits, which you're welcome to take or leave.

Thanks for the contribution!

Comment thread library/core/src/ptr/const_ptr.rs Outdated
Comment thread library/core/src/ptr/mut_ptr.rs Outdated
Comment thread library/core/src/ptr/const_ptr.rs Outdated
@stogaru
stogaru force-pushed the verify/ptr_mut_byte branch from eea35b0 to eab2c65 Compare December 5, 2024 07:19
@stogaru
stogaru requested a review from jswrenn December 5, 2024 07:27

@jswrenn jswrenn left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

LGTM! Thank you for all the hard work on this.

@carolynzech
carolynzech enabled auto-merge (squash) December 5, 2024 15:20
@carolynzech
carolynzech merged commit dd75225 into model-checking:main Dec 5, 2024
feliperodri added a commit that referenced this pull request Dec 9, 2024
…nd `byte_offset` (#188)

Towards #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](#169) but is
submitted separately to avoid disrupting the ongoing review process for
that PR.

---------

Co-authored-by: Surya Togaru <stogaru@andrew.cmu.edu>
Co-authored-by: stogaru <143449212+stogaru@users.noreply.github.com>
Co-authored-by: Felipe R. Monteiro <rms.felipe@gmail.com>
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.

5 participants