mirror of
https://github.com/Z3Prover/z3
synced 2025-04-27 10:55:50 +00:00
fix uninitialized variable m_gc_burst in config, have cuber accept and receive optional vector of variables indicating splits and global autarky as output
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
178211d091
commit
6b258578f9
15 changed files with 121 additions and 100 deletions
|
@ -6313,18 +6313,25 @@ class Solver(Z3PPObject):
|
|||
consequences = [ consequences[i] for i in range(sz) ]
|
||||
return CheckSatResult(r), consequences
|
||||
|
||||
def cube(self):
|
||||
def cube(self, vars = None):
|
||||
"""Get set of cubes"""
|
||||
self.cube_vs = AstVector(None, self.ctx)
|
||||
if vars is not None:
|
||||
for v in vars:
|
||||
self.cube_vs.push(v)
|
||||
while True:
|
||||
lvl = self.backtrack_level
|
||||
self.backtrack_level = 4000000000
|
||||
r = AstVector(Z3_solver_cube(self.ctx.ref(), self.solver, lvl), self.ctx)
|
||||
r = AstVector(Z3_solver_cube(self.ctx.ref(), self.solver, self.cube_vs.vector, lvl), self.ctx)
|
||||
if (len(r) == 1 and is_false(r[0])):
|
||||
return
|
||||
yield r
|
||||
return
|
||||
yield r
|
||||
if (len(r) == 0):
|
||||
return
|
||||
|
||||
def cube_vars(self):
|
||||
return self.cube_vs
|
||||
|
||||
def proof(self):
|
||||
"""Return a proof for the last `check()`. Proof construction must be enabled."""
|
||||
return _to_expr_ref(Z3_solver_get_proof(self.ctx.ref(), self.solver), self.ctx)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue