Fix LFSC node conversion for non-shared selectors (#8078)
authorAndrew Reynolds <andrew.j.reynolds@gmail.com>
Tue, 8 Feb 2022 15:02:38 +0000 (09:02 -0600)
committerGitHub <noreply@github.com>
Tue, 8 Feb 2022 15:02:38 +0000 (15:02 +0000)
src/proof/lfsc/lfsc_node_converter.cpp

index 8edbb7dc7e2ca54f1ce6b761cd529296334546b8..1ff5d2a0ffe39d932ebdddc7ef3105318a7debb2 100644 (file)
@@ -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)
     {