3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-08-02 09:20:22 +00:00

wip - dependent expr simpliifer

- simplify iterator over current indices
- add more simplifiers used by asserted_formulas
- improve diagnostics printing
This commit is contained in:
Nikolaj Bjorner 2022-11-30 13:41:40 +07:00
parent bec3acd146
commit b084821a0c
25 changed files with 553 additions and 158 deletions

View file

@ -18,6 +18,7 @@ Author:
#pragma once
#include "ast/ast.h"
#include "ast/ast_pp.h"
#include "ast/ast_translation.h"
class dependent_expr {
@ -88,4 +89,20 @@ public:
std::tuple<expr*, expr_dependency*> operator()() const {
return { m_fml, m_dep };
}
std::ostream& display(std::ostream& out) const {
return out << mk_pp(m_fml, m);
if (m_dep) {
out << "\n <- ";
ptr_vector<expr> deps;
m.linearize(m_dep, deps);
for (expr* arg : deps)
out << mk_pp(arg, m) << " ";
}
return out;
}
};
inline std::ostream& operator<<(std::ostream& out, dependent_expr const& d) {
return d.display(out);
}