Skip to content

Value sets: make pointers nondet only once #7716

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
Jul 19, 2023

Conversation

tautschnig
Copy link
Collaborator

@tautschnig tautschnig commented May 16, 2023

When get_value_set_rec discovers a nondet symbol it will consider the pointer pointing to any of the known objects (as of 3789670). It suffices to do this once for each run of get_value_set, even when multiple nondet symbols are encountered while traversing an expression.

This reduces the symex time on the test of #7357 from 930 seconds to 404 seconds.

RFC: The initial implementation is done so as to be keep the change as small as possible. We will want to explore variants that avoid the use of mutable.

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

@codecov
Copy link

codecov bot commented May 16, 2023

Codecov Report

Patch coverage: 91.46% and project coverage change: +0.02 🎉

Comparison is base (0834274) 78.66% compared to head (88dd798) 78.69%.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #7716      +/-   ##
===========================================
+ Coverage    78.66%   78.69%   +0.02%     
===========================================
  Files         1699     1699              
  Lines       194181   194219      +38     
===========================================
+ Hits        152757   152835      +78     
+ Misses       41424    41384      -40     
Impacted Files Coverage Δ
...nit/pointer-analysis/custom_value_set_analysis.cpp 100.00% <ø> (ø)
src/pointer-analysis/value_set.h 100.00% <ø> (ø)
src/pointer-analysis/value_set_fi.h 90.76% <ø> (ø)
src/pointer-analysis/value_set_fi.cpp 69.09% <66.66%> (+0.03%) ⬆️
src/pointer-analysis/value_set.cpp 84.57% <94.52%> (+0.38%) ⬆️

... and 3 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@tautschnig
Copy link
Collaborator Author

I have now added a second commit that replaces the use of mutable by a parameter. Keeping this in a separate commit to make the change in behaviour easier to review (first commit).

When `get_value_set_rec` discovers a nondet symbol it will consider the
pointer pointing to any of the known objects (as of 3789670). It
suffices to do this once for each run of `get_value_set`, even when
multiple nondet symbols are encountered while traversing an expression.

This reduces the symex time on the test of diffblue#7357 from 930 seconds to 404
seconds.
There is no change in behaviour here, just cleanup to avoid a use of
`mutable` that was only put in place to keep the code churn to a
minimum.
@tautschnig tautschnig force-pushed the cleanup/nondet-pointer-perf branch from 4833a24 to 88dd798 Compare July 19, 2023 05:44
@tautschnig tautschnig merged commit 6831ee0 into diffblue:develop Jul 19, 2023
@tautschnig tautschnig deleted the cleanup/nondet-pointer-perf branch July 19, 2023 07:58
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.

4 participants