From: Andrew Reynolds Date: Tue, 8 Feb 2022 15:02:38 +0000 (-0600) Subject: Fix LFSC node conversion for non-shared selectors (#8078) X-Git-Tag: cvc5-1.0.0~437 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d61130f800aa7307642080f7a12c99b8d9de046f;p=cvc5.git Fix LFSC node conversion for non-shared selectors (#8078) --- diff --git a/src/proof/lfsc/lfsc_node_converter.cpp b/src/proof/lfsc/lfsc_node_converter.cpp index 8edbb7dc7..1ff5d2a0f 100644 --- a/src/proof/lfsc/lfsc_node_converter.cpp +++ b/src/proof/lfsc/lfsc_node_converter.cpp @@ -924,17 +924,19 @@ Node LfscNodeConverter::getOperatorOfTerm(Node n, bool macroApply) } else if (k == APPLY_SELECTOR) { - unsigned index = DType::indexOf(op); - const DType& dt = DType::datatypeOf(op); - unsigned cindex = DType::cindexOf(op); - std::stringstream sss; - sss << dt[cindex][index].getSelector(); - opName << getNameForUserName(sss.str()); - } - else if (k == APPLY_SELECTOR_TOTAL) - { - ret = maybeMkSkolemFun(op, macroApply); - Assert(!ret.isNull()); + if (k == APPLY_SELECTOR_TOTAL) + { + ret = maybeMkSkolemFun(op, macroApply); + } + if (ret.isNull()) + { + unsigned index = DType::indexOf(op); + const DType& dt = DType::datatypeOf(op); + unsigned cindex = DType::cindexOf(op); + std::stringstream sss; + sss << dt[cindex][index].getSelector(); + opName << getNameForUserName(sss.str()); + } } else if (k == SET_SINGLETON || k == BAG_MAKE) {