3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-06-21 21:33:39 +00:00

Merge branch 'upstream-master' into develop

Conflicts:
	src/smt/params/smt_params.cpp
	src/smt/params/smt_params.h
	src/smt/smt_context.cpp
	src/smt/smt_context.h
This commit is contained in:
Murphy Berzish 2017-05-01 21:33:23 -04:00
commit 0862949e66
28 changed files with 691 additions and 170 deletions

View file

@ -2219,11 +2219,27 @@ namespace smt2 {
if (m_cached_strings.empty())
throw cmd_exception("invalid get-value command, empty list of terms");
next();
unsigned index = 0;
if (curr_is_keyword() && (curr_id() == ":model-index" || curr_id() == ":model_index")) {
next();
check_int("integer index expected to indexed model evaluation");
if (!curr_numeral().is_unsigned())
throw parser_exception("expected unsigned integer index to model evaluation");
index = curr_numeral().get_unsigned();
next();
}
check_rparen("invalid get-value command, ')' expected");
if (!m_ctx.is_model_available() || m_ctx.get_check_sat_result() == 0)
throw cmd_exception("model is not available");
model_ref md;
m_ctx.get_check_sat_result()->get_model(md);
if (index == 0) {
m_ctx.get_check_sat_result()->get_model(md);
}
else {
m_ctx.get_opt()->get_box_model(md, index);
}
m_ctx.regular_stream() << "(";
expr ** expr_it = expr_stack().c_ptr() + spos;
expr ** expr_end = expr_it + m_cached_strings.size();