3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-05-08 00:05:46 +00:00
z3/src/math/polysat/log_helper.h
Jakob Rath ebaea2159e
Polysat: use constraint_literal and begin move to core-based conflict representation (#5489)
* Rename solver_scope for fixplex tests

(otherwise the wrong constructor is called for polysat's solver_scope)

* Update conflict_core

* simplify

* Be clearer about constraint_literal lifetime

* remove old comment

* Remove status (positive/negative) from constraint

* Use constraint_literal in the solver

* Fix build (constraint -> get_constraint)
2021-08-18 11:02:46 -07:00

46 lines
814 B
C++

/*++
Copyright (c) 2021 Microsoft Corporation
Module Name:
Logging support
Abstract:
Utilities for logging.
Author:
Nikolaj Bjorner (nbjorner) 2021-03-19
Jakob Rath 2021-04-6
--*/
#pragma once
#include <iostream>
#include <utility>
#include "util/ref.h"
#include "util/util.h"
template <typename T>
struct show_deref_t {
T const* ptr;
};
template <typename T>
std::ostream& operator<<(std::ostream& os, show_deref_t<T> s) {
if (s.ptr)
return os << *s.ptr;
else
return os << "<null>";
}
template <typename T>
show_deref_t<T> show_deref(T* ptr) {
return show_deref_t<T>{ptr};
}
template <typename Ptr, typename T = typename std::remove_pointer<decltype(std::declval<Ptr>().get())>::type>
show_deref_t<T> show_deref(Ptr const& ptr) {
return show_deref_t<T>{ptr.get()};
}