I am new to Z3 solver and SMTLib2. I want to obtain expressions for each variable in the constraints. Assume, I have this program.
(declare-const x Int)
(declare-const y Int)
(declare-const z Int)
(assert (= x (+ y 1)))
(assert (= z (+ x 10)))
(check-sat)
(get-value (z))
Using get-value
, I can obtain the value for z
that satisfies all the constraints. But, how can I get the expression for z
. Something like z=y+11
.
I find that using simplify
, I can simplify the constraints but is there anyway to get expression for each variable in the constraints.