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


C++ ast_manager::is_false方法代码示例

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


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

示例1: is_atom

bool is_atom(ast_manager & m, expr * n) {
    if (is_quantifier(n) || !m.is_bool(n))
        return false;
    if (is_var(n))
        return true;
    SASSERT(is_app(n));
    if (to_app(n)->get_family_id() != m.get_basic_family_id()) {
        return true;        
    }
    // the other operators of the basic family are not considered atomic: distinct, ite, and, or, iff, xor, not, implies.
    return (m.is_eq(n) && !m.is_bool(to_app(n)->get_arg(0))) || m.is_true(n) || m.is_false(n);
}
开发者ID:CharudattaSChitale,项目名称:sygus-comp14,代码行数:12,代码来源:ast_util.cpp

示例2: test_qe

static void test_qe(ast_manager& m, lbool expected_outcome, expr* fml, char const* option) {

    //    enable_trace("bit2int");
    //enable_trace("gomory_cut");
    enable_trace("final_check_arith");
    enable_trace("arith_final_check");
    //enable_trace("arith_branching");
    enable_trace("theory_arith_int");
    enable_trace("presburger");
    enable_trace("quant_elim");
    // enable_trace("arith_simplifier_plugin");
    // enable_trace("non_linear");
    // enable_trace("gomory_cut_detail");
    // enable_trace("arith");
    // enable_trace("bv");
    // enable_trace("after_search");
    // enable_trace("bv_bit_prop");

    simplifier simp(m);
    front_end_params params;
    params.m_quant_elim = true;

    std::cout << mk_pp(fml, m) << "\n";
    qe::expr_quant_elim qe(m, params);
    expr_ref result(m);
    qe(m.mk_true(), fml, result);
    std::cout << " -> " << mk_pp(result, m) << " " << expected_outcome << "\n";
    if (expected_outcome == l_true && !m.is_true(result)) {
        std::cout << "ERROR: expected true, instead got " << ast_pp(result, m).c_str() << "\n";
        //exit(-1);
    }
    if (expected_outcome == l_false && !m.is_false(result)) {
        std::cout << "ERROR: expected false, instead got " << ast_pp(result, m).c_str() << "\n";
        //exit(-1);
    }
}
开发者ID:Moondee,项目名称:Artemis,代码行数:36,代码来源:quant_elim.cpp


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