I'm trying to use Z3 to determine if an expression is satisfiable. I could easily do this by defining the context then the int_const variables and the formula. To evaluate an expression programmatically you would have to write everything in code. Let's say the logical expression is given in the form of a string, what then? For example,
"x == y && !x == z"
would be expressed in the C API as:
context c;
expr x = c.int_const("x")
//Same for other variables
...
formula = (x == y) && (!x == z);
solver s(c);
s.add(formula);
//s.check() ...etc etc
Okay, I can write the code for this particular formula, but how could I do that programmatically given a string. I'm open to anything you can think of.
Thank you :)