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

Cleanup USE_STD_STRING/USE_DSTRING configuration option #8040

Merged
merged 6 commits into from
Dec 18, 2023

Conversation

tautschnig
Copy link
Collaborator

The code is now back to a compilable state when USE_STD_STRING is set (i.e., irep_idt are std::string instead of dstringt). Not all tests pass as some string output is different, and performance is substantially worse. This might be enough of a reason to follow up with a PR that completely removes the possibility of using std::string, but I'd recommend we do so from a state where that would still have worked, i.e., only after merging this PR.

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

@kroening kroening removed their assignment Nov 15, 2023
Copy link

codecov bot commented Nov 15, 2023

Codecov Report

Attention: 4 lines in your changes are missing coverage. Please review.

Comparison is base (d28ad2a) 79.08% compared to head (c26d38c) 79.08%.

Files Patch % Lines
...lvers/smt2_incremental/smt_response_validation.cpp 76.47% 4 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #8040   +/-   ##
========================================
  Coverage    79.08%   79.08%           
========================================
  Files         1696     1696           
  Lines       196423   196422    -1     
========================================
+ Hits        155340   155342    +2     
+ Misses       41083    41080    -3     

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

These headers are only brought in by dstring.h, which we don't use when
building with `USE_STD_STRING` set.
We keep dstringt as an implementation detail.
`USE_STD_STRING` is to be set on the build command line, but internally
we always check for `USE_DSTRING`.
We must not end up with two constructors that take the same argument
type.
We want comments to start with `#` and not `C_`.
We want string numbering, not string hashing. For `dstringt` these are
interchangeable, but that's not the case for `std::string`.
Copy link
Collaborator

@feliperodri feliperodri left a comment

Choose a reason for hiding this comment

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

LGTM.

@feliperodri feliperodri removed their assignment Dec 15, 2023
@tautschnig tautschnig self-assigned this Dec 15, 2023
@tautschnig tautschnig merged commit 7601bb1 into diffblue:develop Dec 18, 2023
36 checks passed
@tautschnig tautschnig deleted the cleanup/dstring branch December 18, 2023 08:40
tautschnig added a commit to tautschnig/cbmc that referenced this pull request Jan 10, 2024
While diffblue#8040 ensured we were still able to compile the code base with
`irep_idt` typedef'd to `std::string` (via `USE_STD_STRING`),
experiments at that time also demonstrated that performance is
substantially worse, and not all tests would pass.

This commit now removes this untested feature to pave the way for
changes that may break `dstringt` to `std::string` compatibility.
tautschnig added a commit to tautschnig/cbmc that referenced this pull request Jan 11, 2024
While diffblue#8040 ensured we were still able to compile the code base with
`irep_idt` typedef'd to `std::string` (via `USE_STD_STRING`),
experiments at that time also demonstrated that performance is
substantially worse, and not all tests would pass.

This commit now removes this untested feature to pave the way for
changes that may break `dstringt` to `std::string` compatibility.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants