3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-25 01:55:32 +00:00
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2017-07-27 07:44:08 -07:00
parent 1a07c6c188
commit 2cc6baede5

View file

@ -2238,6 +2238,9 @@ namespace smt2 {
m_assert_expr = m_scanner.cached_str(0, m_cache_end);
m_scanner.stop_caching();
}
if (expr_stack().empty()) {
throw cmd_exception("invalid assert command, expression required as argument");
}
expr * f = expr_stack().back();
if (!m().is_bool(f))
throw cmd_exception("invalid assert command, term is not Boolean");