Skip to content

Remove unneeded class hierarchy from resolve_inherited_componentt #5118

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

Conversation

owen-mc-diffblue
Copy link
Contributor

@owen-mc-diffblue owen-mc-diffblue commented Sep 18, 2019

This means it can be used even in settings where a class hierarchy isn't
readily available. The class hierarchy was only being used to find
parents, which are easily available from the class type directly, so it
wasn't providing any benefit. (It would have been different if we needed
to find children.)

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

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: 57bd05e).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/128288014

const std::vector<irep_idt> parents =
make_range(to_struct_type(current_class_symbol_it->second.type).bases())
.map([](const struct_typet::baset &base) {
return base.type().get_identifier();
Copy link
Contributor

Choose a reason for hiding this comment

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

💡 the vector is not strictly necessary here, you could have used auto to have it as a range instead

@owen-mc-diffblue owen-mc-diffblue force-pushed the remove-unneeded-class-hierarchy-from-resolve-inherited-componentt branch from 57bd05e to 3600f70 Compare September 19, 2019 09:08
This means it can be used even in settings where a class hierarchy isn't
readily available. The class hierarchy was only being used to find
parents, which are easily available from the class type directly, so it
wasn't providing any benefit. (It would have been different if we needed
to find children.)
@owen-mc-diffblue owen-mc-diffblue force-pushed the remove-unneeded-class-hierarchy-from-resolve-inherited-componentt branch from 3600f70 to 0c9a5bc Compare September 19, 2019 11:24
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: 0c9a5bc).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/128332467

@codecov-io
Copy link

Codecov Report

Merging #5118 into develop will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #5118      +/-   ##
===========================================
+ Coverage    69.71%   69.71%   +<.01%     
===========================================
  Files         1322     1322              
  Lines       109429   109432       +3     
===========================================
+ Hits         76287    76290       +3     
  Misses       33142    33142
Impacted Files Coverage Δ
src/goto-programs/resolve_inherited_component.h 100% <ø> (ø) ⬆️
...src/java_bytecode/java_bytecode_convert_method.cpp 97.53% <100%> (ø) ⬆️
jbmc/src/java_bytecode/java_bytecode_language.cpp 93.08% <100%> (ø) ⬆️
jbmc/src/java_bytecode/java_utils.cpp 90.78% <100%> (ø) ⬆️
jbmc/src/java_bytecode/ci_lazy_methods.cpp 100% <100%> (ø) ⬆️
src/goto-programs/resolve_inherited_component.cpp 100% <100%> (ø) ⬆️
src/goto-programs/remove_virtual_functions.cpp 94.44% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3ea03e4...0c9a5bc. Read the comment docs.

@owen-mc-diffblue owen-mc-diffblue merged commit 2082719 into diffblue:develop Sep 20, 2019
@owen-mc-diffblue owen-mc-diffblue deleted the remove-unneeded-class-hierarchy-from-resolve-inherited-componentt branch September 20, 2019 06:11
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.

6 participants