I'm trying to create a constraint such that a value X is one of the members of the expr_vector such as,
context c;
expr_vector v(c);
expr x = c.int_const("x");
expr i1 = c.int_val(5);
expr i2 = c.int_val(7);
solver s(c);
s.add(x == i1 || x == i2); // this is what I want to create iteratively
I tried to create an expression by looping on expr_vector v to create the boolean expression but I failed.
What I basically want is to be able to write such an expression.
v.push_back(i1);
v.push_back(i2);
s.add(belongs(x, v));