24 for(
const auto &name_value : view)
26 out << name_value.first <<
" <- " <<
format(name_value.second) <<
"\n";
44 const exprt &condition,
48 if(
auto and_expr = expr_try_dynamic_cast<and_exprt>(condition))
53 for(
const auto &op : and_expr->operands())
56 else if(
auto not_expr = expr_try_dynamic_cast<not_exprt>(condition))
58 const exprt &operand = not_expr->op();
59 if(
auto notequal_expr = expr_try_dynamic_cast<notequal_exprt>(operand))
69 else if(
auto equal_expr = expr_try_dynamic_cast<equal_exprt>(operand))
87 else if(
auto equal_expr = expr_try_dynamic_cast<equal_exprt>(condition))
90 exprt lhs = equal_expr->lhs();
91 exprt rhs = equal_expr->rhs();
100 "apply_condition operand should be L2 renamed");
103 previous_state.
threads.size() == 1 ||
113 const auto propagation_entry =
propagation.find(l1_identifier);
114 if(!propagation_entry.has_value())
116 else if(propagation_entry->get() != rhs)
133 expr_checked_cast<notequal_exprt>(condition).lhs().type() ==
bool_typet{})
139 expr_dynamic_cast<notequal_exprt>(condition);
dstringt has one field, an unsigned integer no which is an index into a static table of strings.
Base class for all expressions.
typet & type()
Return the type of the expression.
bool is_constant() const
Return whether the expression is a constant.
The Boolean constant false.
void apply_condition(const exprt &condition, const goto_symex_statet &previous_state, const namespacet &ns)
Given a condition that must hold on this path, propagate as much knowledge as possible.
sharing_mapt< irep_idt, exprt > propagation
value_sett value_set
Uses level 1 names, and is used to do dereferencing.
void output_propagation_map(std::ostream &)
Print the constant propagation map in a human-friendly format.
Central data structure: state.
write_is_shared_resultt write_is_shared(const ssa_exprt &expr, const namespacet &ns) const
std::function< std::size_t(const irep_idt &)> get_l2_name_provider() const
std::vector< threadt > threads
A namespacet is essentially one or two symbol tables bound together, to allow for symbol lookups in t...
std::vector< view_itemt > viewt
View of the key-value pairs in the map.
Expression providing an SSA-renamed symbol of expressions.
const irep_idt get_level_2() const
const irep_idt & get_identifier() const
The Boolean constant true.
void assign(const exprt &lhs, const exprt &rhs, const namespacet &ns, bool is_simplified, bool add_to_sets)
Transforms this value-set by executing executing the assignment lhs := rhs against it.
exprt boolean_negate(const exprt &src)
negate a Boolean expression, possibly removing a not_exprt, and swapping false and true
goto_statet class definition
GOTO Symex constant propagation.
#define PRECONDITION(CONDITION)
const ssa_exprt & to_ssa_expr(const exprt &expr)
Cast a generic exprt to an ssa_exprt.
bool is_ssa_expr(const exprt &expr)
ssa_exprt remove_level_2(ssa_exprt ssa)
bool can_cast_expr< notequal_exprt >(const exprt &base)
bool can_cast_expr< symbol_exprt >(const exprt &base)
std::size_t increase_generation(const irep_idt &l1_identifier, const ssa_exprt &lhs, std::function< std::size_t(const irep_idt &)> fresh_l2_name_provider)
Allocates a fresh L2 name for the given L1 identifier, and makes it the latest generation on this pat...