本文整理汇总了C++中datalog::context类的典型用法代码示例。如果您正苦于以下问题:C++ context类的具体用法?C++ context怎么用?C++ context使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了context类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: alloc
dl_interface::dl_interface(datalog::context& ctx) :
m_ctx(ctx),
m_pdr_rules(ctx),
m_old_rules(ctx),
m_context(0) {
m_context = alloc(pdr::context, ctx.get_fparams(), ctx.get_params(), ctx.get_manager());
}
开发者ID:Moondee,项目名称:Artemis,代码行数:7,代码来源:pdr_dl_interface.cpp
示例2: alloc
dl_interface::dl_interface(datalog::context& ctx) :
engine_base(ctx.get_manager(), "pdr"),
m_ctx(ctx),
m_pdr_rules(ctx),
m_old_rules(ctx),
m_context(0),
m_refs(ctx.get_manager()) {
m_context = alloc(pdr::context, ctx.get_fparams(), ctx.get_params(), ctx.get_manager());
}
开发者ID:jackluo923,项目名称:juxta,代码行数:9,代码来源:pdr_dl_interface.cpp
示例3: set_state
void set_state(void* state) {
SASSERT(!m_state);
m_state = state;
symbol name("datalog_relation");
ast_manager& m = m_context.get_manager();
if (!m.has_plugin(name)) {
m.register_plugin(name, alloc(datalog::dl_decl_plugin));
}
datalog::rel_context_base* rel = m_context.get_rel_context();
if (rel) {
datalog::relation_manager& r = rel->get_rmanager();
r.register_plugin(alloc(datalog::external_relation_plugin, *this, r));
}
}
开发者ID:perillaseed,项目名称:z3,代码行数:14,代码来源:api_datalog.cpp
示例4: display_statistics
static void display_statistics(
std::ostream& out,
datalog::context& ctx,
datalog::rule_set& orig_rules,
datalog::instruction_block& code,
datalog::execution_context& ex_ctx,
bool verbose
)
{
g_piece_timer.stop();
unsigned t_other = static_cast<int>(g_piece_timer.get_seconds()*1000);
g_overall_time.stop();
code.process_all_costs();
{
params_ref p;
p.set_bool("output_profile", true);
p.set_uint("profile_milliseconds_threshold", 100);
ctx.updt_params(p);
out << "--------------\n";
out << "original rules\n";
orig_rules.display(out);
out << "---------------\n";
out << "generated rules\n";
ctx.display_rules(out);
out << "--------------\n";
out << "instructions \n";
code.display(*ctx.get_rel_context(), out);
out << "--------------\n";
out << "big relations \n";
ex_ctx.report_big_relations(1000, out);
}
out << "--------------\n";
out << "relation sizes\n";
ctx.get_rel_context()->get_rmanager().display_relation_sizes(out);
if (verbose) {
out << "--------------\n";
out << "rules\n";
ctx.display_rules(out);
}
out << "Time: " << static_cast<int>(g_overall_time.get_seconds()*1000) << "ms\n";
out << "Parsing: " << t_parsing << "ms, other: " << t_other << "ms\n";
}
开发者ID:CHolmes3,项目名称:z3,代码行数:49,代码来源:datalog_frontend.cpp
示例5: get_last_status
std::string get_last_status() {
datalog::execution_result status = m_context.get_status();
switch(status) {
case datalog::INPUT_ERROR:
return "input error";
case datalog::OK:
return "ok";
case datalog::TIMEOUT:
return "timeout";
case datalog::APPROX:
return "approximated";
default:
UNREACHABLE();
return "unknown";
}
}
开发者ID:perillaseed,项目名称:z3,代码行数:16,代码来源:api_datalog.cpp
示例6: reduce
virtual void reduce(func_decl* f, unsigned num_args, expr * const* args, expr_ref& result) {
expr* r = 0;
if (m_reduce_app) {
m_reduce_app(m_state, f, num_args, args, &r);
result = r;
m_trail.push_back(f);
for (unsigned i = 0; i < num_args; ++i) {
m_trail.push_back(args[i]);
}
m_trail.push_back(r);
}
// allow fallthrough.
if (r == 0) {
ast_manager& m = m_context.get_manager();
result = m.mk_app(f, num_args, args);
}
}
开发者ID:perillaseed,项目名称:z3,代码行数:17,代码来源:api_datalog.cpp
示例7: updt_params
void updt_params(params_ref const& p) {
m_context.updt_params(p);
}
开发者ID:perillaseed,项目名称:z3,代码行数:3,代码来源:api_datalog.cpp
示例8: collect_param_descrs
void collect_param_descrs(param_descrs & p) {
m_context.collect_params(p);
}
开发者ID:perillaseed,项目名称:z3,代码行数:3,代码来源:api_datalog.cpp
示例9: add_cover
void add_cover(int level, func_decl* pred, expr* predicate) {
m_context.add_cover(level, pred, predicate);
}
开发者ID:perillaseed,项目名称:z3,代码行数:3,代码来源:api_datalog.cpp
示例10: get_cover_delta
expr_ref get_cover_delta(int level, func_decl* pred) {
return m_context.get_cover_delta(level, pred);
}
开发者ID:perillaseed,项目名称:z3,代码行数:3,代码来源:api_datalog.cpp
示例11: get_num_levels
unsigned get_num_levels(func_decl* pred) {
return m_context.get_num_levels(pred);
}
开发者ID:perillaseed,项目名称:z3,代码行数:3,代码来源:api_datalog.cpp
示例12: to_string
std::string to_string(unsigned num_queries, expr* const* queries) {
std::stringstream str;
m_context.display_smt2(num_queries, queries, str);
return str.str();
}
开发者ID:perillaseed,项目名称:z3,代码行数:5,代码来源:api_datalog.cpp
示例13: add_table_fact
void add_table_fact(func_decl* r, unsigned num_args, unsigned args[]) {
m_context.add_table_fact(r, num_args, args);
}
开发者ID:perillaseed,项目名称:z3,代码行数:3,代码来源:api_datalog.cpp
示例14: update_rule
void update_rule(expr* rule, symbol const& name) {
m_context.update_rule(rule, name);
}
开发者ID:perillaseed,项目名称:z3,代码行数:3,代码来源:api_datalog.cpp
示例15: add_rule
void add_rule(expr* rule, symbol const& name) {
m_context.add_rule(rule, name);
}
开发者ID:perillaseed,项目名称:z3,代码行数:3,代码来源:api_datalog.cpp
注:本文中的datalog::context类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论