Assert(sorts.size() >= 2);
std::vector<TypeNode> sortNodes;
for (unsigned i = 0; i < sorts.size(); ++ i) {
- CheckArgument(sorts[i].isFirstClass(), sorts,
- "cannot create function types for argument types that are not first-class");
+ CheckArgument(sorts[i].isFirstClass(),
+ sorts,
+ "cannot create function types for argument types that are "
+ "not first-class. Try option --uf-ho.");
sortNodes.push_back(sorts[i]);
}
CheckArgument(!sorts[sorts.size()-1].isFunction(), sorts[sorts.size()-1],
Assert(sorts.size() >= 1);
std::vector<TypeNode> sortNodes;
for (unsigned i = 0; i < sorts.size(); ++ i) {
- CheckArgument(sorts[i].isFirstClass(), sorts,
- "cannot create predicate types for argument types that are not first-class");
+ CheckArgument(sorts[i].isFirstClass(),
+ sorts,
+ "cannot create predicate types for argument types that are "
+ "not first-class. Try option --uf-ho.");
sortNodes.push_back(sorts[i]);
}
sortNodes.push_back(booleanType());
"unexpected NULL index type");
CheckArgument(!constituentType.isNull(), constituentType,
"unexpected NULL constituent type");
- CheckArgument(indexType.isFirstClass(), indexType,
- "cannot index arrays by types that are not first-class");
- CheckArgument(constituentType.isFirstClass(), constituentType,
- "cannot store types that are not first-class in arrays");
+ CheckArgument(indexType.isFirstClass(),
+ indexType,
+ "cannot index arrays by types that are not first-class. Try "
+ "option --uf-ho.");
+ CheckArgument(constituentType.isFirstClass(),
+ constituentType,
+ "cannot store types that are not first-class in arrays. Try "
+ "option --uf-ho.");
Debug("arrays") << "making array type " << indexType << " "
<< constituentType << std::endl;
return mkTypeNode(kind::ARRAY_TYPE, indexType, constituentType);
inline TypeNode NodeManager::mkSetType(TypeNode elementType) {
CheckArgument(!elementType.isNull(), elementType,
"unexpected NULL element type");
- CheckArgument(elementType.isFirstClass(), elementType,
- "cannot store types that are not first-class in sets");
+ CheckArgument(elementType.isFirstClass(),
+ elementType,
+ "cannot store types that are not first-class in sets. Try "
+ "option --uf-ho.");
Debug("sets") << "making sets type " << elementType << std::endl;
return mkTypeNode(kind::SET_TYPE, elementType);
}
inline TypeNode NodeManager::mkSelectorType(TypeNode domain, TypeNode range) {
CheckArgument(domain.isDatatype(), domain,
"cannot create non-datatype selector type");
- CheckArgument(range.isFirstClass(), range,
- "cannot have selector fields that are not first-class types");
+ CheckArgument(range.isFirstClass(),
+ range,
+ "cannot have selector fields that are not first-class types. "
+ "Try option --uf-ho.");
return mkTypeNode(kind::SELECTOR_TYPE, domain, range);
}
t = PARSER_STATE->mkFlatFunctionType(sorts, t);
}
if(t.isFunction() && !PARSER_STATE->isTheoryEnabled(Smt2::THEORY_UF)) {
- PARSER_STATE->parseErrorLogic("Functions (of non-zero arity) cannot "
- "be declared in logic ");
+ PARSER_STATE->parseError(
+ "Functions (of non-zero arity) cannot "
+ "be declared in logic "
+ + PARSER_STATE->getLogic().getLogicString()
+ + " unless option --uf-ho is used.");
}
// we allow overloading for function declarations
if (PARSER_STATE->sygus_v1())
{ Type t;
if(sorts.size() > 1) {
if(!PARSER_STATE->isTheoryEnabled(Smt2::THEORY_UF)) {
- PARSER_STATE->parseErrorLogic("Functions (of non-zero arity) "
- "cannot be declared in logic ");
+ PARSER_STATE->parseError(
+ "Functions (of non-zero arity) cannot "
+ "be declared in logic "
+ + PARSER_STATE->getLogic().getLogicString()
+ + " unless option --uf-ho is used");
}
// must flatten
Type range = sorts.back();
{ Type t = EXPR_MANAGER->booleanType();
if(sorts.size() > 0) {
if(!PARSER_STATE->isTheoryEnabled(Smt2::THEORY_UF)) {
- PARSER_STATE->parseErrorLogic("Predicates (of non-zero arity) "
- "cannot be declared in logic ");
+ PARSER_STATE->parseError(
+ "Functions (of non-zero arity) cannot "
+ "be declared in logic "
+ + PARSER_STATE->getLogic().getLogicString()
+ + " unless option --uf-ho is used");
}
t = EXPR_MANAGER->mkFunctionType(sorts, t);
}