Skip to content

VSD - max array length #6293

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 14 commits into from
Aug 14, 2021
Merged

Conversation

jezhiggins
Copy link
Contributor

@jezhiggins jezhiggins commented Aug 12, 2021

To prevent large arrays getting unwieldy, add a configuration parameter that limits the number of entries they have.

Writes beyond the maximum index are all written to the same location, merging with any previous writes.

  • Adds --vsd-arrays smash option, which sets the maximum size to 1. All writes to the array are merged, and all reads return the same value.
  • Add --vsd-arrays up-to-n-elements option. Default n is 10, --vsd-max-array-elements options gives finer control. (I would have liked n to be an additional parameter to --vsd-arrays, but that would have required significant rework in the arguments parsing and it's just not worth it.)

@jezhiggins jezhiggins force-pushed the vsd-max-array-length branch 2 times, most recently from a638126 to 15ffbfe Compare August 12, 2021 15:09
@codecov
Copy link

codecov bot commented Aug 12, 2021

Codecov Report

Merging #6293 (63203b1) into develop (8065a69) will increase coverage by 0.00%.
The diff coverage is 95.21%.

Impacted file tree graph

@@           Coverage Diff            @@
##           develop    #6293   +/-   ##
========================================
  Coverage    75.97%   75.98%           
========================================
  Files         1508     1510    +2     
  Lines       163380   163465   +85     
========================================
+ Hits        124131   124208   +77     
- Misses       39249    39257    +8     
Impacted Files Coverage Δ
...alyses/variable-sensitivity/abstract_environment.h 100.00% <ø> (ø)
.../variable-sensitivity/full_array_abstract_object.h 100.00% <ø> (ø)
...ensitivity/variable_sensitivity_dependence_graph.h 79.31% <ø> (ø)
...variable-sensitivity/variable_sensitivity_domain.h 100.00% <ø> (ø)
...le-sensitivity/variable_sensitivity_test_helpers.h 100.00% <ø> (ø)
...sensitivity/variable_sensitivity_configuration.cpp 80.95% <72.72%> (-2.07%) ⬇️
...nsitivity/three_way_merge_abstract_interpreter.cpp 93.02% <91.17%> (ø)
src/analyses/ai.cpp 76.12% <91.66%> (ø)
...ariable-sensitivity/full_array_abstract_object.cpp 92.85% <97.82%> (-0.27%) ⬇️
src/analyses/ai.h 57.36% <100.00%> (ø)
... and 23 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 904a07d...63203b1. Read the comment docs.

@jezhiggins jezhiggins force-pushed the vsd-max-array-length branch 2 times, most recently from 3c72914 to f304bb9 Compare August 12, 2021 18:37
@jezhiggins jezhiggins force-pushed the vsd-max-array-length branch from 59881b8 to 917fd7a Compare August 13, 2021 13:33
The "smash" array abstraction sets the maximum size of the
full_array_abstract_object to 1. All writes to the array are merged, and
all reads return the same value.
@jezhiggins jezhiggins force-pushed the vsd-max-array-length branch from 917fd7a to 0a3b7e3 Compare August 13, 2021 14:06
@jezhiggins jezhiggins force-pushed the vsd-max-array-length branch from c4426ea to 5705e60 Compare August 13, 2021 22:33
Default n is 10.
Additional --vsd-max-array-elements options gives finer control.
@jezhiggins jezhiggins force-pushed the vsd-max-array-length branch from 5705e60 to 63203b1 Compare August 13, 2021 22:37
{
return object_factory->wrap_with_context(abstract_object);
return object_factory->config();
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Bit of a diff mismatch. add_object_context is redundant and was removed. configuration is a new member function, which we need :)

@jezhiggins jezhiggins marked this pull request as ready for review August 14, 2021 20:00
@martin-cs martin-cs merged commit be17ef4 into diffblue:develop Aug 14, 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.

2 participants