28 REQUIRE(expr.
id()==ID_index);
33 REQUIRE(index_integer_value==expected_index);
43 REQUIRE(expr.
id()==ID_index);
45 REQUIRE(index_expr.
index().
id()==ID_nil);
58 REQUIRE(expr.
id()==ID_member);
82 REQUIRE(expr.
id() == ID_symbol);
91 REQUIRE(expr.
id() == ID_typecast);
101 const irep_idt &side_effect_statement)
103 REQUIRE(expr.
id() == ID_side_effect);
105 REQUIRE(side_effect_expr.
get_statement() == side_effect_statement);
106 return side_effect_expr;
dstringt has one field, an unsigned integer no which is an index into a static table of strings.
Base class for all expressions.
bool is_constant() const
Return whether the expression is a constant.
const irep_idt & id() const
Extract member of struct or union.
irep_idt get_component_name() const
An expression containing a side effect.
const irep_idt & get_statement() const
Expression to hold a symbol (variable)
const irep_idt & get_identifier() const
Semantic type conversion.
side_effect_exprt require_side_effect_expr(const exprt &expr, const irep_idt &side_effect_statement)
Verify a given exprt is a side_effect_exprt with appropriate statement.
typecast_exprt require_typecast(const exprt &expr)
Verify a given exprt is a typecast_expr.
index_exprt require_index(const exprt &expr, int expected_index)
Verify a given exprt is an index_exprt with a a constant value equal to the expected value.
member_exprt require_member(const exprt &expr, const irep_idt &component_identifier)
Verify a given exprt is an member_exprt with a component name equal to the component_identifier.
index_exprt require_top_index(const exprt &expr)
Verify a given exprt is an index_exprt with a nil value as its index.
symbol_exprt require_symbol(const exprt &expr, const irep_idt &symbol_name)
Verify a given exprt is an symbol_exprt with a identifier name equal to the symbol_name.
Helper functions for requiring specific expressions If the expression is of the wrong type,...
side_effect_exprt & to_side_effect_expr(exprt &expr)
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 typecast_exprt & to_typecast_expr(const exprt &expr)
Cast an exprt to a typecast_exprt.
const member_exprt & to_member_expr(const exprt &expr)
Cast an exprt to a member_exprt.
const index_exprt & to_index_expr(const exprt &expr)
Cast an exprt to an index_exprt.