21 for(bvt::const_iterator it=op.begin(); it!=op.end(); it++)
25 one_seen=
prop.
lor(*it, one_seen);
28 if(expr.
id()==ID_onehot)
29 return prop.
land(one_seen, !more_than_one_seen);
33 expr.
id() == ID_onehot0,
34 "should be a onehot0 expression as other onehot expression kind has been "
35 "handled in other branch");
36 return !more_than_one_seen;
virtual literalt convert_onehot(const unary_exprt &expr)
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...
const irep_idt & id() const
virtual literalt land(literalt a, literalt b)=0
virtual literalt lor(literalt a, literalt b)=0
Generic base class for unary expressions.
std::vector< literalt > bvt
literalt const_literal(bool value)
#define PRECONDITION(CONDITION)