mirror of
https://github.com/Z3Prover/z3
synced 2025-07-19 10:52:02 +00:00
add shortcuts for unit assertions, conflicts
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
d73b7267e3
commit
93ee05648e
17 changed files with 55 additions and 94 deletions
|
@ -18,6 +18,7 @@ Revision History:
|
|||
--*/
|
||||
#include "sat/sat_watched.h"
|
||||
#include "sat/sat_clause.h"
|
||||
#include "sat/sat_extension.h"
|
||||
|
||||
namespace sat {
|
||||
|
||||
|
@ -96,7 +97,7 @@ namespace sat {
|
|||
}
|
||||
|
||||
|
||||
std::ostream& display_watch_list(std::ostream & out, clause_allocator const & ca, watch_list const & wlist) {
|
||||
std::ostream& display_watch_list(std::ostream & out, clause_allocator const & ca, watch_list const & wlist, extension* ext) {
|
||||
bool first = true;
|
||||
for (watched const& w : wlist) {
|
||||
if (first)
|
||||
|
@ -116,7 +117,12 @@ namespace sat {
|
|||
out << "(" << w.get_blocked_literal() << " " << *(ca.get_clause(w.get_clause_offset())) << ")";
|
||||
break;
|
||||
case watched::EXT_CONSTRAINT:
|
||||
out << "ext: " << w.get_ext_constraint_idx();
|
||||
if (ext) {
|
||||
ext->display_constraint(out, w.get_ext_constraint_idx());
|
||||
}
|
||||
else {
|
||||
out << "ext: " << w.get_ext_constraint_idx();
|
||||
}
|
||||
break;
|
||||
default:
|
||||
UNREACHABLE();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue