Skip to content

Shadow Memory: Refactoring, enabling tests and minor doxygen improvements. #7868

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 5 commits into from
Aug 30, 2023

Conversation

NlightNFotis
Copy link
Contributor

The second part of our work on the set_field, this is enabling some tests that are now passing after our bug fixes, refactoring code to use a more modern style at places, and adding some doxygen documentation for some of the functions.

This is really just a checkin of our current work in progress before we move forward with more tests && refactors.

Work done with @esteffin

@@ -691,7 +690,17 @@ static exprt get_matched_expr_cond(
return expr_cond;
}

// TODO: doxygen?
// TODO: FOtis - revisit.
Copy link
Member

Choose a reason for hiding this comment

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

Docs lgtm.

@@ -22,7 +22,6 @@ Author: Peter Schrammel
#include <util/ssa_expr.h>
#include <util/std_expr.h>


Copy link
Member

Choose a reason for hiding this comment

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

This commit should be squashed into the respective previous commits.

Copy link
Contributor

Choose a reason for hiding this comment

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

Agreed.

Changed

@codecov
Copy link

codecov bot commented Aug 29, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: -0.97% ⚠️

Comparison is base (d927b47) 78.84% compared to head (7417bef) 77.88%.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #7868      +/-   ##
===========================================
- Coverage    78.84%   77.88%   -0.97%     
===========================================
  Files         1699     1699              
  Lines       195229   195294      +65     
===========================================
- Hits        153935   152098    -1837     
- Misses       41294    43196    +1902     
Files Changed Coverage Δ
src/goto-symex/shadow_memory_util.cpp 90.46% <100.00%> (+9.24%) ⬆️
src/pointer-analysis/value_set_dereference.cpp 99.39% <100.00%> (+<0.01%) ⬆️
src/util/expr_initializer.cpp 83.41% <100.00%> (+0.34%) ⬆️
unit/util/expr_initializer.cpp 99.84% <100.00%> (+0.01%) ⬆️

... and 70 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

NlightNFotis and others added 4 commits August 29, 2023 22:21
When setting shadow memory for pointer types the value is replicated by
applying left shift and combining the shifted values with bitwise-or.
However the SAT solver does not support bitwise-or for pointer types.

This commit changes the way the replication is done for pointer types by
converting them to an unsigned bitvector of the pointer type size,
performing the shift and bitwise-or on this bitvector type and then
casting it to pointer at the end.
Marking as CORE all the shadow memory regression tests that are now
passing.

The remaining regression tests that are still marked as KNOWNBUG will be
added as soon as the implementation will be fixed.
Windows requires alloca to be defined otherwise an invariant will be
violated (the invariant violation will be changed in another subsequent
PR).
@esteffin esteffin merged commit decd283 into diffblue:develop Aug 30, 2023
@NlightNFotis NlightNFotis deleted the shadow_mem_rev branch August 30, 2023 13:33
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.

4 participants