forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Harnesses verifying slice types for add, sub and offset (#179)
Towards #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.
- Loading branch information
Showing
1 changed file
with
76 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters