Skip to content

Commit

Permalink
asserts
Browse files Browse the repository at this point in the history
  • Loading branch information
ahmed-irfan committed Nov 1, 2023
1 parent eb52eef commit bdd5e40
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/api/yices_api.c
Original file line number Diff line number Diff line change
Expand Up @@ -9267,6 +9267,8 @@ EXPORTED smt_status_t yices_check_context_with_model_and_hint(context_t *ctx, co
return STATUS_ERROR;
}

assert(m <= n);

// cleanup
switch (context_status(ctx)) {
case STATUS_UNKNOWN:
Expand Down
2 changes: 2 additions & 0 deletions src/context/context_solver.c
Original file line number Diff line number Diff line change
Expand Up @@ -638,6 +638,8 @@ smt_status_t check_context_with_model(context_t *ctx, const param_t *params, mod
* - set the model hint and call check_context_with_model
*/
smt_status_t check_context_with_model_and_hint(context_t *ctx, const param_t *params, model_t* mdl, uint32_t n, const term_t t[], uint32_t m) {
assert(m <= n);

mcsat_set_model_hint(ctx->mcsat, mdl, n, t);

return check_context_with_model(ctx, params, mdl, m, t);
Expand Down

0 comments on commit bdd5e40

Please sign in to comment.