Skip to content

irept-related fixes [blocks: #2035] #3606

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 4 commits into from
Dec 20, 2018

Conversation

tautschnig
Copy link
Collaborator

Four independent smaller fixes all triggered by reviewing code around irept/SUB_IS_LIST-related changes.

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

Since a1c6e54 uses std::map, but the header was only provided through irep.h,
which might not do so in case SUB_IS_LIST is in effect.
In 48c40db the *2 got lost, and previously it already was off-by-one, all
of which result in unnecessary re-allocations.
This returned the wrong value in case sub/named_sub had mismatching size. It
really was wrong ever since committed to the repository, proving that the code
never was used. It should likely just be removed.
There is no need to create a copy at this point.
@tautschnig tautschnig changed the title irept-related fixes irept-related fixes [blocks: #2035] Dec 20, 2018
@smowton
Copy link
Contributor

smowton commented Dec 20, 2018

The merged_ireps change seems like a pretty serious bug (considering ireps with different sub lengths equal), can we test for that one?

@tautschnig
Copy link
Collaborator Author

The merged_ireps change seems like a pretty serious bug (considering ireps with different sub lengths equal), can we test for that one?

As said in the commit message, I think we should really just remove this code.

Copy link
Contributor

@allredj allredj left a comment

Choose a reason for hiding this comment

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

✔️
Passed Diffblue compatibility checks (cbmc commit: d4649bc).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/95401102

@tautschnig tautschnig merged commit f214211 into diffblue:develop Dec 20, 2018
@tautschnig tautschnig deleted the irep-related-fixes branch December 20, 2018 17:11
tautschnig added a commit that referenced this pull request Dec 20, 2018
irept: Use singly-linked lists with SUB_IS_LIST [depends on: #3606]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants