Sequence(d_type.getSequenceElementType(), seq));
}
+SEnumLenSet::SEnumLenSet(TypeEnumeratorProperties* tep) : d_tep(tep) {}
+
+SEnumLen* SEnumLenSet::getEnumerator(size_t len, TypeNode tn)
+{
+ std::pair<size_t, TypeNode> key(len, tn);
+ std::map<std::pair<size_t, TypeNode>, std::unique_ptr<SEnumLen> >::iterator
+ it = d_sels.find(key);
+ if (it != d_sels.end())
+ {
+ return it->second.get();
+ }
+ if (tn.isString()) // string-only
+ {
+ d_sels[key].reset(
+ new StringEnumLen(len, len, utils::getAlphabetCardinality()));
+ }
+ else
+ {
+ d_sels[key].reset(new SeqEnumLen(tn, d_tep, len, len));
+ }
+ return d_sels[key].get();
+}
+
StringEnumerator::StringEnumerator(TypeNode type, TypeEnumeratorProperties* tep)
: TypeEnumeratorBase<StringEnumerator>(type),
d_wenum(0, utils::getAlphabetCardinality())
void mkCurr();
};
+/** Set of the above class */
+class SEnumLenSet
+{
+ public:
+ /** constructor */
+ SEnumLenSet(TypeEnumeratorProperties* tep = nullptr);
+ /** destructor */
+ ~SEnumLenSet() {}
+ /** Get enumerator for length, type */
+ SEnumLen* getEnumerator(size_t len, TypeNode tn);
+
+ private:
+ /** an enumerator for the element's type */
+ TypeEnumeratorProperties* d_tep;
+ /** for each start length, type */
+ std::map<std::pair<size_t, TypeNode>, std::unique_ptr<SEnumLen> > d_sels;
+};
+
class StringEnumerator : public TypeEnumeratorBase<StringEnumerator>
{
public: