mirror of
https://github.com/Z3Prover/z3
synced 2025-04-29 20:05:51 +00:00
add facility to add lemmas
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
af6ebbcd92
commit
ce592d7716
16 changed files with 111 additions and 21 deletions
|
@ -181,6 +181,21 @@ namespace Microsoft.Z3
|
|||
Native.Z3_solver_assert_and_track(Context.nCtx, NativeObject, constraint.NativeObject, p.NativeObject);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Assert a lemma (or multiple) into the solver.
|
||||
/// </summary>
|
||||
public void AssertLemma(params BoolExpr[] constraints)
|
||||
{
|
||||
Contract.Requires(constraints != null);
|
||||
Contract.Requires(Contract.ForAll(constraints, c => c != null));
|
||||
|
||||
Context.CheckContextMatch<BoolExpr>(constraints);
|
||||
foreach (BoolExpr a in constraints)
|
||||
{
|
||||
Native.Z3_solver_assert_lemma(Context.nCtx, NativeObject, a.NativeObject);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The number of assertions in the solver.
|
||||
/// </summary>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue