I am interested in MAX-SAT and was hoping Z3 would have this as a built-in feature. Are there any plans to do this in the near future?
In the absence of the above, I have tried using the example maxsat application from the command line. Unfortunately, whenever I do exec.sh "filename.z3", I always get the following response: "checking whether hard constraints are satisfiable...result: 0". What am I doing wrong? I assure you that this response appears to be quite independent of the actual contents of the file.
Finally, the comments in the maxsat example do not clearly specify how to mark constraints as hard or soft. A hard constraint is supposed to be a formula preceded by :formula, and a soft constraint a formula preceded by :assumption. So, to mark "(assert (> x 0))" as soft, where exactly do we put the ":assumption"? (I am have read the query about hard and soft constraints, but the question/response seemed to be more in the context of finding unsatisfiable cores, as opposed to "maximum satisfiable cores" of unsatisfiable formulas.)