mirror of
https://github.com/Z3Prover/z3
synced 2025-06-18 20:03:38 +00:00
remove unused file & hide a few symbols
This commit is contained in:
parent
35aa98436f
commit
d79692b185
14 changed files with 58 additions and 297 deletions
|
@ -26,7 +26,7 @@ Revision History:
|
||||||
//
|
//
|
||||||
// -----------------------------------
|
// -----------------------------------
|
||||||
|
|
||||||
namespace occurs_namespace {
|
namespace {
|
||||||
struct found {};
|
struct found {};
|
||||||
|
|
||||||
struct proc {
|
struct proc {
|
||||||
|
@ -49,27 +49,26 @@ namespace occurs_namespace {
|
||||||
void operator()(quantifier const * n) { }
|
void operator()(quantifier const * n) { }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
}
|
||||||
};
|
|
||||||
|
|
||||||
// Return true if n1 occurs in n2
|
// Return true if n1 occurs in n2
|
||||||
bool occurs(expr * n1, expr * n2) {
|
bool occurs(expr * n1, expr * n2) {
|
||||||
occurs_namespace::proc p(n1);
|
proc p(n1);
|
||||||
try {
|
try {
|
||||||
quick_for_each_expr(p, n2);
|
quick_for_each_expr(p, n2);
|
||||||
}
|
}
|
||||||
catch (const occurs_namespace::found &) {
|
catch (const found &) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool occurs(func_decl * d, expr * n) {
|
bool occurs(func_decl * d, expr * n) {
|
||||||
occurs_namespace::decl_proc p(d);
|
decl_proc p(d);
|
||||||
try {
|
try {
|
||||||
quick_for_each_expr(p, n);
|
quick_for_each_expr(p, n);
|
||||||
}
|
}
|
||||||
catch (const occurs_namespace::found &) {
|
catch (const found &) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -25,6 +25,8 @@ Revision History:
|
||||||
#include "util/warning.h"
|
#include "util/warning.h"
|
||||||
#include "ast/ast_smt2_pp.h"
|
#include "ast/ast_smt2_pp.h"
|
||||||
|
|
||||||
|
namespace {
|
||||||
|
|
||||||
struct well_sorted_proc {
|
struct well_sorted_proc {
|
||||||
ast_manager & m_manager;
|
ast_manager & m_manager;
|
||||||
bool m_error;
|
bool m_error;
|
||||||
|
@ -76,6 +78,8 @@ struct well_sorted_proc {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
bool is_well_sorted(ast_manager const & m, expr * n) {
|
bool is_well_sorted(ast_manager const & m, expr * n) {
|
||||||
well_sorted_proc p(const_cast<ast_manager&>(m));
|
well_sorted_proc p(const_cast<ast_manager&>(m));
|
||||||
for_each_expr(p, n);
|
for_each_expr(p, n);
|
||||||
|
|
|
@ -20,7 +20,6 @@ z3_add_component(sat
|
||||||
sat_elim_eqs.cpp
|
sat_elim_eqs.cpp
|
||||||
sat_elim_vars.cpp
|
sat_elim_vars.cpp
|
||||||
sat_bcd.cpp
|
sat_bcd.cpp
|
||||||
sat_iff3_finder.cpp
|
|
||||||
sat_integrity_checker.cpp
|
sat_integrity_checker.cpp
|
||||||
sat_local_search.cpp
|
sat_local_search.cpp
|
||||||
sat_lookahead.cpp
|
sat_lookahead.cpp
|
||||||
|
|
|
@ -21,6 +21,7 @@ Revision History:
|
||||||
#undef min
|
#undef min
|
||||||
#include "sat/sat_solver.h"
|
#include "sat/sat_solver.h"
|
||||||
|
|
||||||
|
namespace {
|
||||||
struct lex_error {};
|
struct lex_error {};
|
||||||
|
|
||||||
class stream_buffer {
|
class stream_buffer {
|
||||||
|
@ -138,6 +139,8 @@ bool parse_dimacs_core(Buffer & in, std::ostream& err, sat::solver & solver) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
bool parse_dimacs(std::istream & in, std::ostream& err, sat::solver & solver) {
|
bool parse_dimacs(std::istream & in, std::ostream& err, sat::solver & solver) {
|
||||||
stream_buffer _in(in);
|
stream_buffer _in(in);
|
||||||
return parse_dimacs_core(_in, err, solver);
|
return parse_dimacs_core(_in, err, solver);
|
||||||
|
|
|
@ -1,214 +0,0 @@
|
||||||
/*++
|
|
||||||
Copyright (c) 2011 Microsoft Corporation
|
|
||||||
|
|
||||||
Module Name:
|
|
||||||
|
|
||||||
sat_iff3_finder.cpp
|
|
||||||
|
|
||||||
Abstract:
|
|
||||||
|
|
||||||
Find constraints of the form x = l1 = l2
|
|
||||||
That is, search for clauses of the form
|
|
||||||
~x \/ l1 \/ ~l2
|
|
||||||
~x \/ ~l1 \/ l2
|
|
||||||
x \/ l1 \/ l2
|
|
||||||
x \/ ~l1 \/ ~l2
|
|
||||||
|
|
||||||
The basic idea is to sort the watch lists.
|
|
||||||
|
|
||||||
This information can be used to propagate equivalences
|
|
||||||
during probing (and search).
|
|
||||||
|
|
||||||
The initial experiments were disappointing.
|
|
||||||
Not using it on the solver.
|
|
||||||
|
|
||||||
Author:
|
|
||||||
|
|
||||||
Leonardo de Moura (leonardo) 2011-06-04.
|
|
||||||
|
|
||||||
Revision History:
|
|
||||||
|
|
||||||
--*/
|
|
||||||
#include "sat/sat_iff3_finder.h"
|
|
||||||
#include "sat/sat_solver.h"
|
|
||||||
|
|
||||||
namespace sat {
|
|
||||||
|
|
||||||
struct iff3_lt {
|
|
||||||
bool operator()(watched const & w1, watched const & w2) const {
|
|
||||||
// keep th binary clauses in the beginning
|
|
||||||
if (w2.is_binary_clause()) return false;
|
|
||||||
if (w1.is_binary_clause()) return true;
|
|
||||||
//
|
|
||||||
if (w2.is_ternary_clause()) {
|
|
||||||
if (w1.is_ternary_clause()) {
|
|
||||||
literal l1_1 = w1.get_literal1();
|
|
||||||
literal l1_2 = w1.get_literal2();
|
|
||||||
literal l2_1 = w2.get_literal1();
|
|
||||||
literal l2_2 = w2.get_literal2();
|
|
||||||
if (l1_1.index() < l2_1.index()) return true;
|
|
||||||
if (l1_1.index() > l2_1.index()) return false;
|
|
||||||
return l1_2.index() < l2_2.index();
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
if (w1.is_ternary_clause()) return true;
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
static void unmark(svector<bool> & marks, literal_vector & to_unmark) {
|
|
||||||
literal_vector::const_iterator it = to_unmark.begin();
|
|
||||||
literal_vector::const_iterator end = to_unmark.end();
|
|
||||||
for (; it != end; ++it) {
|
|
||||||
marks[it->index()] = false;
|
|
||||||
}
|
|
||||||
to_unmark.reset();
|
|
||||||
}
|
|
||||||
|
|
||||||
#define SMALL_WLIST 16
|
|
||||||
|
|
||||||
/**
|
|
||||||
\brief Return true if wlist contains (l1, l2)
|
|
||||||
It assumes wlist have been sorted using iff3_lt
|
|
||||||
*/
|
|
||||||
static bool contains(watch_list const & wlist, literal l1, literal l2) {
|
|
||||||
watched k(l1, l2);
|
|
||||||
if (wlist.size() < SMALL_WLIST)
|
|
||||||
return wlist.contains(k);
|
|
||||||
iff3_lt lt;
|
|
||||||
int low = 0;
|
|
||||||
int high = wlist.size();
|
|
||||||
while (true) {
|
|
||||||
int mid = low + ((high - low) / 2);
|
|
||||||
watched const & m = wlist[mid];
|
|
||||||
if (m == k)
|
|
||||||
return true;
|
|
||||||
if (lt(m, k)) {
|
|
||||||
low = mid + 1;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
SASSERT(lt(k, m));
|
|
||||||
high = mid - 1;
|
|
||||||
}
|
|
||||||
if (low > high)
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
iff3_finder::iff3_finder(solver & _s):
|
|
||||||
s(_s) {
|
|
||||||
}
|
|
||||||
|
|
||||||
void iff3_finder::sort_watches() {
|
|
||||||
vector<watch_list>::iterator it = s.m_watches.begin();
|
|
||||||
vector<watch_list>::iterator end = s.m_watches.end();
|
|
||||||
for (; it != end; ++it) {
|
|
||||||
watch_list & wlist = *it;
|
|
||||||
std::stable_sort(wlist.begin(), wlist.end(), iff3_lt());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void iff3_finder::mk_eq(literal l1, literal l2) {
|
|
||||||
s.mk_clause(l1, ~l2);
|
|
||||||
s.mk_clause(~l1, l2);
|
|
||||||
}
|
|
||||||
|
|
||||||
void iff3_finder::operator()() {
|
|
||||||
TRACE("iff3_finder", tout << "starting iff3_finder\n";);
|
|
||||||
sort_watches();
|
|
||||||
|
|
||||||
unsigned counter = 0;
|
|
||||||
|
|
||||||
svector<bool> found;
|
|
||||||
found.resize(s.num_vars()*2, false);
|
|
||||||
literal_vector to_unmark;
|
|
||||||
|
|
||||||
typedef std::pair<literal, literal> lit_pair;
|
|
||||||
svector<lit_pair> pairs;
|
|
||||||
|
|
||||||
for (bool_var x = 0; x < s.num_vars(); x++) {
|
|
||||||
literal pos_x(x, false);
|
|
||||||
literal neg_x(x, true);
|
|
||||||
watch_list & pos_wlist = s.get_wlist(neg_x);
|
|
||||||
watch_list & neg_wlist = s.get_wlist(pos_x);
|
|
||||||
//
|
|
||||||
TRACE("iff3_finder",
|
|
||||||
tout << "visiting: " << x << "\n";
|
|
||||||
tout << "pos:\n";
|
|
||||||
s.display_watch_list(tout, pos_wlist);
|
|
||||||
tout << "\nneg:\n";
|
|
||||||
s.display_watch_list(tout, neg_wlist);
|
|
||||||
tout << "\n--------------\n";);
|
|
||||||
// traverse the ternary clauses x \/ l1 \/ l2
|
|
||||||
bool_var curr_v1 = null_bool_var;
|
|
||||||
watch_list::iterator it = pos_wlist.begin();
|
|
||||||
watch_list::iterator end = pos_wlist.end();
|
|
||||||
for (; it != end; ++it) {
|
|
||||||
if (it->is_binary_clause())
|
|
||||||
continue;
|
|
||||||
if (it->is_ternary_clause()) {
|
|
||||||
literal l1 = it->get_literal1();
|
|
||||||
if (l1.index() < pos_x.index())
|
|
||||||
break; // stop
|
|
||||||
literal l2 = it->get_literal2();
|
|
||||||
bool_var v1 = l1.var();
|
|
||||||
if (v1 != curr_v1) {
|
|
||||||
curr_v1 = v1;
|
|
||||||
unmark(found, to_unmark);
|
|
||||||
pairs.reset();
|
|
||||||
}
|
|
||||||
if (!l1.sign()) {
|
|
||||||
if (!found[l2.index()]) {
|
|
||||||
found[l2.index()] = true;
|
|
||||||
to_unmark.push_back(l2);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
l2.neg();
|
|
||||||
if (found[l2.index()]) {
|
|
||||||
// Found clauses x \/ v1 \/ l2 and x \/ ~v1 \/ ~l2
|
|
||||||
// So, I have to find the clauses
|
|
||||||
// ~x \/ v1 \/ ~l2
|
|
||||||
// ~x \/ ~v1 \/ l2
|
|
||||||
if (contains(neg_wlist, literal(v1, false), ~l2) &&
|
|
||||||
contains(neg_wlist, literal(v1, true), l2)) {
|
|
||||||
// found new iff3
|
|
||||||
// x = v1 = l2
|
|
||||||
counter++;
|
|
||||||
// verbose_stream() << counter << ": " << x << " = " << v1 << " = " << l2 << "\n";
|
|
||||||
TRACE("iff3_finder", tout << counter << ": " << x << " = " << v1 << " = " << l2 << "\n";);
|
|
||||||
l1.neg();
|
|
||||||
svector<lit_pair>::iterator it2 = pairs.begin();
|
|
||||||
svector<lit_pair>::iterator end2 = pairs.end();
|
|
||||||
for (; it2 != end2; ++it2) {
|
|
||||||
if (it2->first == l1) {
|
|
||||||
// l2 == it2->second
|
|
||||||
mk_eq(l2, it2->second);
|
|
||||||
}
|
|
||||||
else if (it2->second == l1) {
|
|
||||||
// l2 == it2->first
|
|
||||||
mk_eq(l2, it2->first);
|
|
||||||
}
|
|
||||||
else if (it2->first == l2) {
|
|
||||||
// l1 == it2->second
|
|
||||||
mk_eq(l1, it2->second);
|
|
||||||
}
|
|
||||||
else if (it2->second == l2) {
|
|
||||||
// l1 == it2->first
|
|
||||||
mk_eq(l1, it2->first);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
pairs.push_back(lit_pair(l1, l2));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
break; // stop, no more ternary clauses from this point
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
|
|
@ -1,48 +0,0 @@
|
||||||
/*++
|
|
||||||
Copyright (c) 2011 Microsoft Corporation
|
|
||||||
|
|
||||||
Module Name:
|
|
||||||
|
|
||||||
sat_iff3_finder.h
|
|
||||||
|
|
||||||
Abstract:
|
|
||||||
|
|
||||||
Find constraints of the form x = l1 = l2
|
|
||||||
That is, search for clauses of the form
|
|
||||||
~x \/ l1 \/ ~l2
|
|
||||||
~x \/ ~l1 \/ l2
|
|
||||||
x \/ l1 \/ l2
|
|
||||||
x \/ ~l1 \/ ~l2
|
|
||||||
|
|
||||||
The basic idea is to sort the watch lists.
|
|
||||||
|
|
||||||
This information can be used to propagate equivalences
|
|
||||||
during probing (and search).
|
|
||||||
|
|
||||||
Author:
|
|
||||||
|
|
||||||
Leonardo de Moura (leonardo) 2011-06-04.
|
|
||||||
|
|
||||||
Revision History:
|
|
||||||
|
|
||||||
--*/
|
|
||||||
#ifndef SAT_IFF3_FINDER_H_
|
|
||||||
#define SAT_IFF3_FINDER_H_
|
|
||||||
|
|
||||||
#include "sat/sat_types.h"
|
|
||||||
|
|
||||||
namespace sat {
|
|
||||||
|
|
||||||
class iff3_finder {
|
|
||||||
solver & s;
|
|
||||||
void sort_watches();
|
|
||||||
void mk_eq(literal l1, literal l2);
|
|
||||||
public:
|
|
||||||
iff3_finder(solver & s);
|
|
||||||
|
|
||||||
void operator()();
|
|
||||||
};
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif
|
|
|
@ -1676,12 +1676,6 @@ namespace sat {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
struct clause_size_lt {
|
|
||||||
bool operator()(clause const * c1, clause const * c2) const {
|
|
||||||
return c1->size() < c2->size();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
void solver::init_assumptions(unsigned num_lits, literal const* lits) {
|
void solver::init_assumptions(unsigned num_lits, literal const* lits) {
|
||||||
if (num_lits == 0 && m_user_scope_literals.empty()) {
|
if (num_lits == 0 && m_user_scope_literals.empty()) {
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -32,7 +32,6 @@ Revision History:
|
||||||
#include "sat/sat_scc.h"
|
#include "sat/sat_scc.h"
|
||||||
#include "sat/sat_asymm_branch.h"
|
#include "sat/sat_asymm_branch.h"
|
||||||
#include "sat/sat_aig_simplifier.h"
|
#include "sat/sat_aig_simplifier.h"
|
||||||
#include "sat/sat_iff3_finder.h"
|
|
||||||
#include "sat/sat_probing.h"
|
#include "sat/sat_probing.h"
|
||||||
#include "sat/sat_mus.h"
|
#include "sat/sat_mus.h"
|
||||||
#include "sat/sat_binspr.h"
|
#include "sat/sat_binspr.h"
|
||||||
|
@ -202,7 +201,6 @@ namespace sat {
|
||||||
friend class drat;
|
friend class drat;
|
||||||
friend class elim_eqs;
|
friend class elim_eqs;
|
||||||
friend class bcd;
|
friend class bcd;
|
||||||
friend class iff3_finder;
|
|
||||||
friend class mus;
|
friend class mus;
|
||||||
friend class probing;
|
friend class probing;
|
||||||
friend class simplifier;
|
friend class simplifier;
|
||||||
|
|
|
@ -27,6 +27,8 @@ Revision History:
|
||||||
#include "smt/mam.h"
|
#include "smt/mam.h"
|
||||||
#include "smt/smt_context.h"
|
#include "smt/smt_context.h"
|
||||||
|
|
||||||
|
using namespace smt;
|
||||||
|
|
||||||
// #define _PROFILE_MAM
|
// #define _PROFILE_MAM
|
||||||
|
|
||||||
// -----------------------------------------
|
// -----------------------------------------
|
||||||
|
@ -53,7 +55,7 @@ Revision History:
|
||||||
|
|
||||||
#define IS_CGR_SUPPORT true
|
#define IS_CGR_SUPPORT true
|
||||||
|
|
||||||
namespace smt {
|
namespace {
|
||||||
// ------------------------------------
|
// ------------------------------------
|
||||||
//
|
//
|
||||||
// Trail
|
// Trail
|
||||||
|
@ -1985,11 +1987,13 @@ namespace smt {
|
||||||
|
|
||||||
enode * init_continue(cont const * c, unsigned expected_num_args);
|
enode * init_continue(cont const * c, unsigned expected_num_args);
|
||||||
|
|
||||||
|
#ifdef _TRACE
|
||||||
void display_reg(std::ostream & out, unsigned reg);
|
void display_reg(std::ostream & out, unsigned reg);
|
||||||
|
|
||||||
void display_instr_input_reg(std::ostream & out, instruction const * instr);
|
void display_instr_input_reg(std::ostream & out, instruction const * instr);
|
||||||
|
|
||||||
void display_pc_info(std::ostream & out);
|
void display_pc_info(std::ostream & out);
|
||||||
|
#endif
|
||||||
|
|
||||||
#define INIT_ARGS_SIZE 16
|
#define INIT_ARGS_SIZE 16
|
||||||
|
|
||||||
|
@ -2222,6 +2226,7 @@ namespace smt {
|
||||||
return *(bp.m_it);
|
return *(bp.m_it);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef _TRACE
|
||||||
void interpreter::display_reg(std::ostream & out, unsigned reg) {
|
void interpreter::display_reg(std::ostream & out, unsigned reg) {
|
||||||
out << "reg[" << reg << "]: ";
|
out << "reg[" << reg << "]: ";
|
||||||
enode * n = m_registers[reg];
|
enode * n = m_registers[reg];
|
||||||
|
@ -2273,6 +2278,7 @@ namespace smt {
|
||||||
out << "\n";
|
out << "\n";
|
||||||
display_instr_input_reg(out, m_pc);
|
display_instr_input_reg(out, m_pc);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
bool interpreter::execute_core(code_tree * t, enode * n) {
|
bool interpreter::execute_core(code_tree * t, enode * n) {
|
||||||
TRACE("trigger_bug", tout << "interpreter::execute_core\n"; t->display(tout); tout << "\nenode\n" << mk_ismt2_pp(n->get_owner(), m) << "\n";);
|
TRACE("trigger_bug", tout << "interpreter::execute_core\n"; t->display(tout); tout << "\nenode\n" << mk_ismt2_pp(n->get_owner(), m) << "\n";);
|
||||||
|
@ -2839,6 +2845,7 @@ namespace smt {
|
||||||
return false;
|
return false;
|
||||||
} // end of execute_core
|
} // end of execute_core
|
||||||
|
|
||||||
|
#if 0
|
||||||
void display_trees(std::ostream & out, const ptr_vector<code_tree> & trees) {
|
void display_trees(std::ostream & out, const ptr_vector<code_tree> & trees) {
|
||||||
unsigned lbl = 0;
|
unsigned lbl = 0;
|
||||||
for (code_tree * tree : trees) {
|
for (code_tree * tree : trees) {
|
||||||
|
@ -2849,6 +2856,7 @@ namespace smt {
|
||||||
++lbl;
|
++lbl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
// ------------------------------------
|
// ------------------------------------
|
||||||
//
|
//
|
||||||
|
@ -4010,11 +4018,13 @@ namespace smt {
|
||||||
SASSERT(approx_subset(r1->get_lbls(), r2->get_lbls()));
|
SASSERT(approx_subset(r1->get_lbls(), r2->get_lbls()));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
namespace smt {
|
||||||
mam * mk_mam(context & ctx) {
|
mam * mk_mam(context & ctx) {
|
||||||
return alloc(mam_impl, ctx, true);
|
return alloc(mam_impl, ctx, true);
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
#ifdef Z3DEBUG
|
#ifdef Z3DEBUG
|
||||||
void pp(smt::code_tree * c) {
|
void pp(smt::code_tree * c) {
|
||||||
|
|
|
@ -25,7 +25,9 @@ Revision History:
|
||||||
#include "util/map.h"
|
#include "util/map.h"
|
||||||
#include "util/hashtable.h"
|
#include "util/hashtable.h"
|
||||||
|
|
||||||
namespace smt {
|
using namespace smt;
|
||||||
|
|
||||||
|
namespace {
|
||||||
|
|
||||||
typedef map<bool_var, double, int_hash, default_eq<bool_var> > theory_var_priority_map;
|
typedef map<bool_var, double, int_hash, default_eq<bool_var> > theory_var_priority_map;
|
||||||
|
|
||||||
|
@ -1250,8 +1252,9 @@ namespace smt {
|
||||||
|
|
||||||
~theory_aware_branching_queue() override {};
|
~theory_aware_branching_queue() override {};
|
||||||
};
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
namespace smt {
|
||||||
case_split_queue * mk_case_split_queue(context & ctx, smt_params & p) {
|
case_split_queue * mk_case_split_queue(context & ctx, smt_params & p) {
|
||||||
if (ctx.relevancy_lvl() < 2 && (p.m_case_split_strategy == CS_RELEVANCY || p.m_case_split_strategy == CS_RELEVANCY_ACTIVITY ||
|
if (ctx.relevancy_lvl() < 2 && (p.m_case_split_strategy == CS_RELEVANCY || p.m_case_split_strategy == CS_RELEVANCY_ACTIVITY ||
|
||||||
p.m_case_split_strategy == CS_RELEVANCY_GOAL)) {
|
p.m_case_split_strategy == CS_RELEVANCY_GOAL)) {
|
||||||
|
@ -1281,5 +1284,4 @@ namespace smt {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
}
|
||||||
|
|
||||||
|
|
|
@ -30,7 +30,7 @@ Revision History:
|
||||||
#include "model/model.h"
|
#include "model/model.h"
|
||||||
#include "solver/solver.h"
|
#include "solver/solver.h"
|
||||||
|
|
||||||
namespace smt {
|
namespace {
|
||||||
|
|
||||||
class get_implied_equalities_impl {
|
class get_implied_equalities_impl {
|
||||||
|
|
||||||
|
@ -177,7 +177,7 @@ namespace smt {
|
||||||
|
|
||||||
uint_set non_values;
|
uint_set non_values;
|
||||||
|
|
||||||
if (!is_value_sort(m, srt)) {
|
if (!smt::is_value_sort(m, srt)) {
|
||||||
for (unsigned i = 0; i < terms.size(); ++i) {
|
for (unsigned i = 0; i < terms.size(); ++i) {
|
||||||
non_values.insert(i);
|
non_values.insert(i);
|
||||||
}
|
}
|
||||||
|
@ -370,12 +370,14 @@ namespace smt {
|
||||||
|
|
||||||
stopwatch get_implied_equalities_impl::s_timer;
|
stopwatch get_implied_equalities_impl::s_timer;
|
||||||
stopwatch get_implied_equalities_impl::s_stats_val_eq_timer;
|
stopwatch get_implied_equalities_impl::s_stats_val_eq_timer;
|
||||||
|
}
|
||||||
|
|
||||||
|
namespace smt {
|
||||||
lbool implied_equalities(ast_manager& m, solver& solver, unsigned num_terms, expr* const* terms, unsigned* class_ids) {
|
lbool implied_equalities(ast_manager& m, solver& solver, unsigned num_terms, expr* const* terms, unsigned* class_ids) {
|
||||||
get_implied_equalities_impl gi(m, solver);
|
get_implied_equalities_impl gi(m, solver);
|
||||||
return gi(num_terms, terms, class_ids);
|
return gi(num_terms, terms, class_ids);
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -27,7 +27,7 @@ Notes:
|
||||||
#include "ast/func_decl_dependencies.h"
|
#include "ast/func_decl_dependencies.h"
|
||||||
#include "util/dec_ref_util.h"
|
#include "util/dec_ref_util.h"
|
||||||
|
|
||||||
namespace smt {
|
namespace {
|
||||||
|
|
||||||
class smt_solver : public solver_na2as {
|
class smt_solver : public solver_na2as {
|
||||||
|
|
||||||
|
@ -445,18 +445,20 @@ namespace smt {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
};
|
|
||||||
|
|
||||||
solver * mk_smt_solver(ast_manager & m, params_ref const & p, symbol const & logic) {
|
|
||||||
return alloc(smt::smt_solver, m, p, logic);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
solver * mk_smt_solver(ast_manager & m, params_ref const & p, symbol const & logic) {
|
||||||
|
return alloc(smt_solver, m, p, logic);
|
||||||
|
}
|
||||||
|
|
||||||
|
namespace {
|
||||||
class smt_solver_factory : public solver_factory {
|
class smt_solver_factory : public solver_factory {
|
||||||
public:
|
public:
|
||||||
solver * operator()(ast_manager & m, params_ref const & p, bool proofs_enabled, bool models_enabled, bool unsat_core_enabled, symbol const & logic) override {
|
solver * operator()(ast_manager & m, params_ref const & p, bool proofs_enabled, bool models_enabled, bool unsat_core_enabled, symbol const & logic) override {
|
||||||
return mk_smt_solver(m, p, logic);
|
return mk_smt_solver(m, p, logic);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
}
|
||||||
|
|
||||||
solver_factory * mk_smt_solver_factory() {
|
solver_factory * mk_smt_solver_factory() {
|
||||||
return alloc(smt_solver_factory);
|
return alloc(smt_solver_factory);
|
||||||
|
|
|
@ -25,7 +25,7 @@ bool uses_theory(expr * n, family_id fid) {
|
||||||
return uses_theory(n, fid, visited);
|
return uses_theory(n, fid, visited);
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace uses_theory_ns {
|
namespace {
|
||||||
struct found {};
|
struct found {};
|
||||||
struct proc {
|
struct proc {
|
||||||
family_id m_fid;
|
family_id m_fid;
|
||||||
|
@ -34,16 +34,15 @@ namespace uses_theory_ns {
|
||||||
void operator()(app * n) { if (n->get_family_id() == m_fid) throw found(); }
|
void operator()(app * n) { if (n->get_family_id() == m_fid) throw found(); }
|
||||||
void operator()(quantifier * n) {}
|
void operator()(quantifier * n) {}
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
bool uses_theory(expr * n, family_id fid, expr_mark & visited) {
|
bool uses_theory(expr * n, family_id fid, expr_mark & visited) {
|
||||||
uses_theory_ns::proc p(fid);
|
proc p(fid);
|
||||||
try {
|
try {
|
||||||
for_each_expr(p, visited, n);
|
for_each_expr(p, visited, n);
|
||||||
}
|
}
|
||||||
catch (const uses_theory_ns::found &) {
|
catch (const found &) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -22,6 +22,8 @@ Revision History:
|
||||||
#include "ast/arith_decl_plugin.h"
|
#include "ast/arith_decl_plugin.h"
|
||||||
#include "tactic/goal_util.h"
|
#include "tactic/goal_util.h"
|
||||||
|
|
||||||
|
namespace {
|
||||||
|
|
||||||
class arith_degree_probe : public probe {
|
class arith_degree_probe : public probe {
|
||||||
struct proc {
|
struct proc {
|
||||||
ast_manager & m;
|
ast_manager & m;
|
||||||
|
@ -163,6 +165,8 @@ struct has_nlmul {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
probe * mk_arith_avg_degree_probe() {
|
probe * mk_arith_avg_degree_probe() {
|
||||||
return alloc(arith_degree_probe, true);
|
return alloc(arith_degree_probe, true);
|
||||||
}
|
}
|
||||||
|
@ -179,6 +183,7 @@ probe * mk_arith_max_bw_probe() {
|
||||||
return alloc(arith_bw_probe, false);
|
return alloc(arith_bw_probe, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
namespace {
|
||||||
struct is_non_qflira_functor {
|
struct is_non_qflira_functor {
|
||||||
struct found {};
|
struct found {};
|
||||||
ast_manager & m;
|
ast_manager & m;
|
||||||
|
@ -392,6 +397,8 @@ public:
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
probe * mk_is_qflia_probe() {
|
probe * mk_is_qflia_probe() {
|
||||||
return alloc(is_qflia_probe);
|
return alloc(is_qflia_probe);
|
||||||
}
|
}
|
||||||
|
@ -417,6 +424,8 @@ probe * mk_is_mip_probe() {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
namespace {
|
||||||
|
|
||||||
struct is_non_nira_functor {
|
struct is_non_nira_functor {
|
||||||
struct found {};
|
struct found {};
|
||||||
ast_manager & m;
|
ast_manager & m;
|
||||||
|
@ -697,6 +706,8 @@ public:
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
probe * mk_is_qfnia_probe() {
|
probe * mk_is_qfnia_probe() {
|
||||||
return alloc(is_qfnia_probe);
|
return alloc(is_qfnia_probe);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue