MCPcopy Create free account
hub / github.com/Z3Prover/z3 / Z3_optimize_assert_soft

Function Z3_optimize_assert_soft

src/api/api_opt.cpp:93–101  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

91 }
92
93 unsigned Z3_API Z3_optimize_assert_soft(Z3_context c, Z3_optimize o, Z3_ast a, Z3_string weight, Z3_symbol id) {
94 Z3_TRY;
95 LOG_Z3_optimize_assert_soft(c, o, a, weight, id);
96 RESET_ERROR_CODE();
97 CHECK_FORMULA(a,0);
98 rational w(weight);
99 return to_optimize_ptr(o)->add_soft_constraint(to_expr(a), w, to_symbol(id));
100 Z3_CATCH_RETURN(0);
101 }
102
103 unsigned Z3_API Z3_optimize_maximize(Z3_context c, Z3_optimize o, Z3_ast t) {
104 Z3_TRY;

Callers 2

asoftMethod · 0.85
add_softMethod · 0.85

Calls 4

to_optimize_ptrFunction · 0.85
add_soft_constraintMethod · 0.80
to_exprFunction · 0.70
to_symbolFunction · 0.70

Tested by

no test coverage detected