mirror of
https://github.com/Z3Prover/z3
synced 2025-04-29 11:55:51 +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
|
@ -353,6 +353,12 @@ namespace Microsoft.Z3
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Backtrack level that can be adjusted by conquer process
|
||||
/// </summary>
|
||||
public uint BacktrackLevel { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Return a set of cubes.
|
||||
/// </summary>
|
||||
|
@ -360,10 +366,8 @@ namespace Microsoft.Z3
|
|||
{
|
||||
int rounds = 0;
|
||||
while (true) {
|
||||
BoolExpr r = (BoolExpr)Expr.Create(Context, Native.Z3_solver_cube(Context.nCtx, NativeObject));
|
||||
BoolExpr r = (BoolExpr)Expr.Create(Context, Native.Z3_solver_cube(Context.nCtx, NativeObject, BacktrackLevel));
|
||||
if (r.IsFalse) {
|
||||
if (rounds == 0)
|
||||
yield return r;
|
||||
break;
|
||||
}
|
||||
if (r.IsTrue) {
|
||||
|
@ -412,6 +416,7 @@ namespace Microsoft.Z3
|
|||
: base(ctx, obj)
|
||||
{
|
||||
Contract.Requires(ctx != null);
|
||||
this.BacktrackLevel = uint.MaxValue;
|
||||
}
|
||||
|
||||
internal class DecRefQueue : IDecRefQueue
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue