From: Andrew Reynolds Date: Fri, 4 Dec 2020 18:26:12 +0000 (-0600) Subject: Fix bug in hasBoundVar (#5600) X-Git-Tag: cvc5-1.0.0~2500 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=144b9610867ad4ea021f690f25151e60ab6bce65;p=cvc5.git Fix bug in hasBoundVar (#5600) Led to issues while debugging another issue related to free variables in assumptions. --- diff --git a/src/expr/node_algorithm.cpp b/src/expr/node_algorithm.cpp index 9d1c6ab41..f41bef37b 100644 --- a/src/expr/node_algorithm.cpp +++ b/src/expr/node_algorithm.cpp @@ -261,7 +261,11 @@ bool hasBoundVar(TNode n) { for (auto i = n.begin(); i != n.end() && !hasBv; ++i) { - hasBv = hasBoundVar(*i); + if (hasBoundVar(*i)) + { + hasBv = true; + break; + } } } if (!hasBv && n.hasOperator())