mirror of
https://github.com/Z3Prover/z3
synced 2025-04-15 13:28:47 +00:00
whitespace
This commit is contained in:
parent
264bb6321a
commit
d746b410cf
|
@ -8,10 +8,10 @@ Module Name:
|
||||||
Abstract:
|
Abstract:
|
||||||
|
|
||||||
Evaluates/Probes a goal.
|
Evaluates/Probes a goal.
|
||||||
|
|
||||||
A probe is used to build tactics (aka strategies) that
|
A probe is used to build tactics (aka strategies) that
|
||||||
makes decisions based on the structure of a goal.
|
makes decisions based on the structure of a goal.
|
||||||
|
|
||||||
Author:
|
Author:
|
||||||
|
|
||||||
Leonardo de Moura (leonardo) 2011-10-13.
|
Leonardo de Moura (leonardo) 2011-10-13.
|
||||||
|
@ -75,12 +75,12 @@ protected:
|
||||||
public:
|
public:
|
||||||
unary_probe(probe * p):
|
unary_probe(probe * p):
|
||||||
m_p(p) {
|
m_p(p) {
|
||||||
SASSERT(p);
|
SASSERT(p);
|
||||||
p->inc_ref();
|
p->inc_ref();
|
||||||
}
|
}
|
||||||
|
|
||||||
~unary_probe() {
|
~unary_probe() {
|
||||||
m_p->dec_ref();
|
m_p->dec_ref();
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
@ -91,17 +91,17 @@ protected:
|
||||||
probe * m_p2;
|
probe * m_p2;
|
||||||
public:
|
public:
|
||||||
bin_probe(probe * p1, probe * p2):
|
bin_probe(probe * p1, probe * p2):
|
||||||
m_p1(p1),
|
m_p1(p1),
|
||||||
m_p2(p2) {
|
m_p2(p2) {
|
||||||
SASSERT(p1);
|
SASSERT(p1);
|
||||||
SASSERT(p2);
|
SASSERT(p2);
|
||||||
p1->inc_ref();
|
p1->inc_ref();
|
||||||
p2->inc_ref();
|
p2->inc_ref();
|
||||||
}
|
}
|
||||||
|
|
||||||
~bin_probe() {
|
~bin_probe() {
|
||||||
m_p1->dec_ref();
|
m_p1->dec_ref();
|
||||||
m_p2->dec_ref();
|
m_p2->dec_ref();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -110,7 +110,7 @@ public:
|
||||||
not_probe(probe * p):unary_probe(p) {}
|
not_probe(probe * p):unary_probe(p) {}
|
||||||
virtual result operator()(goal const & g) {
|
virtual result operator()(goal const & g) {
|
||||||
return result(!m_p->operator()(g).is_true());
|
return result(!m_p->operator()(g).is_true());
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
class and_probe : public bin_probe {
|
class and_probe : public bin_probe {
|
||||||
|
@ -181,9 +181,9 @@ class const_probe : public probe {
|
||||||
double m_val;
|
double m_val;
|
||||||
public:
|
public:
|
||||||
const_probe(double v):m_val(v) {}
|
const_probe(double v):m_val(v) {}
|
||||||
|
|
||||||
virtual result operator()(goal const & g) {
|
virtual result operator()(goal const & g) {
|
||||||
return result(m_val);
|
return result(m_val);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -257,11 +257,11 @@ struct is_non_propositional_predicate {
|
||||||
void operator()(app * n) {
|
void operator()(app * n) {
|
||||||
if (!m.is_bool(n))
|
if (!m.is_bool(n))
|
||||||
throw found();
|
throw found();
|
||||||
|
|
||||||
family_id fid = n->get_family_id();
|
family_id fid = n->get_family_id();
|
||||||
if (fid == m.get_basic_family_id())
|
if (fid == m.get_basic_family_id())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (is_uninterp_const(n))
|
if (is_uninterp_const(n))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -277,21 +277,21 @@ struct is_non_qfbv_predicate {
|
||||||
is_non_qfbv_predicate(ast_manager & _m):m(_m), u(m) {}
|
is_non_qfbv_predicate(ast_manager & _m):m(_m), u(m) {}
|
||||||
|
|
||||||
void operator()(var *) { throw found(); }
|
void operator()(var *) { throw found(); }
|
||||||
|
|
||||||
void operator()(quantifier *) { throw found(); }
|
void operator()(quantifier *) { throw found(); }
|
||||||
|
|
||||||
void operator()(app * n) {
|
void operator()(app * n) {
|
||||||
if (!m.is_bool(n) && !u.is_bv(n))
|
if (!m.is_bool(n) && !u.is_bv(n))
|
||||||
throw found();
|
throw found();
|
||||||
family_id fid = n->get_family_id();
|
family_id fid = n->get_family_id();
|
||||||
if (fid == m.get_basic_family_id())
|
if (fid == m.get_basic_family_id())
|
||||||
return;
|
return;
|
||||||
if (fid == u.get_family_id()) {
|
if (fid == u.get_family_id()) {
|
||||||
if (n->get_decl_kind() == OP_BSDIV0 ||
|
if (n->get_decl_kind() == OP_BSDIV0 ||
|
||||||
n->get_decl_kind() == OP_BUDIV0 ||
|
n->get_decl_kind() == OP_BUDIV0 ||
|
||||||
n->get_decl_kind() == OP_BSREM0 ||
|
n->get_decl_kind() == OP_BSREM0 ||
|
||||||
n->get_decl_kind() == OP_BUREM0 ||
|
n->get_decl_kind() == OP_BUREM0 ||
|
||||||
n->get_decl_kind() == OP_BSMOD0)
|
n->get_decl_kind() == OP_BSMOD0)
|
||||||
throw found();
|
throw found();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -321,7 +321,7 @@ probe * mk_is_propositional_probe() {
|
||||||
}
|
}
|
||||||
|
|
||||||
probe * mk_is_qfbv_probe() {
|
probe * mk_is_qfbv_probe() {
|
||||||
return alloc(is_qfbv_probe);
|
return alloc(is_qfbv_probe);
|
||||||
}
|
}
|
||||||
|
|
||||||
struct is_non_qfaufbv_predicate {
|
struct is_non_qfaufbv_predicate {
|
||||||
|
@ -336,7 +336,7 @@ struct is_non_qfaufbv_predicate {
|
||||||
|
|
||||||
void operator()(quantifier *) { throw found(); }
|
void operator()(quantifier *) { throw found(); }
|
||||||
|
|
||||||
void operator()(app * n) {
|
void operator()(app * n) {
|
||||||
if (!m.is_bool(n) && !m_bv_util.is_bv(n) && !m_array_util.is_array(n))
|
if (!m.is_bool(n) && !m_bv_util.is_bv(n) && !m_array_util.is_array(n))
|
||||||
throw found();
|
throw found();
|
||||||
family_id fid = n->get_family_id();
|
family_id fid = n->get_family_id();
|
||||||
|
@ -418,7 +418,7 @@ class num_consts_probe : public probe {
|
||||||
}
|
}
|
||||||
void operator()(quantifier *) {}
|
void operator()(quantifier *) {}
|
||||||
void operator()(var *) {}
|
void operator()(var *) {}
|
||||||
void operator()(app * n) {
|
void operator()(app * n) {
|
||||||
if (n->get_num_args() == 0 && !m.is_value(n)) {
|
if (n->get_num_args() == 0 && !m.is_value(n)) {
|
||||||
if (m_bool) {
|
if (m_bool) {
|
||||||
if (m.is_bool(n))
|
if (m.is_bool(n))
|
||||||
|
@ -447,7 +447,7 @@ public:
|
||||||
unsigned sz = g.size();
|
unsigned sz = g.size();
|
||||||
expr_fast_mark1 visited;
|
expr_fast_mark1 visited;
|
||||||
for (unsigned i = 0; i < sz; i++) {
|
for (unsigned i = 0; i < sz; i++) {
|
||||||
for_each_expr_core<proc, expr_fast_mark1, true, true>(p, visited, g.form(i));
|
for_each_expr_core<proc, expr_fast_mark1, true, true>(p, visited, g.form(i));
|
||||||
}
|
}
|
||||||
return result(p.m_counter);
|
return result(p.m_counter);
|
||||||
}
|
}
|
||||||
|
@ -508,7 +508,7 @@ struct has_pattern_probe : public probe {
|
||||||
struct proc {
|
struct proc {
|
||||||
void operator()(var * n) {}
|
void operator()(var * n) {}
|
||||||
void operator()(app * n) {}
|
void operator()(app * n) {}
|
||||||
void operator()(quantifier * n) {
|
void operator()(quantifier * n) {
|
||||||
if (n->get_num_patterns() > 0 || n->get_num_no_patterns() > 0)
|
if (n->get_num_patterns() > 0 || n->get_num_no_patterns() > 0)
|
||||||
throw found();
|
throw found();
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,7 +8,7 @@ Module Name:
|
||||||
Abstract:
|
Abstract:
|
||||||
|
|
||||||
Evaluates/Probes a goal.
|
Evaluates/Probes a goal.
|
||||||
|
|
||||||
A probe is used to build tactics (aka strategies) that
|
A probe is used to build tactics (aka strategies) that
|
||||||
makes decisions based on the structure of a goal.
|
makes decisions based on the structure of a goal.
|
||||||
|
|
||||||
|
@ -49,7 +49,7 @@ public:
|
||||||
|
|
||||||
void inc_ref() { ++m_ref_count; }
|
void inc_ref() { ++m_ref_count; }
|
||||||
void dec_ref() { SASSERT(m_ref_count > 0); --m_ref_count; if (m_ref_count == 0) dealloc(this); }
|
void dec_ref() { SASSERT(m_ref_count > 0); --m_ref_count; if (m_ref_count == 0) dealloc(this); }
|
||||||
|
|
||||||
virtual result operator()(goal const & g) = 0;
|
virtual result operator()(goal const & g) = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue