Skip to content

CONTRACTS: functions to compute root objects #7636

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

Conversation

remi-delmas-3000
Copy link
Collaborator

  • Assigns clause targets can contain slices expressions which requires some adaptations on top of object_descriptor_exprt::root_object
  • Assignments LHS can contain ternary operators, which requires computing a set of root object expressions instead of a single expression.

Extracted from #7541, will be tested when all new features are merged.

  • Each commit message has a non-empty body, explaining why the change was made.
  • Methods or procedures I have added are documented, following the guidelines provided in CODING_STANDARD.md.
  • 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).
  • My commit message includes data points confirming performance improvements (if claimed).
  • My PR is restricted to a single feature or bugfix.
  • White-space or formatting changes outside the feature-related changed lines are in commits of their own.

@codecov
Copy link

codecov bot commented Mar 29, 2023

Codecov Report

Patch and project coverage have no change.

Comparison is base (53b50bc) 78.51% compared to head (6b828d5) 78.51%.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #7636   +/-   ##
========================================
  Coverage    78.51%   78.51%           
========================================
  Files         1674     1674           
  Lines       191935   191935           
========================================
  Hits        150704   150704           
  Misses       41231    41231           

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

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

@feliperodri feliperodri added aws Bugs or features of importance to AWS CBMC users aws-high Code Contracts Function and loop contracts labels Mar 30, 2023
Copy link
Collaborator

@tautschnig tautschnig left a comment

Choose a reason for hiding this comment

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

There are a bunch of recurring comments of mine here. For pointer-need-not-be-operand-0 you might want to make use of goto-programs/pointer_arithmetic.h to avoid having to go over all the operands.

@remi-delmas-3000 remi-delmas-3000 force-pushed the contracts-root-object branch 4 times, most recently from 5822737 to 9186b70 Compare April 1, 2023 16:21
@remi-delmas-3000 remi-delmas-3000 force-pushed the contracts-root-object branch 2 times, most recently from 4480e64 to e937ead Compare April 3, 2023 16:56
@feliperodri
Copy link
Collaborator

#7629 also include these changes.

@remi-delmas-3000
Copy link
Collaborator Author

@tautschnig @feliperodri latest version, should be good to go (still needs approval from @tautschnig to merge)

@feliperodri
Copy link
Collaborator

@tautschnig if you have the time, could you do another round of review on this PR?

Copy link
Collaborator

@tautschnig tautschnig left a comment

Choose a reason for hiding this comment

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

I believe this code can be simplified, see my comments.

Alternative implementation of `root_object`
supporting ternary operators in assignment or call
LHS expressions, and object slice expressions in
assigns clause targets.
@remi-delmas-3000
Copy link
Collaborator Author

remi-delmas-3000 commented Apr 17, 2023

@tautschnig all suggestions implemented, could you please take a last look ?

@remi-delmas-3000 remi-delmas-3000 merged commit 94a8d31 into diffblue:develop Apr 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
aws Bugs or features of importance to AWS CBMC users aws-high Code Contracts Function and loop contracts
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants