16 if(expr.
id()!=ID_constraint_select_one)
17 throw "expected constraint_select_one expression";
20 throw "constraint_select_one takes at least one operand";
23 throw "constraint_select_one expects matching types";
36 for(
const auto &op : expr.
operands())
40 if(it_bv.size()!=bv.size())
41 throw "constraint_select_one expects matching width";
51 for(
const auto &op : expr.
operands())
59 if(op_bv.size()!=bv.size())
62 for(std::size_t i=0; i<op_bv.size(); i++)
virtual const bvt & convert_bv(const exprt &expr, const std::optional< std::size_t > expected_width={})
Convert expression to vector of literalts, using an internal cache to speed up conversion if availabl...
virtual bvt convert_constraint_select_one(const exprt &expr)
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
literalt equal(const bvt &op0, const bvt &op1)
Bit-blasting ID_equal and use in other encodings.
Base class for all expressions.
std::vector< exprt > operandst
typet & type()
Return the type of the expression.
const irep_idt & id() const
virtual literalt lselect(literalt a, literalt b, literalt c)=0
void lcnf(literalt l0, literalt l1)
virtual bvt new_variables(std::size_t width)
generates a bitvector of given width with new variables
virtual literalt new_variable()=0
virtual bool has_set_to() const
std::vector< literalt > bvt
const multi_ary_exprt & to_multi_ary_expr(const exprt &expr)
Cast an exprt to a multi_ary_exprt.