3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-29 11:55:51 +00:00

reset backtrack level at each cube

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2017-11-09 10:04:32 -08:00
parent ee3ed3a27a
commit cb7e53aae4
2 changed files with 6 additions and 4 deletions

View file

@ -364,9 +364,10 @@ namespace Microsoft.Z3
/// </summary>
public IEnumerable<BoolExpr> Cube()
{
int rounds = 0;
while (true) {
BoolExpr r = (BoolExpr)Expr.Create(Context, Native.Z3_solver_cube(Context.nCtx, NativeObject, BacktrackLevel));
var lvl = BacktrackLevel;
BacktrackLevel = uint.MaxValue;
BoolExpr r = (BoolExpr)Expr.Create(Context, Native.Z3_solver_cube(Context.nCtx, NativeObject, lvl));
if (r.IsFalse) {
break;
}
@ -374,7 +375,6 @@ namespace Microsoft.Z3
yield return r;
break;
}
++rounds;
yield return r;
}
}