-
Notifications
You must be signed in to change notification settings - Fork 277
Value set: lift offset from numeric constants to expressions #8647
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
Changes from all commits
2ce536c
1f2fd5a
7fc006e
056be83
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,8 +27,6 @@ Author: Daniel Kroening, [email protected] | |
#include "simplify_expr_with_value_set.h" | ||
#include "symex_target_equation.h" | ||
|
||
static void get_l1_name(exprt &expr); | ||
|
||
goto_symex_statet::goto_symex_statet( | ||
const symex_targett::sourcet &_source, | ||
std::size_t max_field_sensitive_array_size, | ||
|
@@ -129,20 +127,7 @@ renamedt<ssa_exprt, L2> goto_symex_statet::assignment( | |
else | ||
propagation.erase_if_exists(l1_identifier); | ||
|
||
{ | ||
// update value sets | ||
exprt l1_rhs(rhs); | ||
get_l1_name(l1_rhs); | ||
|
||
const ssa_exprt l1_lhs = remove_level_2(lhs); | ||
if(run_validation_checks) | ||
{ | ||
DATA_INVARIANT(!check_renaming_l1(l1_lhs), "lhs renaming failed on l1"); | ||
DATA_INVARIANT(!check_renaming_l1(l1_rhs), "rhs renaming failed on l1"); | ||
} | ||
|
||
value_set.assign(l1_lhs, l1_rhs, ns, rhs_is_simplified, is_shared); | ||
} | ||
value_set.assign(lhs, rhs, ns, rhs_is_simplified, is_shared); | ||
|
||
#ifdef DEBUG | ||
std::cout << "Assigning " << l1_identifier << '\n'; | ||
|
@@ -789,17 +774,6 @@ void goto_symex_statet::rename( | |
l1_type_entry.first->second=type; | ||
} | ||
|
||
static void get_l1_name(exprt &expr) | ||
{ | ||
// do not reset the type ! | ||
|
||
if(is_ssa_expr(expr)) | ||
to_ssa_expr(expr).remove_level_2(); | ||
else | ||
Forall_operands(it, expr) | ||
get_l1_name(*it); | ||
} | ||
|
||
/// Dumps the current state of symex, printing the function name and location | ||
/// number for each stack frame in the currently active thread. | ||
/// This is for use from the debugger or in debug code; please don't delete it | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -982,7 +982,7 @@ normalize(const object_descriptor_exprt &expr, const namespacet &ns) | |
{ | ||
return expr; | ||
} | ||
if(expr.offset().id() == ID_unknown) | ||
if(!expr.offset().is_constant()) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we get a high level description of what is the normal form we're trying to reach ? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. To root object + constant offset, as object can be an arbitrary access path into the object. Pointer equality checks become trivial then - maybe simplify_expr has become good enough in the meanwhile. |
||
{ | ||
return expr; | ||
} | ||
|
Uh oh!
There was an error while loading. Please reload this page.