本文整理汇总了C++中obj_map::contains方法的典型用法代码示例。如果您正苦于以下问题:C++ obj_map::contains方法的具体用法?C++ obj_map::contains怎么用?C++ obj_map::contains使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类obj_map
的用法示例。
在下文中一共展示了obj_map::contains方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: assert_eq_core
void ctx_propagate_assertions::assert_eq_core(expr * t, app * val) {
if (m_assertions.contains(t)) {
// This branch can only happen when m_max_depth was reached.
// It can happen when m_assertions contains an entry t->val',
// but (= t val) was not simplified to (= val' val)
// because the simplifier stopped at depth m_max_depth
return;
}
CTRACE("assert_eq_bug", m_assertions.contains(t),
tout << "t:\n" << mk_ismt2_pp(t, m) << "\nval:\n" << mk_ismt2_pp(val, m) << "\n";
expr * old_val = 0;
m_assertions.find(t, old_val);
tout << "old_val:\n" << mk_ismt2_pp(old_val, m) << "\n";);
示例2: is_reduced
// returns true if (hypothesis (not a)) would be reduced
bool is_reduced(expr *a)
{
expr_ref e(m);
if (m.is_not(a)) { e = to_app(a)->get_arg(0); }
else { e = m.mk_not(a); }
return m_units.contains(e);
}
示例3: cache_result
void cache_result(expr * t, subpaving::var x, mpz const & n, mpz const & d) {
SASSERT(!m_cache.contains(t));
SASSERT(m_cached_numerators.size() == m_cached_vars.size());
SASSERT(m_cached_denominators.size() == m_cached_vars.size());
if (t->get_ref_count() <= 1)
return;
unsigned idx = m_cached_vars.size();
m_cache.insert(t, idx);
m().inc_ref(t);
m_cached_vars.push_back(x);
m_cached_numerators.push_back(n);
m_cached_denominators.push_back(d);
}
示例4: m
pb2bv_model_converter::pb2bv_model_converter(ast_manager & _m, obj_map<func_decl, expr*> const & c2bit, bound_manager const & bm):
m(_m) {
obj_map<func_decl, expr*>::iterator it = c2bit.begin();
obj_map<func_decl, expr*>::iterator end = c2bit.end();
for ( ; it != end; it++) {
m_c2bit.push_back(func_decl_pair(it->m_key, to_app(it->m_value)->get_decl()));
m.inc_ref(it->m_key);
m.inc_ref(to_app(it->m_value)->get_decl());
}
bound_manager::iterator it2 = bm.begin();
bound_manager::iterator end2 = bm.end();
for (; it2 != end2; ++it2) {
expr * c = *it2;
SASSERT(is_uninterp_const(c));
func_decl * d = to_app(c)->get_decl();
if (!c2bit.contains(d)) {
SASSERT(d->get_arity() == 0);
m.inc_ref(d);
m_c2bit.push_back(func_decl_pair(d, static_cast<func_decl*>(nullptr)));
}
}
}
示例5: is_cached
bool is_cached(expr * t) {
return t->get_ref_count() > 1 && m_cache.contains(t);
}