3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-24 01:25:31 +00:00

Add more logging to polysat (#5186)

* Add polysat logging support

* Don't really need the usual log levels

* Indent log headings

* Add display method to ptr_vector

* Add some logging to solver

* Use __FUNCSIG__ on MSVC
This commit is contained in:
Jakob Rath 2021-04-15 17:35:57 +02:00 committed by GitHub
parent 7067fc16ae
commit feb31045f5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 271 additions and 3 deletions

View file

@ -609,6 +609,19 @@ public:
ptr_vector(unsigned s):vector<T *, false>(s) {}
ptr_vector(unsigned s, T * elem):vector<T *, false>(s, elem) {}
ptr_vector(unsigned s, T * const * data):vector<T *, false>(s, const_cast<T**>(data)) {}
std::ostream& display(std::ostream& out, char const* delim = " ") const {
bool first = true;
for (auto const* u : *this) {
if (!first)
out << delim;
first = false;
if (u)
out << *u;
else
out << "<NULL>";
}
return out;
}
};
template<typename T, typename SZ = unsigned>
@ -635,6 +648,11 @@ inline std::ostream& operator<<(std::ostream& out, svector<T> const& v) {
return out;
}
template<typename T>
inline std::ostream& operator<<(std::ostream& out, ptr_vector<T> const& v) {
return v.display(out);
}
template<typename Hash, typename Vec>
struct vector_hash_tpl {