18 const auto &values = expr.
values();
22 "let must have the type of the 'where' operand");
25 for(
auto &binding :
make_range(variables).zip(values))
28 binding.first.type() == binding.second.type(),
29 "let value must have the type of the let symbol");
40 for(
auto &value : values)
54 const auto &identifier = binding.first.get_identifier();
57 if(binding.first.is_boolean())
59 DATA_INVARIANT(binding.second.size() == 1,
"boolean values have one bit");
60 symbols[identifier] = binding.second[0];
82 const auto &type = entry.type();
84 symbols.erase(entry.get_identifier());
ait supplies three of the four components needed: an abstract interpreter (in this case handling func...
void erase_literals(const irep_idt &identifier, const typet &type)
void set_literals(const irep_idt &identifier, const typet &type, const bvt &literals)
virtual std::optional< std::size_t > get_width_opt(const typet &type) const
virtual const bvt & convert_bv(const exprt &expr, const std::optional< std::size_t > expected_width={})
Convert expression to vector of literalts, using an internal cache to speed up conversion if availabl...
virtual bvt convert_let(const let_exprt &)
binding_exprt::variablest fresh_binding(const binding_exprt &)
create new, unique variables for the given binding
Base class for all expressions.
typet & type()
Return the type of the expression.
binding_exprt::variablest & variables()
convenience accessor for binding().variables()
exprt & where()
convenience accessor for binding().where()
binding_exprt & binding()
Replace a symbol expression by a given expression.
void insert(const class symbol_exprt &old_expr, const exprt &new_expr)
Sets old_expr to be replaced by new_expr if we don't already have a replacement; otherwise does nothi...
std::vector< literalt > bvt
Ranges: pair of begin and end iterators, which can be initialized from containers,...
ranget< iteratort > make_range(iteratort begin, iteratort end)
#define DATA_INVARIANT(CONDITION, REASON)
This condition should be used to document that assumptions that are made on goto_functions,...
API to expression classes.