mirror of
https://github.com/Z3Prover/z3
synced 2025-08-30 15:00:08 +00:00
fix sorting network bug, add network compilation,...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
72f09e4729
commit
019ff77613
15 changed files with 350 additions and 100 deletions
|
@ -958,7 +958,7 @@ namespace smt {
|
|||
typename atoms::iterator lo_inf1 = begin1, lo_sup1 = begin1;
|
||||
typename atoms::iterator hi_inf1 = begin2, hi_sup1 = begin2;
|
||||
bool flo_inf, fhi_inf, flo_sup, fhi_sup;
|
||||
//std::cout << atoms.size() << "\n";
|
||||
// std::cout << atoms.size() << "\n";
|
||||
ptr_addr_hashtable<typename atom> visited;
|
||||
for (unsigned i = 0; i < atoms.size(); ++i) {
|
||||
atom* a1 = atoms[i];
|
||||
|
@ -966,8 +966,8 @@ namespace smt {
|
|||
hi_inf1 = next_inf(a1, A_UPPER, hi_inf, end, fhi_inf);
|
||||
lo_sup1 = next_sup(a1, A_LOWER, lo_sup, end, flo_sup);
|
||||
hi_sup1 = next_sup(a1, A_UPPER, hi_sup, end, fhi_sup);
|
||||
//std::cout << "v" << a1->get_var() << ((a1->get_atom_kind()==A_LOWER)?" <= ":" >= ") << a1->get_k() << "\n";
|
||||
//std::cout << (lo_inf1 != end) << " " << (lo_sup1 != end) << " " << (hi_inf1 != end) << " " << (hi_sup1 != end) << "\n";
|
||||
// std::cout << "v" << a1->get_var() << ((a1->get_atom_kind()==A_LOWER)?" <= ":" >= ") << a1->get_k() << "\n";
|
||||
// std::cout << (lo_inf1 != end) << " " << (lo_sup1 != end) << " " << (hi_inf1 != end) << " " << (hi_sup1 != end) << "\n";
|
||||
if (lo_inf1 != end) lo_inf = lo_inf1;
|
||||
if (lo_sup1 != end) lo_sup = lo_sup1;
|
||||
if (hi_inf1 != end) hi_inf = hi_inf1;
|
||||
|
|
|
@ -1156,7 +1156,7 @@ namespace smt {
|
|||
return literal(ctx.mk_bool_var(y));
|
||||
}
|
||||
|
||||
literal max(literal a, literal b) {
|
||||
literal mk_max(literal a, literal b) {
|
||||
if (a == b) return a;
|
||||
expr_ref t1(m), t2(m), t3(m);
|
||||
ctx.literal2expr(a, t1);
|
||||
|
@ -1166,7 +1166,7 @@ namespace smt {
|
|||
return literal(v);
|
||||
}
|
||||
|
||||
literal min(literal a, literal b) {
|
||||
literal mk_min(literal a, literal b) {
|
||||
if (a == b) return a;
|
||||
expr_ref t1(m), t2(m), t3(m);
|
||||
ctx.literal2expr(a, t1);
|
||||
|
@ -1176,6 +1176,8 @@ namespace smt {
|
|||
return literal(v);
|
||||
}
|
||||
|
||||
literal mk_not(literal a) { return ~a; }
|
||||
|
||||
void mk_clause(unsigned n, literal const* ls) {
|
||||
literal_vector tmp(n, ls);
|
||||
ctx.mk_clause(n, tmp.c_ptr(), 0, CLS_AUX, 0);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue