Assert multiple constraints into the solver, and track them (in the unsat) core using the Boolean constants in ps. Remarks: This API is an alternative to #check() with assumptions for extracting unsat cores. Both APIs can be used in the same solver. The unsat core will contain a combination
(Expr<BoolSort>[] constraints, Expr<BoolSort>[] ps)
| 151 | * provided using {@link #check()} with assumptions. |
| 152 | **/ |
| 153 | public void assertAndTrack(Expr<BoolSort>[] constraints, Expr<BoolSort>[] ps) |
| 154 | { |
| 155 | getContext().checkContextMatch(constraints); |
| 156 | getContext().checkContextMatch(ps); |
| 157 | if (constraints.length != ps.length) { |
| 158 | throw new Z3Exception("Argument size mismatch"); |
| 159 | } |
| 160 | |
| 161 | for (int i = 0; i < constraints.length; i++) { |
| 162 | Native.solverAssertAndTrack(getContext().nCtx(), getNativeObject(), |
| 163 | constraints[i].getNativeObject(), ps[i].getNativeObject()); |
| 164 | } |
| 165 | } |
| 166 | |
| 167 | /** |
| 168 | * Assert a constraint into the solver, and track it (in the unsat) core |
no test coverage detected