3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-13 20:38:43 +00:00

fix the build

Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
This commit is contained in:
Lev Nachmanson 2019-08-23 16:36:17 -07:00
parent 58854fa44b
commit 3d2fc57b82
3 changed files with 14 additions and 6 deletions

View file

@ -38,6 +38,7 @@ class cross_nested {
nex * m_e;
std::function<bool (const nex*)> m_call_on_result;
std::function<bool (unsigned)> m_var_is_fixed;
std::function<unsigned ()> m_random;
bool m_done;
std::unordered_map<lpvar, occ> m_occurences_map;
std::unordered_map<lpvar, unsigned> m_powers;
@ -45,6 +46,7 @@ class cross_nested {
ptr_vector<nex> m_b_split_vec;
int m_reported;
bool m_random_bit;
#ifdef Z3DEBUG
nex* m_e_clone;
#endif
@ -53,9 +55,11 @@ class cross_nested {
}
public:
cross_nested(std::function<bool (const nex*)> call_on_result,
std::function<bool (unsigned)> var_is_fixed):
std::function<bool (unsigned)> var_is_fixed,
std::function<unsigned ()> random):
m_call_on_result(call_on_result),
m_var_is_fixed(var_is_fixed),
m_random(random),
m_done(false),
m_reported(0)
{}
@ -363,7 +367,7 @@ public:
for (auto & p : m_occurences_map)
vars.push_back(p.first);
m_random_bit = random() % 2;
m_random_bit = m_random() % 2;
TRACE("nla_cn", tout << "m_random_bit = " << m_random_bit << "\n";);
std::sort(vars.begin(), vars.end(), [this](lpvar j, lpvar k)
{

View file

@ -91,8 +91,9 @@ template <typename T>
bool horner::lemmas_on_row(const T& row) {
cross_nested cn(
[this](const nex* n) { return check_cross_nested_expr(n); },
[this](unsigned j) { return c().var_is_fixed(j); }
);
[this](unsigned j) { return c().var_is_fixed(j); },
[this]() { return c().random(); }
);
SASSERT (row_is_interesting(row));
create_sum_from_row(row, cn);

View file

@ -74,11 +74,14 @@ void test_cn_on_expr(nex_sum *t, cross_nested& cn) {
}
void test_cn() {
cross_nested cn([](const nex* n) {
cross_nested cn(
[](const nex* n) {
TRACE("nla_cn_test", tout << *n << "\n";);
return false;
} ,
[](unsigned) { return false; });
[](unsigned) { return false; },
[]{ return 1; }
);
enable_trace("nla_cn");
enable_trace("nla_cn_details");
nex_var* a = cn.mk_var(0);