From e1190ea3874d1a4048dddd281ea2f0b0e4c76824 Mon Sep 17 00:00:00 2001 From: Andrew Reynolds Date: Mon, 29 Apr 2024 14:34:55 -0500 Subject: [PATCH] Improve evaluator for bvsize (#10575) Taken from proof-new, required for reconstruction of BV rewrites. --- src/theory/evaluator.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/theory/evaluator.cpp b/src/theory/evaluator.cpp index 15ea4ee37ba..ccd21e2d0f8 100644 --- a/src/theory/evaluator.cpp +++ b/src/theory/evaluator.cpp @@ -309,11 +309,14 @@ EvalResult Evaluator::evalInternal( needsReconstruct = false; Trace("evaluator") << "Evaluator: now after substitution + rewriting: " << currNodeVal << std::endl; - if (currNodeVal.getNumChildren() > 0) + if (currNodeVal.getNumChildren() > 0 + && currNodeVal.getKind() != Kind::BITVECTOR_SIZE) { // We may continue with a valid EvalResult at this point only if // we have no children. We must otherwise fail here since some of // our children may not have successful evaluations. + // bvsize is a rare exception to this, where the evaluation does + // not depend on the value of the argument. results[currNode] = EvalResult(); evalAsNode[currNode] = currNodeVal; continue;