3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-12 12:08:18 +00:00
This commit is contained in:
Christoph M. Wintersteiger 2017-06-20 14:39:26 +01:00
commit e9258731e4
4 changed files with 14 additions and 4 deletions

View file

@ -558,6 +558,7 @@ extern "C" {
Z3_TRY; Z3_TRY;
LOG_Z3_get_sort(c, a); LOG_Z3_get_sort(c, a);
RESET_ERROR_CODE(); RESET_ERROR_CODE();
CHECK_IS_EXPR(a, 0);
Z3_sort r = of_sort(mk_c(c)->m().get_sort(to_expr(a))); Z3_sort r = of_sort(mk_c(c)->m().get_sort(to_expr(a)));
RETURN_Z3(r); RETURN_Z3(r);
Z3_CATCH_RETURN(0); Z3_CATCH_RETURN(0);

View file

@ -318,7 +318,7 @@ class AstRef(Z3PPObject):
raise Z3Exception("Symbolic expressions cannot be cast to concrete Boolean values.") raise Z3Exception("Symbolic expressions cannot be cast to concrete Boolean values.")
def sexpr(self): def sexpr(self):
"""Return an string representing the AST node in s-expression notation. """Return a string representing the AST node in s-expression notation.
>>> x = Int('x') >>> x = Int('x')
>>> ((x + 1)*x).sexpr() >>> ((x + 1)*x).sexpr()

View file

@ -1491,8 +1491,10 @@ namespace fm {
unsigned sz = g.size(); unsigned sz = g.size();
for (unsigned i = 0; i < sz; i++) { for (unsigned i = 0; i < sz; i++) {
expr * f = g[i]; expr * f = g[i];
if (is_occ(f)) if (is_occ(f)) {
TRACE("qe_lite", tout << "OCC: " << mk_ismt2_pp(f, m) << "\n";);
continue; continue;
}
TRACE("qe_lite", tout << "not OCC:\n" << mk_ismt2_pp(f, m) << "\n";); TRACE("qe_lite", tout << "not OCC:\n" << mk_ismt2_pp(f, m) << "\n";);
quick_for_each_expr(proc, visited, f); quick_for_each_expr(proc, visited, f);
} }
@ -2221,6 +2223,9 @@ namespace fm {
void operator()(expr_ref_vector& fmls) { void operator()(expr_ref_vector& fmls) {
init(fmls); init(fmls);
init_use_list(fmls); init_use_list(fmls);
for (auto & f : fmls) {
if (has_quantifiers(f)) return;
}
if (m_inconsistent) { if (m_inconsistent) {
m_new_fmls.reset(); m_new_fmls.reset();
m_new_fmls.push_back(m.mk_false()); m_new_fmls.push_back(m.mk_false());

View file

@ -2180,8 +2180,12 @@ void theory_seq::internalize_eq_eh(app * atom, bool_var v) {
} }
bool theory_seq::internalize_atom(app* a, bool) { bool theory_seq::internalize_atom(app* a, bool) {
#if 1
return internalize_term(a); return internalize_term(a);
#if 0 #else
if (is_skolem(m_eq, a)) {
return internalize_term(a);
}
context & ctx = get_context(); context & ctx = get_context();
bool_var bv = ctx.mk_bool_var(a); bool_var bv = ctx.mk_bool_var(a);
ctx.set_var_theory(bv, get_id()); ctx.set_var_theory(bv, get_id());
@ -2196,7 +2200,7 @@ bool theory_seq::internalize_atom(app* a, bool) {
m_util.str.is_suffix(a, e1, e2)) { m_util.str.is_suffix(a, e1, e2)) {
return internalize_term(to_app(e1)) && internalize_term(to_app(e2)); return internalize_term(to_app(e1)) && internalize_term(to_app(e2));
} }
if (is_accept(a) || is_reject(a) || is_skolem(m_eq, a) || is_step(a) || is_skolem(symbol("seq.is_digit"), a)) { if (is_accept(a) || is_reject(a) || is_step(a) || is_skolem(symbol("seq.is_digit"), a)) {
return true; return true;
} }
UNREACHABLE(); UNREACHABLE();