mirror of
https://github.com/Z3Prover/z3
synced 2025-05-07 07:45:46 +00:00
parent
eacde16b3e
commit
4842c71019
5 changed files with 29 additions and 4 deletions
|
@ -2055,6 +2055,29 @@ void cmd_context::display_statistics(bool show_total_time, double total_time) {
|
|||
}
|
||||
|
||||
|
||||
expr_ref_vector cmd_context::tracked_assertions() {
|
||||
expr_ref_vector result(m());
|
||||
if (assertion_names().size() == assertions().size()) {
|
||||
for (unsigned i = 0; i < assertions().size(); ++i) {
|
||||
expr* an = assertion_names()[i];
|
||||
expr* asr = assertions()[i];
|
||||
if (an) {
|
||||
result.push_back(m().mk_implies(an, asr));
|
||||
}
|
||||
else {
|
||||
result.push_back(asr);
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
for (expr * e : assertions()) {
|
||||
result.push_back(e);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
void cmd_context::display_assertions() {
|
||||
if (!m_interactive_mode)
|
||||
throw cmd_exception("command is only available in interactive mode, use command (set-option :interactive-mode true)");
|
||||
|
|
|
@ -457,6 +457,7 @@ public:
|
|||
|
||||
ptr_vector<expr> const& assertions() const { return m_assertions; }
|
||||
ptr_vector<expr> const& assertion_names() const { return m_assertion_names; }
|
||||
expr_ref_vector tracked_assertions();
|
||||
|
||||
/**
|
||||
\brief Hack: consume assertions if there are no scopes.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue