Skip to content

Simplify equality over address-of with offset #7704

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

Merged
merged 1 commit into from
May 19, 2023

Conversation

tautschnig
Copy link
Collaborator

@tautschnig tautschnig commented May 8, 2023

When testing equality of two pointers to different objects where each of them is strictly within the respective object bounds the result is necessarily false.

  • Each commit message has a non-empty body, explaining why the change was made.
  • n/a Methods or procedures I have added are documented, following the guidelines provided in CODING_STANDARD.md.
  • n/a The feature or user visible behaviour I have added or modified has been documented in the User Guide in doc/cprover-manual/
  • Regression or unit tests are included, or existing tests cover the modified code (in this case I have detailed which ones those are in the commit message).
  • n/a My commit message includes data points confirming performance improvements (if claimed).
  • My PR is restricted to a single feature or bugfix.
  • n/a White-space or formatting changes outside the feature-related changed lines are in commits of their own.

@tautschnig tautschnig self-assigned this May 8, 2023
@codecov
Copy link

codecov bot commented May 8, 2023

Codecov Report

Patch coverage: 95.00% and project coverage change: +0.02 🎉

Comparison is base (8c152bc) 78.53% compared to head (7da6b86) 78.55%.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #7704      +/-   ##
===========================================
+ Coverage    78.53%   78.55%   +0.02%     
===========================================
  Files         1686     1686              
  Lines       192930   192950      +20     
===========================================
+ Hits        151520   151581      +61     
+ Misses       41410    41369      -41     
Impacted Files Coverage Δ
src/util/simplify_expr_int.cpp 88.55% <95.00%> (+0.12%) ⬆️

... and 2 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@kroening
Copy link
Member

kroening commented May 8, 2023

May I suggest saying "strictly within object bounds" for clarity -- as opposed to "one beyond end of sequence", which is too weak as a precondition.

When testing equality of two pointers to different objects where each of
them is strictly within the respective object bounds the result is
necessarily false.
@tautschnig tautschnig force-pushed the feature/simp-pointer-equal branch from 8f60f8c to 7da6b86 Compare May 15, 2023 11:10
@tautschnig
Copy link
Collaborator Author

May I suggest saying "strictly within object bounds" for clarity -- as opposed to "one beyond end of sequence", which is too weak as a precondition.

Done.

@tautschnig tautschnig marked this pull request as ready for review May 15, 2023 11:11
@tautschnig tautschnig merged commit 5479b7c into diffblue:develop May 19, 2023
@tautschnig tautschnig deleted the feature/simp-pointer-equal branch May 19, 2023 09:07
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