3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-06-08 15:13:23 +00:00

add assert_and_track to optimize for #2116

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2019-02-01 14:59:36 -08:00
parent d1877f58a5
commit 6c464f8aec
5 changed files with 69 additions and 35 deletions

View file

@ -79,6 +79,16 @@ extern "C" {
Z3_CATCH;
}
void Z3_API Z3_optimize_assert_and_track(Z3_context c, Z3_optimize o, Z3_ast a, Z3_ast t) {
Z3_TRY;
LOG_Z3_optimize_assert_and_track(c, o, a, t);
RESET_ERROR_CODE();
CHECK_FORMULA(a,);
CHECK_FORMULA(t,);
to_optimize_ptr(o)->add_hard_constraint(to_expr(a), to_expr(t));
Z3_CATCH;
}
unsigned Z3_API Z3_optimize_assert_soft(Z3_context c, Z3_optimize o, Z3_ast a, Z3_string weight, Z3_symbol id) {
Z3_TRY;
LOG_Z3_optimize_assert_soft(c, o, a, weight, id);