mirror of
https://github.com/Z3Prover/z3
synced 2025-04-27 10:55:50 +00:00
add backtrack level to cuber interface
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
0a9946578b
commit
75b8d10f48
22 changed files with 53 additions and 40 deletions
|
@ -6283,19 +6283,16 @@ class Solver(Z3PPObject):
|
|||
consequences = [ consequences[i] for i in range(sz) ]
|
||||
return CheckSatResult(r), consequences
|
||||
|
||||
def cube(self):
|
||||
def cube(self, level_ref):
|
||||
"""Get set of cubes"""
|
||||
rounds = 0
|
||||
while True:
|
||||
r = _to_expr_ref(Z3_solver_cube(self.ctx.ref(), self.solver), self.ctx)
|
||||
backtrack_level = level_ref.backtrack_level
|
||||
r = _to_expr_ref(Z3_solver_cube(self.ctx.ref(), self.solver, backtrack_level), self.ctx)
|
||||
if (is_false(r)):
|
||||
if (rounds == 0):
|
||||
yield r
|
||||
return
|
||||
if (is_true(r)):
|
||||
yield r
|
||||
return
|
||||
rounds += 1
|
||||
yield r
|
||||
|
||||
def proof(self):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue