z3smtoptimathsat

Incremental Learning using MAXSMT


Can we use the previous solution of a MaxSMT solver (optimize) in an incremental way in z3? Also, Is there any way to print out the soft assertions on the optimizer?


Solution

  • The answer is YES if you are asking whether it is technically possible to run either z3 or OptiMathSAT incrementally with a MaxSMT problem. (Use the API).

    All soft-clauses with the same id --at the moment in which one performs a check-sat-- are considered part of the same MaxSMT goal. In essence, the OMT solver evaluates the relevant set of soft-clauses of a MaxSMT goal lazily. This holds for both z3 and OptiMathSAT.

    An optimal solution found at an early stage may be far away from the optimal solution of later stages of the iterative process.

    When dealing with a MaxSMT problem, the ability of an OMT solver to reuse learned clauses across incremental calls may depend on the optimization algorithm that is being used.

    I see two possible cases: