30 set(ID_value, _value);
47 std::size_t string_size=str.size()+1;
49 bool char_is_unsigned=
char_type.
id()==ID_unsignedbv;
57 exprt::operandst::iterator it=dest.operands().begin();
58 for(std::size_t i=0; i<string_size; i++, it++)
61 int ch=i==string_size-1?0:str[i];
64 ch = (
unsigned char)ch;
71 return std::move(dest).with_source_location(*
this);
bitvector_typet char_type()
bitvector_typet c_index_type()
Array constructor from list of elements.
dstringt has one field, an unsigned integer no which is an index into a static table of strings.
Base class for all expressions.
typet & type()
Return the type of the expression.
void set(const irep_idt &name, const irep_idt &value)
const irep_idt & id() const
const std::string & get_string(const irep_idt &name) const
An expression without operands.
const irep_idt & value() const
const array_typet & type() const
array_exprt to_array_expr() const
convert string into array constant
string_constantt(const irep_idt &)
const typet & char_type() const
The type of an expression, extends irept.
API to expression classes.
const array_typet & to_array_type(const typet &type)
Cast a typet to an array_typet.
static array_typet make_type(const irep_idt &value)