Skip to content

[kani] Prove some PtrInner methods #2444

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

joshlf
Copy link
Member

@joshlf joshlf commented Mar 18, 2025

Also add Kani requires and ensures annotations to some methods and
to some functions in util.

While we're here, roll Kani to 0.60.0 and fix the Kani roller.


This PR is on branch ptr-kani.

Comment on lines +719 to +807
// TODO: Assert that `t` and `rest` are contiguous and
// non-overlapping.
Copy link
Member Author

Choose a reason for hiding this comment

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

TODO

}
}
Err(CastError::Alignment(_)) => {
// TODO: Prove that there would have been an alignment problem.
Copy link
Member Author

Choose a reason for hiding this comment

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

TODO

// TODO: Prove that there would have been an alignment problem.
}
Err(CastError::Size(_)) => {
// TODO: Prove that there would have been a size problem.
Copy link
Member Author

Choose a reason for hiding this comment

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

TODO

@joshlf
Copy link
Member Author

joshlf commented Mar 18, 2025

@jswrenn Not yet ready to merge because of a few TODOs, but mostly ready to review.

@joshlf joshlf force-pushed the Ic1e352d3d92a45ff86d8ca85b8221bccfb07033b branch from 7a5265e to a48ef98 Compare March 18, 2025 02:25
@codecov-commenter
Copy link

codecov-commenter commented Mar 18, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.42%. Comparing base (d769fb9) to head (badfc70).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2444   +/-   ##
=======================================
  Coverage   90.42%   90.42%           
=======================================
  Files          18       18           
  Lines        7319     7319           
=======================================
  Hits         6618     6618           
  Misses        701      701           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@joshlf joshlf force-pushed the Ic1e352d3d92a45ff86d8ca85b8221bccfb07033b branch 3 times, most recently from 76f0bfe to 62b30bf Compare March 18, 2025 19:05
Copy link
Collaborator

Choose a reason for hiding this comment

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

Let's pass -Zmem-predicates in our CI runner; then we can make use of kani::same_allocation and the other memory predicates.

@joshlf joshlf force-pushed the Ic1e352d3d92a45ff86d8ca85b8221bccfb07033b branch 2 times, most recently from badfc70 to de9ff27 Compare March 18, 2025 20:25
@joshlf joshlf changed the base branch from main to I681bacc2fbc00531c8493490b9f982fa4aea307a March 18, 2025 20:25
@joshlf joshlf force-pushed the Ic1e352d3d92a45ff86d8ca85b8221bccfb07033b branch from de9ff27 to 52b2eea Compare March 18, 2025 20:28
@joshlf joshlf force-pushed the I681bacc2fbc00531c8493490b9f982fa4aea307a branch from 2a3b116 to f375ace Compare March 18, 2025 20:28
Base automatically changed from I681bacc2fbc00531c8493490b9f982fa4aea307a to main March 18, 2025 20:59
@joshlf joshlf force-pushed the Ic1e352d3d92a45ff86d8ca85b8221bccfb07033b branch from 52b2eea to 21799ba Compare March 18, 2025 23:35
@joshlf joshlf changed the base branch from main to Ide939969b8d0c3bc117aa9f1dba06e6d570f262f March 18, 2025 23:36
@joshlf joshlf force-pushed the Ide939969b8d0c3bc117aa9f1dba06e6d570f262f branch from 6529681 to 40f3f1e Compare March 18, 2025 23:41
@joshlf joshlf force-pushed the Ic1e352d3d92a45ff86d8ca85b8221bccfb07033b branch from 21799ba to 94d93fd Compare March 18, 2025 23:41
joshlf added 2 commits March 18, 2025 16:49
gherrit-pr-id: Ide939969b8d0c3bc117aa9f1dba06e6d570f262f
Also add Kani `requires` and `ensures` annotations to some methods and
to some functions in `util`.

While we're here, roll Kani to 0.60.0 and fix the Kani roller.

gherrit-pr-id: Ic1e352d3d92a45ff86d8ca85b8221bccfb07033b
@joshlf joshlf force-pushed the Ic1e352d3d92a45ff86d8ca85b8221bccfb07033b branch from 94d93fd to 2640e7a Compare March 18, 2025 23:49
@joshlf joshlf force-pushed the Ide939969b8d0c3bc117aa9f1dba06e6d570f262f branch from 40f3f1e to 19ae290 Compare March 18, 2025 23:49
Base automatically changed from Ide939969b8d0c3bc117aa9f1dba06e6d570f262f to main March 19, 2025 00:23
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.

3 participants