std::string name;
CVC4::api::Term e, e2;
std::vector<CVC4::Datatype> datatypes;
- std::vector<api::Sort> unresTypes;
+ std::set<api::Sort> unresTypes;
std::map<CVC4::api::Term, CVC4::api::Sort> ntsToUnres;
unsigned dtProcessed = 0;
std::unordered_set<unsigned> allowConst;
// the datatype
PARSER_STATE->checkDeclaration(dname, CHECK_UNDECLARED, SYM_SORT);
api::Sort urt = PARSER_STATE->mkUnresolvedType(dname);
- unresTypes.push_back(urt);
+ unresTypes.insert(urt);
// make the non-terminal symbol, which will be parsed as an ordinary
// free variable.
api::Term nts = PARSER_STATE->bindBoundVar(i.first, i.second);
PARSER_STATE->popScope();
// now, make the sygus datatype
Trace("parser-sygus2") << "Make the sygus datatypes..." << std::endl;
+ std::set<Type> utypes = api::sortSetToTypes(unresTypes);
std::vector<DatatypeType> datatypeTypes =
- PARSER_STATE->mkMutualDatatypeTypes(
- datatypes, false, ExprManager::DATATYPE_FLAG_PLACEHOLDER);
+ SOLVER->getExprManager()->mkMutualDatatypeTypes(
+ datatypes, utypes,
+ ExprManager::DATATYPE_FLAG_PLACEHOLDER);
// return is the first datatype
ret = datatypeTypes[0];
}