110 for(
const auto &op : src.
operands())
151 return os << src.
pretty();
154 return os <<
'(' <<
format(src.
op()) <<
')';
162 auto type = src.
type().
id();
169 return os <<
"false";
171 return os << src.
pretty();
189 return os <<
"INVALID-POINTER";
208 return os << src.
pretty();
217 os <<
' ' << s.first <<
"=\"" << s.second.id() <<
'"';
224 for(
const auto &op : expr.
operands())
249 std::function<std::ostream &(std::ostream &,
const exprt &)>;
250 using expr_mapt = std::unordered_map<irep_idt, formattert>;
270 [](std::ostream &os,
const exprt &expr) -> std::ostream & {
280 auto binary_expr = [](std::ostream &os,
const exprt &expr) -> std::ostream & {
294 auto unary_expr = [](std::ostream &os,
const exprt &expr) -> std::ostream & {
302 [](std::ostream &os,
const exprt &expr) -> std::ostream & {
307 [](std::ostream &os,
const exprt &expr) -> std::ostream & {
309 <<
format(expr.type()) <<
')';
313 [](std::ostream &os,
const exprt &expr) -> std::ostream & {
323 auto byte_update = [](std::ostream &os,
const exprt &expr) -> std::ostream & {
335 [](std::ostream &os,
const exprt &expr) -> std::ostream & {
341 [](std::ostream &os,
const exprt &expr) -> std::ostream & {
346 [](std::ostream &os,
const exprt &expr) -> std::ostream & {
353 [](std::ostream &os,
const exprt &expr) -> std::ostream & {
358 [](std::ostream &os,
const exprt &expr) -> std::ostream & {
373 [](std::ostream &os,
const exprt &expr) -> std::ostream & {
394 const auto &values =
let_expr.values();
411 [](std::ostream &os,
const exprt &expr) -> std::ostream & {
431 auto compound = [](std::ostream &os,
const exprt &expr) -> std::ostream & {
436 for(
const auto &op : expr.operands())
460 [](std::ostream &os,
const exprt &expr) -> std::ostream & {
461 return os <<
'"' << expr.get_string(
ID_value) <<
'"';
465 [](std::ostream &os,
const exprt &expr) -> std::ostream & {
482 [](std::ostream &os,
const exprt &expr) -> std::ostream & {
485 if(dereference_expr.pointer().id() !=
ID_symbol)
486 os <<
'(' <<
format(dereference_expr.pointer()) <<
')';
488 os <<
format(dereference_expr.pointer());
492 fallback = [](std::ostream &os,
const exprt &expr) -> std::ostream & {
Expression classes for byte-level operators.
const byte_update_exprt & to_byte_update_expr(const exprt &expr)
const byte_extract_exprt & to_byte_extract_expr(const exprt &expr)
pointer_typet pointer_type(const typet &subtype)
ait supplies three of the four components needed: an abstract interpreter (in this case handling func...
A base class for binary expressions.
std::size_t get_width() const
A constant literal expression.
const irep_idt & get_value() const
Base class for all expressions.
bool has_operands() const
Return true if there is at least one operand.
bool is_true() const
Return whether the expression is a constant representing true.
bool is_false() const
Return whether the expression is a constant representing false.
bool is_zero() const
Return whether the expression is a constant representing 0.
typet & type()
Return the type of the expression.
std::string pretty(unsigned indent=0, unsigned max_indent=0) const
const irep_idt & id() const
named_subt & get_named_sub()
irep_idt get_component_name() const
A base class for multi-ary expressions Associativity is not specified.
const typet & base_type() const
The type of the data what we point to.
const irep_idt & get_identifier() const
Generic base class for unary expressions.
bool has_prefix(const std::string &s, const std::string &prefix)
const std::string & id2string(const irep_idt &d)
API to expression classes for 'mathematical' expressions.
const quantifier_exprt & to_quantifier_expr(const exprt &expr)
Cast an exprt to a quantifier_exprt.
const function_application_exprt & to_function_application_expr(const exprt &expr)
Cast an exprt to a function_application_exprt.
const lambda_exprt & to_lambda_expr(const exprt &expr)
Cast an exprt to a lambda_exprt.
const std::string integer2string(const mp_integer &n, unsigned base)
API to expression classes for Pointers.
const pointer_typet & to_pointer_type(const typet &type)
Cast a typet to a pointer_typet.
const dereference_exprt & to_dereference_expr(const exprt &expr)
Cast an exprt to a dereference_exprt.
const index_exprt & to_index_expr(const exprt &expr)
Cast an exprt to an index_exprt.
const typecast_exprt & to_typecast_expr(const exprt &expr)
Cast an exprt to a typecast_exprt.
const binary_exprt & to_binary_expr(const exprt &expr)
Cast an exprt to a binary_exprt.
const unary_exprt & to_unary_expr(const exprt &expr)
Cast an exprt to a unary_exprt.
const multi_ary_exprt & to_multi_ary_expr(const exprt &expr)
Cast an exprt to a multi_ary_exprt.
const let_exprt & to_let_expr(const exprt &expr)
Cast an exprt to a let_exprt.
const if_exprt & to_if_expr(const exprt &expr)
Cast an exprt to an if_exprt.
const member_exprt & to_member_expr(const exprt &expr)
Cast an exprt to a member_exprt.
const constant_exprt & to_constant_expr(const exprt &expr)
Cast an exprt to a constant_exprt.
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::string escape(const std::string &s)
Generic escaping of strings; this is not meant to be a particular programming language.