From: Andrew Reynolds Date: Thu, 14 Mar 2019 18:36:56 +0000 (-0500) Subject: Fix substitution step in ho matching (#2825) X-Git-Tag: cvc5-1.0.0~4248 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=78350cb1caa989f740a3159d1c578c454111874c;p=cvc5.git Fix substitution step in ho matching (#2825) --- diff --git a/src/theory/quantifiers/ematching/ho_trigger.cpp b/src/theory/quantifiers/ematching/ho_trigger.cpp index 2fcfa19d9..ebc0081be 100644 --- a/src/theory/quantifiers/ematching/ho_trigger.cpp +++ b/src/theory/quantifiers/ematching/ho_trigger.cpp @@ -270,6 +270,11 @@ bool HigherOrderTrigger::sendInstantiation(InstMatch& m) // Assert( f==value ); for (unsigned k = 0, size = args.size(); k < size; k++) { + // must now subsitute back, to handle cases like + // (@ x y) matching (@ t (@ t s)) + // where the above substitution would produce (@ x (@ x s)), + // but the argument should be (@ t s). + args[k] = args[k].substitute(var, value); Node val = args[k]; std::map::iterator itf = fixed_vals.find(k); if (itf == fixed_vals.end())