Skip to content

Commit

Permalink
Fix mcsat-initial-var-order (#507)
Browse files Browse the repository at this point in the history
* Update solver.c

* fix
  • Loading branch information
ahmed-irfan authored Apr 11, 2024
1 parent 184a969 commit 3b93035
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
4 changes: 4 additions & 0 deletions src/context/context.c
Original file line number Diff line number Diff line change
Expand Up @@ -5830,6 +5830,9 @@ void reset_context(context_t *ctx) {

reset_gate_manager(&ctx->gate_manager);

ivector_reset(&ctx->mcsat_var_order);
ivector_reset(&ctx->mcsat_initial_var_order);

reset_intern_tbl(&ctx->intern);
ivector_reset(&ctx->top_eqs);
ivector_reset(&ctx->top_atoms);
Expand Down Expand Up @@ -6691,3 +6694,4 @@ void context_gc_mark(context_t *ctx) {
mcsat_gc_mark(ctx->mcsat);
}
}

1 change: 0 additions & 1 deletion src/context/context.h
Original file line number Diff line number Diff line change
Expand Up @@ -494,5 +494,4 @@ extern bval_t context_bool_term_value(context_t *ctx, term_t t);
extern void context_gc_mark(context_t *ctx);



#endif /* __CONTEXT_H */
2 changes: 2 additions & 0 deletions src/mcsat/solver.c
Original file line number Diff line number Diff line change
Expand Up @@ -2643,8 +2643,10 @@ void mcsat_set_initial_var_order(mcsat_solver_t* mcsat) {
uint32_t i;
for (i = 0; i < n; ++n) {
term_t x = vars->data[i];
assert(term_kind(mcsat->terms, x) == UNINTERPRETED_TERM || term_kind(mcsat->terms, x) == VARIABLE);
variable_t v = variable_db_get_variable(mcsat->var_db, unsigned_term(x));
int_queue_push(&mcsat->hinted_decision_vars, v);
mcsat_process_registration_queue(mcsat);
}
}

Expand Down

0 comments on commit 3b93035

Please sign in to comment.