From: Andrew Reynolds Date: Thu, 3 Mar 2022 03:51:42 +0000 (-0600) Subject: Improve error for higher-order logic (#8207) X-Git-Tag: cvc5-1.0.0~334 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=8f14d8b4eeaf5b2d1b7bb30173ca85197b7166be;p=cvc5.git Improve error for higher-order logic (#8207) Makes the error more informative when a higher-order function variable is encountered. Fixes cvc5/cvc5-projects#450. --- diff --git a/src/theory/uf/theory_uf.cpp b/src/theory/uf/theory_uf.cpp index 9058a57f3..e22698bc0 100644 --- a/src/theory/uf/theory_uf.cpp +++ b/src/theory/uf/theory_uf.cpp @@ -221,7 +221,15 @@ TrustNode TheoryUF::ppRewrite(TNode node, std::vector& lems) if (!isHol) { std::stringstream ss; - ss << "Partial function applications are only supported with " + if (k == kind::HO_APPLY) + { + ss << "Partial function applications"; + } + else + { + ss << "Function variables"; + } + ss << " are only supported with " "higher-order logic. Try adding the logic prefix HO_."; throw LogicException(ss.str()); }