3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-27 10:55:50 +00:00

fix at-most-1 constraint compiler bug

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2016-10-22 21:50:45 -07:00
parent 23b9d3ef55
commit e32e0d460d
6 changed files with 46 additions and 24 deletions

View file

@ -6802,8 +6802,7 @@ class Optimize(Z3PPObject):
def objectives(self):
"""returns set of objective functions"""
num = Z3_optimize_get_num_objectives(self.ctx.ref(), self.optimize)
return [_to_expr_ref(Z3_optimize_get_objective(self.ctx.ref(), self.optimize, i), self.ctx) for i in range(num)]
return AstVector(Z3_optimize_get_objectives(self.ctx.ref(), self.optimize), self.ctx)
def __repr__(self):
"""Return a formatted string with all added rules and constraints."""