I'm trying to solve some smt equations with Z3 OCaml api.
I need to add some soft constraint using Z3.Optimize.add_soft
function, but I don't know what the parameters of the function mean and cannot find any description or example for that.
Merlin just type that Z3.Optimize.add_soft : Z3.Optimize.optimize -> Z3.Expr.expr -> string -> Z3.Symbol.symbol -> Z3.Optimize.handle
, and I found some descriptions in this page, but I don't know how to add option that means :weight 10
, for example.
In other words, I want to call Z3.Optimize.add_soft
function as following smt2 format
(assert-soft e :weight 10)
Thank you!