ESBMC
Efficient SMT-based Context-Bounded Model Checker
Loading...
Searching...
No Matches
irep2_expr.cpp File Reference
#include <memory>
#include <charconv>
#include <unordered_map>
#include <util/arith/fixedbv.h>
#include <util/base/i2string.h>
#include <util/arith/ieee_float.h>
#include <irep2/irep2_type.h>
#include <irep2/irep2_expr.h>
#include <irep2/irep2_utils.h>
#include <irep2/irep2_dispatch.h>
#include <util/message/format.h>
#include <util/irep/migrate.h>
#include <irep2/expr_kinds.inc>
Include dependency graph for irep2_expr.cpp:

Macros

#define IREP2_EXPR(kind, pretty)
#define IREP2_EXPR(kind, _)
#define IREP2_EXPR(kind, _)
#define IREP2_EXPR(kind, _)
#define IREP2_EXPR(kind, _)
#define IREP2_EXPR(kind, _)
#define IREP2_EXPR(kind, _)
#define IREP2_EXPR(kind, _)
#define IREP2_EXPR(kind, _)
#define IREP2_EXPR(kind, _)

Functions

void irep2_bad_expr_cast (unsigned actual, unsigned expected, const char *target)
std::string get_expr_id (const expr2t &expr)
 Fetch string identifier for an expression.
static void assert_type_compat_for_with (const type2tc &a, const type2tc &b)
printf_kindt printf_kind_from_name (const irep_idt &name)
 Maps the textual base_name of a printf-family symbol (e.g.
void assert_arith_2ops_consistency (const type2tc &t, expr2t::expr_ids id, const expr2tc &v1, const expr2tc &v2)
 Debug-only consistency check for arith_2ops operands and result type.

Variables

static const char * expr_names []

Macro Definition Documentation

◆ IREP2_EXPR [1/10]

#define IREP2_EXPR ( kind,
_ )
Value:
case kind##_id: \
static_cast<kind##2t &>(*this), f);
void generic_foreach_operand_impl(K &a, expr2t::op_delegate &f)
Definition irep2_dispatch.h:314

◆ IREP2_EXPR [2/10]

#define IREP2_EXPR ( kind,
_ )
Value:
case kind##_id: \
static_cast<const kind##2t &>(*this), f);
void generic_foreach_operand_impl_const(const K &a, expr2t::const_op_delegate &f)
Definition irep2_dispatch.h:302

◆ IREP2_EXPR [3/10]

#define IREP2_EXPR ( kind,
_ )
Value:
case kind##_id: \
static_cast<const kind##2t &>(*this));
size_t generic_get_num_sub_exprs(const K &a)
Definition irep2_dispatch.h:289

◆ IREP2_EXPR [4/10]

#define IREP2_EXPR ( kind,
_ )
Value:
case kind##_id: \
static_cast<const kind##2t &>(*this), idx);
const expr2tc * generic_get_sub_expr(const K &a, size_t idx)
Definition irep2_dispatch.h:273

◆ IREP2_EXPR [5/10]

#define IREP2_EXPR ( kind,
_ )
Value:
case kind##_id: \
static_cast<const kind##2t &>(*this), indent);
list_of_memberst generic_tostring(const K &a, unsigned int indent)
Definition irep2_dispatch.h:250

◆ IREP2_EXPR [6/10]

#define IREP2_EXPR ( kind,
_ )
Value:
case kind##_id: \
if constexpr (supports_with_type_v<kind##2t>) \
return rebuild_with_type( \
static_cast<const kind##2t &>(*this), new_type); \
else \
with_type_unsupported(*this);

◆ IREP2_EXPR [7/10]

#define IREP2_EXPR ( kind,
_ )
Value:
case kind##_id: \
return make_irep<kind##2t>(static_cast<const kind##2t &>(*this));
irep_container< typename T::base_type > make_irep(Args &&...args)
Allocate a fresh irep2 node and adopt it into an irep_container.
Definition irep2.h:451

◆ IREP2_EXPR [8/10]

#define IREP2_EXPR ( kind,
_ )
Value:
case kind##_id: \
return esbmct::generic_lt(static_cast<const kind##2t &>(*this), o);
int generic_lt(const K &a, const expr2t &o)
Definition irep2_dispatch.h:231

◆ IREP2_EXPR [9/10]

#define IREP2_EXPR ( kind,
_ )
Value:
case kind##_id: \
return esbmct::generic_cmp(static_cast<const kind##2t &>(*this), o);
bool generic_cmp(const K &a, const expr2t &o)
Definition irep2_dispatch.h:215

◆ IREP2_EXPR [10/10]

#define IREP2_EXPR ( kind,
pretty )
Value:
pretty,

Function Documentation

◆ assert_arith_2ops_consistency()

void assert_arith_2ops_consistency ( const type2tc & t,
expr2t::expr_ids id,
const expr2tc & v1,
const expr2tc & v2 )

Debug-only consistency check for arith_2ops operands and result type.

Called from add2t/sub2t/mul2t/div2t/modulus2t constructors; no-op in Release.

◆ assert_type_compat_for_with()

void assert_type_compat_for_with ( const type2tc & a,
const type2tc & b )
static

◆ get_expr_id()

std::string get_expr_id ( const expr2t & expr)

Fetch string identifier for an expression.

Parameters
exprExpression to operate upon
Returns
String containing class name of expression.

◆ irep2_bad_expr_cast()

void irep2_bad_expr_cast ( unsigned actual,
unsigned expected,
const char * target )

◆ printf_kind_from_name()

printf_kindt printf_kind_from_name ( const irep_idt & name)

Maps the textual base_name of a printf-family symbol (e.g.

"printf", "snprintf") onto a printf_kindt. Aborts on an unknown name.

Variable Documentation

◆ expr_names

const char* expr_names[]
static