/* set the effect to be true*/ void activate_ef( int index, int time ) { int i; gef_conn[index].level = time; for ( i = 0; i < gef_conn[index].num_A; i++ ) { if ( gft_conn[gef_conn[index].A[i]].in_F ) { continue; } new_fact( gef_conn[index].A[i] ); } }
/* Initialzie the state S to lF and gft_conn */ void initialize_fixpoint( State *S ) { int i; lnum_E = 0; lnum_ch_E = 0; lnum_F = 0; for ( i = 0; i < S->num_F; i++ ) { if ( gft_conn[S->F[i]].in_F ) { continue; } new_fact( S->F[i] ); } }
proof *mk_unit_resolution_core(unsigned num_args, proof* const *args) { ptr_buffer<proof> pf_args; pf_args.push_back(args [0]); app *cls_fact = to_app(m.get_fact(args[0])); ptr_buffer<expr> cls; if (m.is_or(cls_fact)) { for (unsigned i = 0, sz = cls_fact->get_num_args(); i < sz; ++i) { cls.push_back(cls_fact->get_arg(i)); } } else { cls.push_back(cls_fact); } // construct new resovent ptr_buffer<expr> new_fact_cls; bool found; // XXX quadratic for (unsigned i = 0, sz = cls.size(); i < sz; ++i) { found = false; for (unsigned j = 1; j < num_args; ++j) { if (m.is_complement(cls.get(i), m.get_fact(args [j]))) { found = true; pf_args.push_back(args [j]); break; } } if (!found) { new_fact_cls.push_back(cls.get(i)); } } SASSERT(new_fact_cls.size() + pf_args.size() - 1 == cls.size()); expr_ref new_fact(m); new_fact = mk_or(m, new_fact_cls.size(), new_fact_cls.c_ptr()); // create new proof step proof *res = m.mk_unit_resolution(pf_args.size(), pf_args.c_ptr(), new_fact); m_pinned.push_back(res); return res; }