Fix call to SExpr constructor for greater portability.
authorClark Barrett <barrett@cs.stanford.edu>
Sat, 14 Jan 2017 05:23:42 +0000 (21:23 -0800)
committerClark Barrett <barrett@cs.stanford.edu>
Sat, 14 Jan 2017 05:24:56 +0000 (21:24 -0800)
src/smt/smt_engine.cpp

index a79416b76ecac68ca00d70b590d707885154a2f7..e647c45d1b4d471620c01dfaa48493e0ad415c33 100644 (file)
@@ -2151,10 +2151,13 @@ CVC4::SExpr SmtEngine::getInfo(const std::string& key) const
                            "last result wasn't unknown!");
     }
   } else if(key == "assertion-stack-levels") {
-    return SExpr(d_userLevels.size());
+    AlwaysAssert(d_userLevels.size() <=
+                 std::numeric_limits<unsigned long int>::max());
+    return SExpr(static_cast<unsigned long int>(d_userLevels.size()));
   } else if(key == "all-options") {
     // get the options, like all-statistics
-    std::vector< std::vector<std::string> > current_options = Options::current()->getOptions();
+    std::vector< std::vector<std::string> > current_options =
+      Options::current()->getOptions();
     return SExpr::parseListOfListOfAtoms(current_options);
   } else {
     throw UnrecognizedOptionException();