Exemplo n.º 1
0
    context::context(config_params * p, bool user_ref_count):
        m_params(p ? p->m_params : front_end_params()),
        m_param_ini(m_params),
        m_user_ref_count(user_ref_count),
        m_manager(m_params.m_proof_mode, m_params.m_trace_stream),
        m_plugins(m_manager),
        m_arith_util(m_manager),
        m_bv_util(m_manager),
        m_datalog_util(m_manager),
        m_last_result(m_manager),
        m_ast_trail(m_manager),
        m_replay_stack() {

        m_solver     = 0;
        m_error_code = Z3_OK;
        m_print_mode = Z3_PRINT_SMTLIB_FULL;
        m_searching  = false;
        
        m_interruptable = 0;

        m_smtlib_parser           = 0;
        m_smtlib_parser_has_decls = false;
        
        z3_bound_num_procs();
        //
        // Configuration parameter settings.
        //
        memory::set_high_watermark(static_cast<size_t>(m_params.m_memory_high_watermark)*1024*1024);
        memory::set_max_size(static_cast<size_t>(m_params.m_memory_max_size)*1024*1024);
        if (m_params.m_debug_ref_count) {
            m_manager.debug_ref_count();
        }
        
        m_error_handler = &default_error_handler;

        m_basic_fid = m_manager.get_basic_family_id();
        m_arith_fid = m_manager.get_family_id("arith");
        m_bv_fid    = m_manager.get_family_id("bv");
        m_array_fid = m_manager.get_family_id("array");
        m_dt_fid    = m_manager.get_family_id("datatype");
        m_datalog_fid = m_manager.get_family_id("datalog_relation");
        m_dt_plugin = static_cast<datatype_decl_plugin*>(m_manager.get_plugin(m_dt_fid));

        if (!m_user_ref_count) {
            m_replay_stack.push_back(0);
        }
    
        install_tactics(*this);
    }
Exemplo n.º 2
0
    context::context(context_params * p, bool user_ref_count):
        m_params(p != 0 ? *p : context_params()),
        m_user_ref_count(user_ref_count),
        m_manager(m_params.mk_ast_manager()),
        m_plugins(m()),
        m_arith_util(m()),
        m_bv_util(m()),
        m_datalog_util(m()),
        m_fpa_util(m()),
        m_dtutil(m()),
        m_last_result(m()),
        m_ast_trail(m()),
        m_replay_stack() {

        m_error_code = Z3_OK;
        m_print_mode = Z3_PRINT_SMTLIB_FULL;
        m_searching  = false;
        
        m_interruptable = 0;

        m_smtlib_parser           = 0;
        m_smtlib_parser_has_decls = false;
                
        m_error_handler = &default_error_handler;

        m_basic_fid = m().get_basic_family_id();
        m_arith_fid = m().mk_family_id("arith");
        m_bv_fid    = m().mk_family_id("bv");
        m_pb_fid    = m().mk_family_id("pb");
        m_array_fid = m().mk_family_id("array");
        m_dt_fid    = m().mk_family_id("datatype");
        m_datalog_fid = m().mk_family_id("datalog_relation");
        m_fpa_fid   = m().mk_family_id("fpa");
        m_dt_plugin = static_cast<datatype_decl_plugin*>(m().get_plugin(m_dt_fid));

        if (!m_user_ref_count) {
            m_replay_stack.push_back(0);
        }
    
        install_tactics(*this);
    }