From 234bd18c7b827c53317c3a52497ec5016bb27ec6 Mon Sep 17 00:00:00 2001 From: Ahmed Irfan <43099566+ahmed-irfan@users.noreply.github.com> Date: Wed, 2 Oct 2024 11:00:51 -0700 Subject: [PATCH] check cached value if it must be decided (#531) --- src/mcsat/nra/nra_plugin.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/mcsat/nra/nra_plugin.c b/src/mcsat/nra/nra_plugin.c index fca8c4e2d..4b5693c98 100644 --- a/src/mcsat/nra/nra_plugin.c +++ b/src/mcsat/nra/nra_plugin.c @@ -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; } }