void simplify_watchlist(ProofState_p state, ProofControl_p control, Clause_p clause) { ClauseSet_p tmp_set; Clause_p handle; long removed_lits; if(!ClauseIsDemodulator(clause)) { return; } tmp_set = ClauseSetAlloc(); RemoveRewritableClauses(control->ocb, state->watchlist, tmp_set, state->archive, clause, clause->date, &(state->wlindices)); while((handle = ClauseSetExtractFirst(tmp_set))) { ClauseComputeLINormalform(control->ocb, state->terms, handle, state->demods, control->heuristic_parms.forward_demod, control->heuristic_parms.prefer_general); removed_lits = ClauseRemoveSuperfluousLiterals(handle); if(removed_lits) { DocClauseModificationDefault(handle, inf_minimize, NULL); } if(control->ac_handling_active) { ClauseRemoveACResolved(handle); } ClauseSubsumeOrderSortLits(handle); ClauseSetIndexedInsertClause(state->watchlist, handle); GlobalIndicesInsertClause(&(state->wlindices), handle); } ClauseSetFree(tmp_set); }
void process_clauses(char* infile, TB_p terms, OCB_p ocb, ClauseSet_p *demodulators) { Clause_p clause; Scanner_p in; if(infile) { in = CreateScanner(StreamTypeFile, infile, true, NULL); ScannerSetFormat(in, parse_format); while(!TestInpTok(in, NoToken)) { clause = ClauseParse(in, terms); ClausePrint(GlobalOut, clause, true); ClauseComputeLINormalform(ocb, terms, clause, demodulators, 1, false); fprintf(GlobalOut, " ==> "); ClausePrint(GlobalOut, clause, true); fprintf(GlobalOut, "\n"); ClauseFree(clause); } DestroyScanner(in); } }