Skip to content

Conversation

@jezhiggins
Copy link
Contributor

During a widening merge, it is possible for the upper or lower bound to be extended to integer limits - max_exprt(type) or min_exprt(type). This was not handled gracefully and could have resulted in an (inappropriate) invariant violation constructing new intervals. Extreme values, along with overflow and underflow calculating new bounds, are now handled appropriately.

If new upper bound is already at maximum, or overflows, then
explicitly set to max_exprt(type)
If new lower bound is already at minimum, or underflows, then
explicitly set to min_exprt(type)
@codecov
Copy link

codecov bot commented Jun 19, 2021

Codecov Report

Merging #6190 (9815a7b) into develop (4b66d29) will decrease coverage by 0.45%.
The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #6190      +/-   ##
===========================================
- Coverage    75.62%   75.17%   -0.46%     
===========================================
  Files         1454     1456       +2     
  Lines       160922   161078     +156     
===========================================
- Hits        121705   121088     -617     
- Misses       39217    39990     +773     
Impacted Files Coverage Δ
src/analyses/goto_check.cpp 88.28% <100.00%> (ø)
...s/variable-sensitivity/interval_abstract_value.cpp 84.00% <100.00%> (-0.91%) ⬇️
...variable-sensitivity/value_set_abstract_object.cpp 97.41% <100.00%> (-0.04%) ⬇️
...rc/analyses/variable-sensitivity/widened_range.cpp 100.00% <100.00%> (ø)
src/analyses/variable-sensitivity/widened_range.h 100.00% <100.00%> (ø)
...itivity/interval_abstract_value/widening_merge.cpp 100.00% <100.00%> (ø)
...ivity/value_set_abstract_object/widening_merge.cpp 100.00% <100.00%> (ø)
src/util/mathematical_expr.cpp 17.02% <0.00%> (-63.83%) ⬇️
src/goto-programs/remove_returns.cpp 75.31% <0.00%> (-24.06%) ⬇️
src/ansi-c/c_typecheck_base.cpp 54.39% <0.00%> (-23.91%) ⬇️
... and 39 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 523622a...9815a7b. Read the comment docs.

Means widened ranges are calculated in the same way for both intervals
and value sets, both now handling max & min appropriately.
@jezhiggins jezhiggins force-pushed the vsd/widen-to-extreme branch from 0f589f4 to 5cd42eb Compare June 19, 2021 18:49
@jezhiggins jezhiggins marked this pull request as ready for review June 19, 2021 19:48
@martin-cs
Copy link
Collaborator

Only failure is from the code coverage and TBH I am suspicious of the numbers it reports. The patch is listed as having 100% coverage so I am going to merge it.

@martin-cs martin-cs merged commit 48acf78 into diffblue:develop Jun 20, 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