当前位置: 首页>>代码示例>>C++>>正文


C++ expr_ref::get方法代码示例

本文整理汇总了C++中expr_ref::get方法的典型用法代码示例。如果您正苦于以下问题:C++ expr_ref::get方法的具体用法?C++ expr_ref::get怎么用?C++ expr_ref::get使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在expr_ref的用法示例。


在下文中一共展示了expr_ref::get方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: reduce_fix

void expr_context_simplifier::reduce_fix(expr * m, expr_ref & result) {
    expr_ref tmp(m_manager);
    result = m;
    do {
        tmp = result.get();
        reduce(tmp.get(), result);
    }
    while (tmp.get() != result.get());
}
开发者ID:sukwon0709,项目名称:byterun,代码行数:9,代码来源:expr_context_simplifier.cpp

示例2: delta_dfs

bool expr_delta::delta_dfs(unsigned& n, expr* e, expr_ref& result) {
    ast_manager& m = m_manager;
    if (m.is_true(e) || m.is_false(e)) {
        return false;
    }
    if (n == 0 && m.is_bool(e)) {
        result = m.mk_true();
        return true;
    }
    else if (n == 1 && m.is_bool(e)) {
        result = m.mk_false();
        return true;
    }
    else if (is_app(e)) {
        if (m.is_bool(e)) {
            SASSERT(n >= 2);
            n -= 2;
        }
        return delta_dfs(n, to_app(e), result);
    }
    else if (is_quantifier(e)) {
        SASSERT(n >= 2);
        n -= 2;
        quantifier* q = to_quantifier(e);
        if (delta_dfs(n, q->get_expr(), result)) {
            result = m.update_quantifier(q, result.get());
            return true;
        }
        else {
            return false;
        }
    }
    return false;
}
开发者ID:annachen368,项目名称:HadoopStreamingTester,代码行数:34,代码来源:expr_delta.cpp

示例3: simplify_expr

    void mk_interp_tail_simplifier::simplify_expr(app * a, expr_ref& res)
    {
        expr_ref simp1_res(m);
        m_simp(a, simp1_res);
        (*m_rw)(simp1_res.get(), res);

        m_simp(res.get(), res);
    }
开发者ID:chadbrewbaker,项目名称:z3,代码行数:8,代码来源:dl_mk_interp_tail_simplifier.cpp

示例4: pull_ite

 br_status pull_ite(expr_ref & result) {
     expr * t = result.get();
     if (is_app(t)) {
         br_status st = pull_ite(to_app(t)->get_decl(), to_app(t)->get_num_args(), to_app(t)->get_args(), result);
         if (st != BR_FAILED)
             return st;
     }
     return BR_DONE;
 }
开发者ID:sukwon0709,项目名称:byterun,代码行数:9,代码来源:th_rewriter.cpp

示例5: simplify_expr

    void mk_interp_tail_simplifier::simplify_expr(app * a, expr_ref& res)
    {
        expr_ref simp1_res(m);
        m_simp(a, simp1_res);
        (*m_rw)(simp1_res.get(), res);

        /*if (simp1_res.get()!=res.get()) {
            std::cout<<"pre norm:\n"<<mk_pp(simp1_res.get(),m)<<"post norm:\n"<<mk_pp(res.get(),m)<<"\n";
        }*/

        m_simp(res.get(), res);
    }
开发者ID:CHolmes3,项目名称:z3,代码行数:12,代码来源:dl_mk_interp_tail_simplifier.cpp

示例6: emap

void bit2int::operator()(expr * m, expr_ref & result, proof_ref& p) {
    flush_cache();
    expr_reduce emap(*this);
    for_each_ast(emap, m);
    result = get_cached(m);
    if (m_manager.proofs_enabled() && m != result.get()) {
        // TBD: rough
        p = m_manager.mk_rewrite(m, result);
    }
    TRACE("bit2int",
          tout << mk_pp(m, m_manager) << "======>\n"
          << mk_pp(result, m_manager) << "\n";);
开发者ID:annachen368,项目名称:HadoopStreamingTester,代码行数:12,代码来源:bit2int.cpp

示例7: parse

bool simple_parser::parse(std::istream & in, expr_ref & result) {
	scanner s(in, std::cerr, false);
    try {
        result = parse_expr(s);
        if (!result)
            throw parser_error();
    }
    catch (parser_error) {
        warning_msg("parser error");
        return false;
    } 
    m_exprs.reset();
    return result.get() != 0;
}
开发者ID:Moondee,项目名称:Artemis,代码行数:14,代码来源:simple_parser.cpp

示例8: get_literal

 expr* get_literal() { return m_literal.get(); }
开发者ID:CharudattaSChitale,项目名称:sygus-comp14,代码行数:1,代码来源:api_solver_old.cpp

示例9: unify_add

 // Return true if t1 and t2 are of the form:
 //   t + a1*x1 + ... + an*xn
 //   t' + a1*x1 + ... + an*xn
 // Store t in new_t1, t' in new_t2 and (a1*x1 + ... + an*xn) in c.
 bool unify_add(app * t1, expr * t2, expr_ref & new_t1, expr_ref & new_t2, expr_ref & c) {
     unsigned num1 = t1->get_num_args();
     expr * const * ms1 = t1->get_args();
     if (num1 < 2)
         return false;
     unsigned num2;
     expr * const * ms2;
     if (m_a_util.is_add(t2)) {
         num2 = to_app(t2)->get_num_args();
         ms2  = to_app(t2)->get_args();
     }
     else {
         num2 = 1;
         ms2  = &t2;
     }
     if (num1 != num2 && num1 != num2 + 1 && num1 != num2 - 1)
         return false;
     new_t1 = 0;
     new_t2 = 0;
     expr_fast_mark1 visited1;
     expr_fast_mark2 visited2;
     for (unsigned i = 0; i < num1; i++) {
         expr * arg = ms1[i];
         visited1.mark(arg);
     }
     for (unsigned i = 0; i < num2; i++) {
         expr * arg = ms2[i];
         visited2.mark(arg);
         if (visited1.is_marked(arg))
             continue;
         if (new_t2)
             return false; // more than one missing term
         new_t2 = arg;
     }
     for (unsigned i = 0; i < num1; i++) {
         expr * arg = ms1[i];
         if (visited2.is_marked(arg))
             continue;
         if (new_t1)
             return false; // more than one missing term
         new_t1 = arg;
     }
     // terms matched...
     bool is_int = m_a_util.is_int(t1);
     if (!new_t1) 
         new_t1 = m_a_util.mk_numeral(rational(0), is_int);
     if (!new_t2)
         new_t2 = m_a_util.mk_numeral(rational(0), is_int);
     // mk common part
     ptr_buffer<expr> args;
     for (unsigned i = 0; i < num1; i++) {
         expr * arg = ms1[i];
         if (arg == new_t1.get())
             continue;
         args.push_back(arg);
     }
     SASSERT(!args.empty());
     if (args.size() == 1) 
         c = args[0];
     else
         c = m_a_util.mk_add(args.size(), args.c_ptr());
     return true;
 }
开发者ID:sukwon0709,项目名称:byterun,代码行数:67,代码来源:th_rewriter.cpp


注:本文中的expr_ref::get方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。