Throw exception instead of warning for approximate models (#3542)
authorAndrew Reynolds <andrew.j.reynolds@gmail.com>
Fri, 6 Dec 2019 20:23:21 +0000 (14:23 -0600)
committerGitHub <noreply@github.com>
Fri, 6 Dec 2019 20:23:21 +0000 (14:23 -0600)
src/smt/smt_engine.cpp

index 7e18e5a6fcd1aa22cf18cbec90e8511852e9d679..c034f6f2345e03ff73e942bd3f5132f6d3330314 100644 (file)
@@ -4647,12 +4647,12 @@ void SmtEngine::checkModel(bool hardFailure) {
   Notice() << "SmtEngine::checkModel(): generating model" << endl;
   TheoryModel* m = getAvailableModel("check model");
 
-  // check-model is not guaranteed to succeed if approximate values were used
+  // check-model is not guaranteed to succeed if approximate values were used.
+  // Thus, we intentionally abort here.
   if (m->hasApproximations())
   {
-    Warning()
-        << "WARNING: running check-model on a model with approximate values..."
-        << endl;
+    throw RecoverableModalException(
+        "Cannot run check-model on a model with approximate values.");
   }
 
   // Check individual theory assertions