Logic exception instead of assertion failure for instantiate (#4006)
authorAndrew Reynolds <andrew.j.reynolds@gmail.com>
Tue, 10 Mar 2020 21:19:31 +0000 (16:19 -0500)
committerGitHub <noreply@github.com>
Tue, 10 Mar 2020 21:19:31 +0000 (14:19 -0700)
Fixes #4003.

Protects against a (class of) nonsensical option combinations.

src/theory/quantifiers/instantiate.cpp

index 2b56cff8fc19783ca49874026bf23db9e59ef5b2..9969de4588b0589e91a4c929ee79b7607a7963e6 100644 (file)
@@ -290,7 +290,10 @@ bool Instantiate::addInstantiation(
     {
       // virtual term substitution/instantiation level features are
       // incompatible
-      Assert(false);
+      std::stringstream ss;
+      ss << "Cannot combine instantiation strategies that require virtual term "
+            "substitution with those that restrict instantiation levels";
+      throw LogicException(ss.str());
     }
     else
     {