Skip to content

Commit

Permalink
check cached value if it must be decided (#531)
Browse files Browse the repository at this point in the history
  • Loading branch information
ahmed-irfan authored Oct 2, 2024
1 parent f13608a commit 234bd18
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/mcsat/nra/nra_plugin.c
Original file line number Diff line number Diff line change
Expand Up @@ -1130,10 +1130,14 @@ void nra_plugin_decide(plugin_t* plugin, variable_t x, trail_token_t* decide_tok
// Decide if not too complex of a rational number
bool decide = true;
if (!must) {
if (!lp_value_is_rational(&x_new_lpvalue)) {
if (lp_upolynomial_degree(x_new_lpvalue.value.a.f) > 2) {
if (using_cached) {
if (!lp_value_is_rational(&x_cached_value->lp_value) &&
lp_upolynomial_degree(x_cached_value->lp_value.value.a.f) > 2) {
decide = false;
}
} else if (!lp_value_is_rational(&x_new_lpvalue) &&
lp_upolynomial_degree(x_new_lpvalue.value.a.f) > 2) {
decide = false;
}
}

Expand Down

0 comments on commit 234bd18

Please sign in to comment.