TUPLE_CONST_TOK: { PARSER_STATE->isTheoryEnabled(theory::THEORY_DATATYPES) }? 'mkTuple';
TUPLE_SEL_TOK: { PARSER_STATE->isTheoryEnabled(theory::THEORY_DATATYPES) }? 'tupSel';
-HO_ARROW_TOK : { PARSER_STATE->getLogic().isHigherOrder() }? '->';
-HO_LAMBDA_TOK : { PARSER_STATE->getLogic().isHigherOrder() }? 'lambda';
+HO_ARROW_TOK : { PARSER_STATE->isHoEnabled() }? '->';
+HO_LAMBDA_TOK : { PARSER_STATE->isHoEnabled() }? 'lambda';
/**
* A sequence of printable ASCII characters (except backslash) that starts
return d_logic.isTheoryEnabled(theory);
}
+bool Smt2::isHoEnabled() const
+{
+ return getLogic().isHigherOrder()
+ && d_solver->getExprManager()->getOptions().getUfHo();
+}
+
bool Smt2::logicIsSet() {
return d_logicSet;
}
bool isTheoryEnabled(theory::TheoryId theory) const;
+ /**
+ * Checks if higher-order support is enabled.
+ *
+ * @return true if higher-order support is enabled, false otherwise
+ */
+ bool isHoEnabled() const;
+
bool logicIsSet() override;
/**
regress0/ho/ho-matching-nested-app.smt2
regress0/ho/ho-std-fmf.smt2
regress0/ho/hoa0008.smt2
+ regress0/ho/issue4477.smt2
regress0/ho/ite-apply-eq.smt2
regress0/ho/lambda-equality-non-canon.smt2
regress0/ho/match-middle.smt2
--- /dev/null
+; REQUIRES: no-competition
+; SCRUBBER: grep -o "Symbol '->' not declared"
+; EXPECT: Symbol '->' not declared
+; EXIT: 1
+(set-logic ALL)
+(declare-sort s 0)
+(declare-fun a () s)
+(declare-fun b () s)
+(declare-fun c (s) s)
+(assert (forall ((d (-> s s))) (distinct (d a) (c a) b)))
+(check-sat)