コード例 #1
0
ファイル: enormalizer.c プロジェクト: martisch/eprover_dev
long build_rw_system(ClauseSet_p demods, ClauseSet_p spec)
{
   long count=0;
   Clause_p handle;

   while((handle = ClauseSetExtractFirst(spec)))
   {
      if(ClauseIsDemodulator(handle))
      {         
         SysDateInc(&(demods->date));
         handle->date = demods->date;
         EqnSetProp(handle->literals, EPIsOriented);
         ClauseSetPDTIndexedInsert(demods, handle);
         count++;
      }
      else
      {         
         fprintf(stderr, "%s: Clause is not a rewrite rule: ", NAME);
         ClausePrint(stderr, handle, true);
         fprintf(stderr, " -- ignoring\n");
         ClauseFree(handle);
      }
   }
   return count;
}
コード例 #2
0
ファイル: cco_proofproc.c プロジェクト: kylepjohnson/sigma
static bool
eliminate_backward_rewritten_clauses(ProofState_p
				     state, ProofControl_p control,
				     Clause_p clause, SysDate *date)
{
   long old_lit_count = state->tmp_store->literals,
      old_clause_count= state->tmp_store->members;
   bool min_rw = false;
   
   PERF_CTR_ENTRY(BWRWTimer);
   if(ClauseIsDemodulator(clause))
   {      
      SysDateInc(date);
      if(state->gindices.bw_rw_index)
      {
         min_rw = RemoveRewritableClausesIndexed(control->ocb,
                                                 state->tmp_store,
                                                 state->archive,
                                                 clause, *date, &(state->gindices));
         
      }
      else
      {
         min_rw = RemoveRewritableClauses(control->ocb,
                                          state->processed_pos_rules,
                                          state->tmp_store,
                                          state->archive,
                                          clause, *date, &(state->gindices))
            ||min_rw;
         min_rw = RemoveRewritableClauses(control->ocb,
                                          state->processed_pos_eqns,
                                          state->tmp_store,
                                          state->archive,
                                          clause, *date, &(state->gindices))
            ||min_rw;
         min_rw = RemoveRewritableClauses(control->ocb, 
                                          state->processed_neg_units,
                                          state->tmp_store,
                                          state->archive,
                                          clause, *date, &(state->gindices))
            ||min_rw;
         min_rw = RemoveRewritableClauses(control->ocb, 
                                          state->processed_non_units,
                                          state->tmp_store,
                                          state->archive,
                                          clause, *date, &(state->gindices))
            ||min_rw;
      }
      state->backward_rewritten_lit_count+=
	 (state->tmp_store->literals-old_lit_count);
      state->backward_rewritten_count+=
	 (state->tmp_store->members-old_clause_count);
      
      if(control->heuristic_parms.detsort_bw_rw)
      {
         ClauseSetSort(state->tmp_store, ClauseCmpByStructWeight); 
      }
   }
   PERF_CTR_EXIT(BWRWTimer);
   /*printf("# Removed %ld clauses\n",
     (state->tmp_store->members-old_clause_count)); */
   return min_rw;
}