Go to the documentation of this file.
44 op.reserve(op.size()+2);
61 op.reserve(op.size()+3);
85 return id()==ID_constant;
94 get(ID_value)!=ID_false;
103 get(ID_value)==ID_false;
112 set(ID_value, value?ID_true:ID_false);
119 return type().
id()==ID_bool;
137 if(type_id==ID_integer || type_id==ID_natural)
141 else if(type_id==ID_rational)
149 type_id == ID_unsignedbv || type_id == ID_signedbv ||
150 type_id == ID_c_bool || type_id == ID_c_bit_field)
154 else if(type_id==ID_fixedbv)
159 else if(type_id==ID_floatbv)
164 else if(type_id==ID_pointer)
187 if(type_id==ID_integer || type_id==ID_natural)
194 else if(type_id==ID_rational)
199 return rat_value.
is_one();
201 else if(type_id==ID_unsignedbv || type_id==ID_signedbv)
209 else if(type_id==ID_fixedbv)
214 else if(type_id==ID_floatbv)
248 std::stack<exprt *>
stack;
252 while(!
stack.empty())
266 std::stack<const exprt *>
stack;
270 while(!
stack.empty())
dstringt has one field, an unsigned integer no which is an index into a static table of strings.
void move_to_operands(exprt &expr)
Move the given argument to the end of exprt's operands.
const_depth_iteratort depth_cbegin() const
depth_iteratort depth_end()
#define Forall_operands(it, expr)
The type of an expression, extends irept.
const mp_integer string2integer(const std::string &n, unsigned base)
void make_bool(bool value)
Replace the expression by a Boolean expression representing value.
Base class for all expressions.
bool is_true() const
Return whether the expression is a constant representing true.
void visit(class expr_visitort &visitor)
bool is_false() const
Return whether the expression is a constant representing false.
typet & type()
Return the type of the expression.
const std::string & id2string(const irep_idt &d)
#define forall_operands(it, expr)
const source_locationt & find_source_location() const
Get a source_locationt from the expression or from its operands (non-recursively).
const std::string & id_string() const
const irep_idt & id() const
std::vector< exprt > operandst
std::size_t get_width() const
bool is_zero() const
Return whether the expression is a constant representing 0.
const irep_idt & get(const irep_namet &name) const
const_depth_iteratort depth_cend() const
bool value_is_zero_string() const
depth_iteratort depth_begin()
void set(const irep_namet &name, const irep_idt &value)
bool is_constant() const
Return whether the expression is a constant.
const_unique_depth_iteratort unique_depth_cend() const
bool is_one() const
Return whether the expression is a constant representing 1.
const irept & get_nil_irep()
void make_typecast(const typet &_type)
Create a typecast_exprt to the given type.
Semantic type conversion.
const_unique_depth_iteratort unique_depth_begin() const
const_unique_depth_iteratort unique_depth_cbegin() const
A constant literal expression.
const_unique_depth_iteratort unique_depth_end() const
bool is_boolean() const
Return whether the expression represents a Boolean.
const irep_idt & get_value() const
const source_locationt & source_location() const
const bitvector_typet & to_bitvector_type(const typet &type)
Cast a typet to a bitvector_typet.
const constant_exprt & to_constant_expr(const exprt &expr)
Cast an exprt to a constant_exprt.
#define CHECK_RETURN(CONDITION)