25 throw "mult without operands";
29 bool no_overflow=expr.
id()==
"no-overflow-mult";
31 if(expr.
type().
id()==ID_fixedbv)
34 throw "multiplication with mixed types";
39 throw "convert_mult: unexpected operand width";
41 std::size_t fraction_bits=
44 for(exprt::operandst::const_iterator it=operands.begin()+1;
45 it!=operands.end(); it++)
47 if(it->type()!=expr.
type())
48 throw "multiplication with mixed types";
56 throw "convert_mult: unexpected operand width";
63 bv.erase(bv.begin(), bv.begin()+fraction_bits);
68 else if(expr.
type().
id()==ID_unsignedbv ||
69 expr.
type().
id()==ID_signedbv)
72 throw "multiplication with mixed types";
81 throw "convert_mult: unexpected operand width";
83 for(exprt::operandst::const_iterator it=operands.begin()+1;
84 it!=operands.end(); it++)
86 if(it->type()!=expr.
type())
87 throw "multiplication with mixed types";
92 throw "convert_mult: unexpected operand width";
bvt multiplier_no_overflow(const bvt &op0, const bvt &op1, representationt rep)
boolbv_widtht boolbv_width
virtual bvt convert_mult(const exprt &expr)
const irep_idt & id() const
virtual const bvt & convert_bv(const exprt &expr)
bvt signed_multiplier(const bvt &op0, const bvt &op1)
bvt multiplier(const bvt &op0, const bvt &op1, representationt rep)
void conversion_failed(const exprt &expr, bvt &bv)
std::vector< exprt > operandst
const fixedbv_typet & to_fixedbv_type(const typet &type)
Cast a generic typet to a fixedbv_typet.
Base class for all expressions.
bvt sign_extension(const bvt &bv, std::size_t new_size)
std::vector< literalt > bvt