return mc;
}
+bool TermEnumeration::getDomain(TypeNode tn, std::vector<Node>& dom)
+{
+ if (!mayComplete(tn))
+ {
+ return false;
+ }
+ Node curre;
+ unsigned counter = 0;
+ do
+ {
+ curre = getEnumerateTerm(tn, counter);
+ counter++;
+ if (!curre.isNull())
+ {
+ dom.push_back(curre);
+ }
+ } while (!curre.isNull());
+ return true;
+}
+
} /* CVC4::theory::quantifiers namespace */
} /* CVC4::theory namespace */
} /* CVC4 namespace */
*/
static bool mayComplete(TypeNode tn, unsigned cardMax);
+ /** get domain
+ *
+ * If tn is a type such that mayComplete(tn) returns true, this method
+ * adds all domain elements of tn to dom and returns true. Otherwise, this
+ * method returns false.
+ */
+ bool getDomain(TypeNode tn, std::vector<Node>& dom);
+
private:
/** ground terms enumerated for types */
std::unordered_map<TypeNode, std::vector<Node>, TypeNodeHashFunction>