Skip to content

Contracts & Harnesses for NonNull::read, NonNull::read_volatile, NonNull::read_unaligned - #156

Merged
zhassan-aws merged 11 commits into
model-checking:mainfrom
danielhumanmod:olivia/memory_operations
Nov 15, 2024
Merged

zhassan-aws merged 11 commits into
model-checking:mainfrom
danielhumanmod:olivia/memory_operations

Conversation

@QinyuanWu

@QinyuanWu QinyuanWu commented Nov 8, 2024 •

Copy link
Copy Markdown

Towards #53

Contracts & Harnesses for NonNull::read, NonNull::read_volatile, NonNull::read_unaligned

Discussion

For the ensures clause in the contract for NonNull::read, I could not directly compare the value pointed by self and result due to unsized and lack of PartialEq implementation, and the comparison is currently moved to the harness.

Verification

Successful verification:

SUMMARY:
 ** 0 of 141 failed

VERIFICATION:- SUCCESSFUL
Verification Time: 0.1760525s

Complete - 5 successfully verified harnesses, 0 failures, 5 total.

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

@QinyuanWu
QinyuanWu marked this pull request as ready for review November 8, 2024 00:42
@QinyuanWu
QinyuanWu requested a review from a team as a code owner November 8, 2024 00:42
Comment thread library/core/src/ptr/non_null.rs Resolved
Comment thread library/core/src/ptr/non_null.rs Resolved
Comment thread library/core/src/ptr/non_null.rs Resolved
Comment thread library/core/src/ptr/non_null.rs Resolved
Comment thread library/core/src/ptr/non_null.rs Resolved
Comment thread library/core/src/ptr/non_null.rs Resolved
Comment thread library/core/src/ptr/non_null.rs Resolved
Comment thread library/core/src/ptr/non_null.rs Resolved
@QinyuanWu

QinyuanWu commented Nov 12, 2024 •

Copy link
Copy Markdown
Author

Addressed previous PR comments and Increased SIZE:

Checking harness ptr::non_null::verify::non_null_check_read_unaligned...
SUMMARY:
 ** 0 of 261 failed (4 unreachable)

VERIFICATION:- SUCCESSFUL
Verification Time: 18.91408s

Checking harness ptr::non_null::verify::non_null_check_read_volatile...
SUMMARY:
 ** 0 of 237 failed (4 unreachable)

VERIFICATION:- SUCCESSFUL
Verification Time: 15.834378s

Checking harness ptr::non_null::verify::non_null_check_read...
SUMMARY:
 ** 0 of 229 failed (4 unreachable)

VERIFICATION:- SUCCESSFUL
Verification Time: 38.454617s

Complete - 3 successfully verified harnesses, 0 failures, 3 total.

@zhassan-aws zhassan-aws self-assigned this Nov 13, 2024

@zhassan-aws zhassan-aws 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.

Looks good. Thanks!

Comment thread library/core/src/ptr/non_null.rs Resolved
Comment thread library/core/src/ptr/non_null.rs Resolved
@QinyuanWu

Copy link
Copy Markdown
Author

@zhassan-aws Thank you! Waiting for another review.

@zhassan-aws zhassan-aws 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.

Can you please resolve the conflict?

Comment thread library/core/src/ptr/non_null.rs Resolved
Comment thread library/core/src/ptr/non_null.rs Resolved
@Eh2406

Eh2406 commented Nov 14, 2024

Copy link
Copy Markdown

I've then asked to help review this.

@HuStmpHrrr

Copy link
Copy Markdown
Member

LGTM

@QinyuanWu

Copy link
Copy Markdown
Author

@zhassan-aws resolved conflicts and addressed all comments, ready to merge:

VERIFICATION:- SUCCESSFUL
Verification Time: 0.173812s

Complete - 9 successfully verified harnesses, 0 failures, 9 total.

@zhassan-aws
zhassan-aws enabled auto-merge (squash) November 15, 2024 06:06
@zhassan-aws

Copy link
Copy Markdown

trigger approval workflow

1 similar comment
@zhassan-aws

Copy link
Copy Markdown

trigger approval workflow

@zhassan-aws
zhassan-aws merged commit 94a31f5 into model-checking:main Nov 15, 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.

5 participants