mirror of
https://github.com/Z3Prover/z3
synced 2025-04-23 17:15:31 +00:00
snapshot
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
fc3cbcbe02
commit
7afbf8165e
25 changed files with 230 additions and 332 deletions
|
@ -323,15 +323,6 @@ extern "C" {
|
|||
Z3_CATCH;
|
||||
}
|
||||
|
||||
void Z3_API Z3_solver_assert_lemma(Z3_context c, Z3_solver s, Z3_ast a) {
|
||||
Z3_TRY;
|
||||
LOG_Z3_solver_assert_lemma(c, s, a);
|
||||
RESET_ERROR_CODE();
|
||||
init_solver(c, s);
|
||||
CHECK_FORMULA(a,);
|
||||
to_solver_ref(s)->assert_lemma(to_expr(a));
|
||||
Z3_CATCH;
|
||||
}
|
||||
|
||||
Z3_ast_vector Z3_API Z3_solver_get_assertions(Z3_context c, Z3_solver s) {
|
||||
Z3_TRY;
|
||||
|
|
|
@ -239,29 +239,6 @@ namespace Microsoft.Z3
|
|||
Native.Z3_solver_from_string(Context.nCtx, NativeObject, str);
|
||||
}
|
||||
|
||||
/// <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>
|
||||
/// Assert a lemma (or multiple) into the solver.
|
||||
/// </summary>
|
||||
public void AddLemma(IEnumerable<BoolExpr> constraints)
|
||||
{
|
||||
AssertLemma(constraints.ToArray());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The number of assertions in the solver.
|
||||
/// </summary>
|
||||
|
@ -325,6 +302,7 @@ namespace Microsoft.Z3
|
|||
return lboolToStatus(r);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Retrieve fixed assignments to the set of variables in the form of consequences.
|
||||
/// Each consequence is an implication of the form
|
||||
|
|
|
@ -6135,16 +6135,6 @@ extern "C" {
|
|||
*/
|
||||
void Z3_API Z3_solver_assert_and_track(Z3_context c, Z3_solver s, Z3_ast a, Z3_ast p);
|
||||
|
||||
/**
|
||||
\brief add a lemma. A lemma is a assumed to be a consequence of the current assertions.
|
||||
Adding a lemma should therefore be a logical no-op. Solvers are free to ignore lemmas.
|
||||
|
||||
\pre \c a must be a Boolean expression
|
||||
|
||||
def_API('Z3_solver_assert_lemma', VOID, (_in(CONTEXT), _in(SOLVER), _in(AST)))
|
||||
*/
|
||||
void Z3_API Z3_solver_assert_lemma(Z3_context c, Z3_solver s, Z3_ast a);
|
||||
|
||||
/**
|
||||
\brief load solver assertions from a file.
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue