Fix spurious assertion in get-value (#3052)
authorAndrew Reynolds <andrew.j.reynolds@gmail.com>
Tue, 11 Jun 2019 20:50:06 +0000 (15:50 -0500)
committerGitHub <noreply@github.com>
Tue, 11 Jun 2019 20:50:06 +0000 (15:50 -0500)
src/smt/smt_engine.cpp

index 3032951129c50f5c15e7b866c89af48f50534716..2b81b383556292410c5e3a2817811ec0c0fabd19 100644 (file)
@@ -4201,7 +4201,10 @@ Expr SmtEngine::getValue(const Expr& ex) const
   Trace("smt") << "--- model-post expected " << expectedType << endl;
 
   // type-check the result we got
-  Assert(resultNode.isNull() || resultNode.getType().isSubtypeOf(expectedType),
+  // Notice that lambdas have function type, which does not respect the subtype
+  // relation, so we ignore them here.
+  Assert(resultNode.isNull() || resultNode.getKind() == kind::LAMBDA
+             || resultNode.getType().isSubtypeOf(expectedType),
          "Run with -t smt for details.");
 
   // ensure it's a constant