Skip to content
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

Enable all struct tests under regression/cbmc/ for new SMT backend #7809

Merged
merged 3 commits into from
Oct 10, 2023

Conversation

NlightNFotis
Copy link
Contributor

Enable all struct tests under regression/cbmc/ for the new SMT backend (by marking them as new-smt-backend) and add two more regression tests for the case where the address-of operator is applied to a struct member.

  • 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.

@NlightNFotis NlightNFotis marked this pull request as ready for review July 18, 2023 14:06
@@ -1,4 +1,4 @@
CORE smt-backend
CORE smt-backend new-smt-backend
main.c
--trace --z3
Copy link
Contributor Author

@NlightNFotis NlightNFotis Jul 18, 2023

Choose a reason for hiding this comment

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

Despite the --z3 flag here, this does run with the new SMT backend when the test.pl profile for the new-smt-backend is run.

I have verified this locally, but I'm not sure I understand why that is - I speculate that the handling for the --incremental-smt2-solver flag is earlier, and path dependence handles the rest, but I haven't looked too close.

Copy link
Collaborator

Choose a reason for hiding this comment

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

That matches my understanding. The --z3 flag is ignored when --incremental-smt2-solver is specified. Unfortunately the control flow for the solver_factory where this is handled is not always the easiest to follow.

@codecov
Copy link

codecov bot commented Oct 6, 2023

Codecov Report

All modified lines are covered by tests ✅

Comparison is base (f33b96a) 78.62% compared to head (eadb111) 78.63%.
Report is 6 commits behind head on develop.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #7809   +/-   ##
========================================
  Coverage    78.62%   78.63%           
========================================
  Files         1701     1700    -1     
  Lines       195975   195974    -1     
========================================
+ Hits        154087   154095    +8     
+ Misses       41888    41879    -9     

see 15 files with indirect coverage changes

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

ref = &var_expr.line;
else
ref = &other_expr.line;
__CPROVER_assert(*ref != 34, "expected failure: ref == 34");
Copy link
Collaborator

Choose a reason for hiding this comment

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

⛏️ I am not sure this is a great test of the new SMT back end. The line field of expr will be at offset zero. It would be good to include taking the address of a field with a non-zero offset such as the comment field and to check that the resulting size of the offset is as expected.

@thomasspriggs thomasspriggs merged commit cf380d5 into diffblue:develop Oct 10, 2023
36 checks passed
@NlightNFotis NlightNFotis deleted the address_of_field branch October 10, 2023 14:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants