36 "convert_constant: unexpected operand width",
61 for(std::size_t
i=0;
i<width;
i++)
78 for(std::size_t
i=0;
i<width;
i++)
91 for(std::size_t
i=0;
i<elements.size();
i++)
92 if(elements[
i].
id()==value)
101 binary.size() * 2 == width,
102 "wrong value length in constant",
105 for(std::size_t
i=0;
i<
binary.size();
i++)
135 "unknown character in Verilog constant",
ait supplies three of the four components needed: an abstract interpreter (in this case handling func...
virtual const bvt & convert_bv(const exprt &expr, const optionalt< std::size_t > expected_width=nullopt)
Convert expression to vector of literalts, using an internal cache to speed up conversion if availabl...
virtual bvt convert_constant(const constant_exprt &expr)
numberingt< irep_idt > string_numbering
bvt conversion_failed(const exprt &expr)
Print that the expression of x has failed conversion, then return a vector of x's width.
virtual std::size_t boolbv_width(const typet &type) const
static bvt build_constant(const mp_integer &i, std::size_t width)
A constant literal expression.
const irep_idt & get_value() const
dstringt has one field, an unsigned integer no which is an index into a static table of strings.
const irept::subt & elements() const
typet & type()
Return the type of the expression.
number_type number(const key_type &a)
mp_integer get_from() const
The type of an expression, extends irept.
#define forall_operands(it, expr)
const std::string & id2string(const irep_idt &d)
static std::string binary(const constant_exprt &src)
std::vector< literalt > bvt
literalt const_literal(bool value)
const mp_integer string2integer(const std::string &n, unsigned base)
const std::string integer2binary(const mp_integer &n, std::size_t width)
#define DATA_INVARIANT_WITH_DIAGNOSTICS(CONDITION, REASON,...)
const range_typet & to_range_type(const typet &type)
Cast a typet to a range_typet.
const enumeration_typet & to_enumeration_type(const typet &type)
Cast a typet to a enumeration_typet.