Suppose I have the following constraints
(declare-fun x () Bool)
(declare-fun y () Bool)
(declare-fun t1 () (_ BitVec 8))
(declare-fun t2 () (_ BitVec 8))
(assert (or x y))
(assert (=> x (bvule t1 t2)))
(assert (=> y (bvule t2 t1)))
(check-sat)
How to write the corresponding code in c/c++ interface of stp? My application requires to solve a constraint set similar to this. Any help is appreciated.
See the C API testcases. There are a number of small, easy to read examples for how to use STP's C interface. Here is push-pop.c.
This corresponds to the smt query:
Once you have gotten a couple of these working, you can take a look at the c interface header for how to construct different operators.