コード例 #1
0
ファイル: add_bounds_tactic.cpp プロジェクト: CHolmes3/z3
bool is_unbounded(goal const & g) {
    ast_manager & m = g.m();
    bound_manager bm(m);
    bm(g);
    is_unbounded_proc proc(bm);
    return test(g, proc);
}
コード例 #2
0
ファイル: probe_arith.cpp プロジェクト: jackluo923/juxta
 virtual result operator()(goal const & g) {
     proc p(g.m());
     for_each_expr_at(p, g);
     if (m_avg)
         return p.m_counter == 0 ? 0.0 : static_cast<double>(p.m_acc_degree)/static_cast<double>(p.m_counter);
     else
         return p.m_max_degree;
 }
コード例 #3
0
ファイル: smt_solver_exp.cpp プロジェクト: sukwon0709/byterun
 void solver_exp::assert_goal(goal const & g) {
     SASSERT(&(g.m()) == &m_ext_mng);
     ast_translation translator(m_ext_mng, m, false);
     unsigned sz = g.size();
     for (unsigned i = 0; i < sz; i++) {
         assert_expr_core(g.form(i), translator);
     }
 }
コード例 #4
0
ファイル: ackr_bound_probe.cpp プロジェクト: angr/angr-z3
 result operator()(goal const & g) override {
     proc p(g.m());
     unsigned sz = g.size();
     expr_fast_mark1 visited;
     for (unsigned i = 0; i < sz; i++) {
         for_each_expr_core<proc, expr_fast_mark1, true, true>(p, visited, g.form(i));
     }
     const double total = ackr_helper::calculate_lemma_bound(p.m_fun2terms);
     TRACE("ackr_bound_probe", tout << "total=" << total << std::endl;);
コード例 #5
0
ファイル: probe.cpp プロジェクト: jackluo923/juxta
 virtual result operator()(goal const & g) {
     proc p(g.m(), m_bool, m_family);
     unsigned sz = g.size();
     expr_fast_mark1 visited;
     for (unsigned i = 0; i < sz; i++) {
         for_each_expr_core<proc, expr_fast_mark1, true, true>(p, visited, g.form(i));
     }
     return result(p.m_counter);
 }
コード例 #6
0
// Copy configuration: depth, models/proofs/cores flags, and precision from src.
// The assertions are not copied
goal::goal(goal const & src, bool):
    m_manager(src.m()),
    m_ref_count(0),
    m_depth(src.m_depth), 
    m_models_enabled(src.models_enabled()),
    m_proofs_enabled(src.proofs_enabled()), 
    m_core_enabled(src.unsat_core_enabled()), 
    m_inconsistent(false), 
    m_precision(src.m_precision) {
}
コード例 #7
0
goal::goal(goal const & src):
    m_manager(src.m()),
    m_ref_count(0),
    m_depth(0), 
    m_models_enabled(src.models_enabled()),
    m_proofs_enabled(src.proofs_enabled()), 
    m_core_enabled(src.unsat_core_enabled()), 
    m_inconsistent(false), 
    m_precision(PRECISE) {
    copy_from(src);
    }
コード例 #8
0
ファイル: qflia_tactic.cpp プロジェクト: therealoneisneo/Z3
 virtual result operator()(goal const & g) {
     bool found_non_01 = false;
     bound_manager bm(g.m());
     bm(g);
     rational l, u; bool st;
     bound_manager::iterator it  = bm.begin();
     bound_manager::iterator end = bm.end();
     for (; it != end; ++it) {
         expr * t = *it;
         if (bm.has_lower(t, l, st) && bm.has_upper(t, u, st) && (l.is_zero() || l.is_one()) && (u.is_zero() || u.is_one()))
             continue;
         if (found_non_01)
             return false;
         found_non_01 = true;
     }
     return true;
 }
コード例 #9
0
ファイル: probe_arith.cpp プロジェクト: jackluo923/juxta
static bool is_lp(goal const & g) {
    ast_manager & m = g.m();
    arith_util u(m);
    unsigned sz = g.size();
    for (unsigned i = 0; i < sz; i++) {
        expr * f  = g.form(i);
        bool sign = false;
        while (m.is_not(f, f))
            sign = !sign;
        if (m.is_eq(f) && !sign) {
            if (m.get_sort(to_app(f)->get_arg(0))->get_family_id() != u.get_family_id())
                return false;
            continue;
        }
        if (u.is_le(f) || u.is_ge(f) || u.is_lt(f) || u.is_gt(f))
            continue;
        return false;
    }
    return true;
}
コード例 #10
0
ファイル: probe_arith.cpp プロジェクト: jackluo923/juxta
static bool is_lira(goal const & g) {
    is_non_nira_functor p(g.m(), true, true, true, true);
    return !test(g, p);
}
コード例 #11
0
ファイル: probe_arith.cpp プロジェクト: jackluo923/juxta
static bool is_qfnia(goal const & g) {
    is_non_nira_functor p(g.m(), true, false, false, false);
    return !test(g, p);
}
コード例 #12
0
ファイル: probe_arith.cpp プロジェクト: jackluo923/juxta
static bool is_qflra(goal const & g) {
    is_non_qflira_functor p(g.m(), false, true);
    return !test(g, p);
}
コード例 #13
0
ファイル: bv1_blaster_tactic.cpp プロジェクト: CHolmes3/z3
    virtual result operator()(goal const & g) {
        bv1_blaster_tactic t(g.m());
        return t.is_target(g);

    }
コード例 #14
0
ファイル: probe_arith.cpp プロジェクト: AleksandarZeljic/z3
static bool is_qfufnra(goal const& g) {
    is_non_qfufnra_functor p(g.m());
    return !g.proofs_enabled() && !g.unsat_core_enabled() && !test(g, p) && p.has_nonlinear();
}