Skip to content

Adds get_predecessors() to grapht #6158

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 2 commits into from
May 28, 2021

Conversation

johnfxgalea
Copy link
Contributor

grapht already has get_successors(). This PR adds get_predecessors().

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

@johnfxgalea
Copy link
Contributor Author

@martin-cs PTAL

Copy link
Collaborator

@martin-cs martin-cs left a comment

Choose a reason for hiding this comment

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

Looks good.

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.

Looks good to me, but it would be nice to have a test or some other actual use in the code base. Otherwise, the code might not ever get compiled and may silently stop working (for it's templated).

@codecov
Copy link

codecov bot commented May 28, 2021

Codecov Report

Merging #6158 (12ace9e) into develop (cf594b8) will increase coverage by 0.01%.
The diff coverage is 100.00%.

❗ Current head 12ace9e differs from pull request most recent head a3c1e1e. Consider uploading reports for the commit a3c1e1e to get more accurate results
Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #6158      +/-   ##
===========================================
+ Coverage    74.91%   74.92%   +0.01%     
===========================================
  Files         1450     1450              
  Lines       158253   158265      +12     
===========================================
+ Hits        118550   118575      +25     
+ Misses       39703    39690      -13     
Impacted Files Coverage Δ
src/util/graph.h 97.28% <ø> (ø)
unit/util/graph.cpp 100.00% <100.00%> (ø)
src/ansi-c/c_typecheck_base.cpp 50.54% <0.00%> (-27.75%) ⬇️
src/util/cmdline.cpp 69.94% <0.00%> (-25.44%) ⬇️
src/goto-programs/remove_returns.cpp 75.31% <0.00%> (-24.06%) ⬇️
src/ansi-c/literals/convert_character_literal.cpp 53.84% <0.00%> (-17.95%) ⬇️
src/ansi-c/c_typecheck_typecast.cpp 55.00% <0.00%> (-15.00%) ⬇️
src/util/xml.cpp 62.83% <0.00%> (-10.14%) ⬇️
src/ansi-c/ansi_c_convert_type.cpp 72.61% <0.00%> (-6.12%) ⬇️
src/ansi-c/type2name.cpp 84.91% <0.00%> (-5.03%) ⬇️
... and 17 more

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 c21dfd9...a3c1e1e. Read the comment docs.

@johnfxgalea
Copy link
Contributor Author

Done. PTAL

@tautschnig
Copy link
Collaborator

Done. PTAL

Thank you for adding the test! Can I be a pain and ask for the formatting commit to be squashed into the commit introducing the test? Well, and perhaps also craft a slightly more unambiguous commit message for that one?

@johnfxgalea johnfxgalea force-pushed the add-get-predecessors branch from 12ace9e to a3c1e1e Compare May 28, 2021 18:41
@johnfxgalea
Copy link
Contributor Author

Done. PTAL

Thank you for adding the test! Can I be a pain and ask for the formatting commit to be squashed into the commit introducing the test? Well, and perhaps also craft a slightly more unambiguous commit message for that one?

Sorry, I thought you were going to squash and merge via the Github button.

Done.

@tautschnig tautschnig merged commit 9936169 into diffblue:develop May 28, 2021
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.

3 participants