1/*******************************************************************\
3Module: Equality Propagation
5Author: Daniel Kroening, dkr@amazon.com
7\*******************************************************************/
19 using valuest = std::map<irep_idt, exprt>;
25 // forward-propagation of equalities
26 for(
auto &expr : constraints)
41 // this is a (deliberate) no-op when the symbol is already in the map
43 values.insert({symbol_expr.identifier(),
equal_expr.rhs()});
46 // insertion has happened
58 // apply the map again, to catch any backwards definitions
59 for(
auto &expr : constraints)
ait supplies three of the four components needed: an abstract interpreter (in this case handling func...
void equality_propagation(std::vector< exprt > &constraints)
API to expression classes.
const symbol_exprt & to_symbol_expr(const exprt &expr)
Cast an exprt to a symbol_exprt.
const equal_exprt & to_equal_expr(const exprt &expr)
Cast an exprt to an equal_exprt.
std::optional< exprt > substitute_symbols(const std::map< irep_idt, exprt > &substitutions, exprt src)
Substitute free occurrences of the variables given by their identifiers in the keys of the map in the...